Skip to content

Commit 3d86e14

Browse files
committed
增加英文文档
1 parent 7f43498 commit 3d86e14

File tree

14 files changed

+194
-52
lines changed

14 files changed

+194
-52
lines changed

Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@ mac:
4545
rm -rf releases/$(VERSION)/$(NAME)-darwin-x64.zip && mkdir -p releases/$(VERSION)
4646
cd build && zip ../releases/$(VERSION)/$(NAME)-darwin-x64.zip -r $(NAME)-darwin-x64
4747
dmg:
48-
npm run mac
49-
rm -rf releases/$(VERSION)/$(NAME)-darwin-x64.zip && mkdir -p releases/$(VERSION)
5048
rm build/$(NAME)-darwin-x64/LICENSE* build/$(NAME)-darwin-x64/version
5149
ln -s /Applications/ build/$(NAME)-darwin-x64/Applications
5250
#cp dist/icons/icon.icns build/$(NAME)-darwin-x64/.VolumeIcon.icns

app/main/modals/about.js

Lines changed: 49 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,56 @@
11
'use strict';
22

33
angular.module('web')
4-
.controller('aboutCtrl', ['$scope','$state','$uibModalInstance','upgradeSvs','safeApply','Toast',
5-
function($scope,$state,$modalInstance,upgradeSvs,safeApply, Toast){
6-
7-
angular.extend($scope, {
8-
cancel: cancel,
9-
open: open,
10-
app_logo: Global.app.logo,
11-
info: {
12-
currentVersion: Global.app.version
13-
},
14-
custom_about_html: Global.about_html
15-
});
16-
17-
init();
18-
function init(){
19-
$scope.isLoading=true;
20-
upgradeSvs.load(function(info){
21-
$scope.isLoading=false;
22-
23-
angular.extend($scope.info, info);
24-
25-
safeApply($scope);
26-
27-
//不是最新版本,获取最新版本的releaseNote
28-
if(!$scope.info.isLastVersion){
29-
var converter = new showdown.Converter();
30-
upgradeSvs.getLastestReleaseNote($scope.info.lastVersion, function(text){
31-
32-
text = text + '';
33-
var html = converter.makeHtml(text);
34-
$scope.info.lastReleaseNote = html;
35-
36-
safeApply($scope);
37-
})
38-
}
4+
.controller('aboutCtrl', ['$scope', '$state', '$uibModalInstance',
5+
'upgradeSvs', 'safeApply', 'Toast',
6+
function($scope, $state, $modalInstance, upgradeSvs, safeApply, Toast) {
7+
8+
angular.extend($scope, {
9+
cancel: cancel,
10+
open: open,
11+
app_logo: Global.app.logo,
12+
info: {
13+
currentVersion: Global.app.version
14+
},
15+
custom_about_html: Global.about_html
3916
});
40-
}
4117

42-
function open(a){
43-
openExternal(a);
44-
}
18+
init();
4519

46-
function cancel(){
47-
$modalInstance.dismiss('close');
48-
}
20+
function init() {
21+
if (!Global.upgrade_url) return;
22+
23+
$scope.isLoading = true;
24+
upgradeSvs.load(function(info) {
25+
$scope.isLoading = false;
26+
27+
angular.extend($scope.info, info);
28+
29+
safeApply($scope);
4930

50-
}])
51-
;
31+
//不是最新版本,获取最新版本的releaseNote
32+
if (!$scope.info.isLastVersion) {
33+
var converter = new showdown.Converter();
34+
upgradeSvs.getLastestReleaseNote($scope.info.lastVersion,
35+
function(text) {
36+
37+
text = text + '';
38+
var html = converter.makeHtml(text);
39+
$scope.info.lastReleaseNote = html;
40+
41+
safeApply($scope);
42+
})
43+
}
44+
});
45+
}
46+
47+
function open(a) {
48+
openExternal(a);
49+
}
50+
51+
function cancel() {
52+
$modalInstance.dismiss('close');
53+
}
54+
55+
}
56+
]);
File renamed without changes.
File renamed without changes.
File renamed without changes.

custom/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ module.exports= {
1919

2020

2121
//logo png 格式, 主要用于mac和linux系统
22-
logo_png: path.join(__dirname, './logo.png'),
22+
logo_png: path.join(__dirname, './icon.png'),
2323

2424
//logo icns 格式,主要用于mac系统
25-
logo_ico: path.join(__dirname, './logo.icns'),
25+
logo_ico: path.join(__dirname, './icon.icns'),
2626

2727
//logo ico 格式,主要用于windows系统
28-
logo_ico: path.join(__dirname, './logo.ico'),
28+
logo_ico: path.join(__dirname, './icon.ico'),
2929

3030

3131
//release notes目录后缀,里面有 ${version}.md, 如 1.0.0.md

docs/Readme.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,10 @@ OSS 浏览器文档
33
* [AK登录](aklogin.md)
44
* [临时授权码支持](authToken.md)
55
* [邮件设置](smtpSetting.md)
6+
7+
8+
For English:
9+
10+
* [Access Key-based logon](en-aklogin.md)
11+
* [Authorization code support](en-authToken.md)
12+
* [邮件设置](en-smtpSetting.md)

docs/aklogin.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# AK登录
22

3+
> [For English](en-aklogin.md)
4+
35
### 1. 大权限子账号AK登录
46

57
* 不推荐使用主账号AK登录。推荐大权限子账号。
@@ -12,7 +14,6 @@
1214

1315
![](../preview/genToken1.png)
1416

15-
1617
#### (1) 公有云登录样例:
1718

1819
![](../preview/login.png)

docs/authToken.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# 授权码支持
22

3+
> [For English](en-authToken.md)
4+
35
主要支持2个功能:
46

57
1. 使用阿里云STS服务临时授权得到授权码。
@@ -38,7 +40,7 @@
3840

3941
如果您使用程序生成授权码, 请按照以下格式生成:
4042

41-
```
43+
```javascript
4244
var opt = {
4345
id: '',
4446
secret: '',

docs/en-aklogin.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Access Key-based logon
2+
3+
## 1. Logon using the Access Key of a subaccount with high-level privilege
4+
5+
* The primary account is not recommended for Access Key-based logon. A subaccount with high-level privilege is recommended.
6+
7+
* Go to the [RAM console](https://ram.console.aliyun.com) to create a subaccount Access Key.
8+
9+
* The subaccount must be assigned the "AliyunSTSAssumeRoleAccess" and "AliyunRAMReadOnlyAccess" permissions and the permission to access the directory to be authorized.
10+
11+
* Authorization of the subaccount with high-level privilege (recommended configuration for novice users):
12+
13+
![](../preview/genToken1.png)
14+
15+
16+
(1) Example of logon to public cloud:
17+
18+
![](../preview/login.png)
19+
20+
(2) Example of logon to private cloud:
21+
22+
![](../preview/login2.png)
23+
24+
2. Logon using a subaccount with low-level privilege
25+
26+
Assume that a subaccount is assigned the read or write permission on the `oss://aabbcc4/dd/` directory. The subaccount is considered to have low-level privilege. Logon using this subaccount is as follows:
27+
28+
![](../preview/login-subak1.png)
29+
30+
Or:
31+
32+
![](../preview/login-subak2.png)

docs/en-authToken.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Authorization code support
2+
3+
Two functions are supported:
4+
5+
Obtain an authorization code by using the on-demand authorization function of Alibaba Cloud Security Token Service (STS).
6+
7+
Log on to the OSS browser by using the authorization code.
8+
9+
For details, visit https://help.aliyun.com/document_detail/31935.html
10+
11+
## 1. Create a role
12+
13+
Create a role in accordance with the instructions described in [STS On-demand Access Authorization](https://help.aliyun.com/document_detail/31935.html).
14+
15+
## 2. Generate an authorization code in the OSS browser
16+
17+
* Log on using the Access Key of a subaccount rather than the primary account.
18+
19+
* The subaccount must be assigned the "AliyunSTSAssumeRoleAccess" and "AliyunRAMReadOnlyAccess" permissions and the permission to access the directory to be authorized.
20+
21+
Subaccount authorization (recommended configuration for novice users):
22+
23+
![](../preview/genToken1.png)
24+
25+
26+
Authorization in the OSS browser:
27+
28+
29+
![](../preview/genToken2.png)
30+
31+
![](../preview/genToken3.png)
32+
33+
34+
35+
3. Logon using the authorization code:
36+
37+
![](../preview/token-login.png)
38+
39+
4. Authorization code format
40+
41+
The authorization code generated by a program must adopt the following format:
42+
43+
```javascript
44+
var opt = {
45+
id: '',
46+
secret: '',
47+
stoken: '',
48+
privilege: '',
49+
expiration: '',
50+
osspath: ''
51+
};
52+
53+
//toString
54+
opt = JSON.stringify(opt);
55+
56+
//base64 encode
57+
Buffer.from(opt, 'base64').toString();
58+
```
59+
60+
For details, see the following code: [app/main/files/modals/grant-token-modal.js](app/main/files/modals/grant-token-modal.js).

docs/en-smtpSetting.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Email sending settings
2+
3+
## Examples:
4+
5+
#### 1. QQ Mail:
6+
7+
```
8+
"host": "smtp.qq.com",
9+
"port": 465,
10+
"secure": true
11+
```
12+
13+
#### 2. Gmail:
14+
15+
```
16+
"host": "smtp.gmail.com",
17+
"port": 465,
18+
"secure": true
19+
```
20+
21+
#### 3. 126
22+
23+
```
24+
"host": "smtp.126.com",
25+
"port": 465,
26+
"secure": true
27+
```
28+
29+
#### 4. 163
30+
31+
```
32+
"host": "smtp.163.com",
33+
"port": 465,
34+
"secure": true
35+
```

docs/smtpSetting.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# 邮件发送设置
22

3+
> [For English](en-smtpSetting.md)
4+
35
## 举例参考:
46

57

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"build": "gulp build",
1515
"win64": "cross-env ELECTRON_MIRROR=http://npm.taobao.org/mirrors/electron/ electron-packager ./dist --asar --overwrite --out=build --version=1.7.5 --platform=win32 --arch=x64",
1616
"win32": "cross-env ELECTRON_MIRROR=http://npm.taobao.org/mirrors/electron/ electron-packager ./dist --asar --overwrite --out=build --version=1.7.5 --platform=win32 --arch=ia32",
17-
"mac": "cross-env ELECTRON_MIRROR=http://npm.taobao.org/mirrors/electron/ electron-packager ./dist --asar --overwrite --out=build --version=1.7.5 --platform=darwin --arch=x64 --icon=./custom/logo.icns",
17+
"mac": "cross-env ELECTRON_MIRROR=http://npm.taobao.org/mirrors/electron/ electron-packager ./dist --asar --overwrite --out=build --version=1.7.5 --platform=darwin --arch=x64 --icon=./custom/icon.icns",
1818
"linux32": "cross-env ELECTRON_MIRROR=http://npm.taobao.org/mirrors/electron/ electron-packager ./dist --asar --overwrite --out=build --version=1.7.5 --platform=linux --arch=ia32",
1919
"linux64": "cross-env ELECTRON_MIRROR=http://npm.taobao.org/mirrors/electron/ electron-packager ./dist --asar --overwrite --out=build --version=1.7.5 --platform=linux --arch=x64",
2020
"all": "cross-env ELECTRON_MIRROR=http://npm.taobao.org/mirrors/electron/ electron-packager ./dist --asar --overwrite --out=build --version=1.7.5 --all --icon=./custom/"

0 commit comments

Comments
 (0)