-
Notifications
You must be signed in to change notification settings - Fork 464
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
194 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,56 @@ | ||
'use strict'; | ||
|
||
angular.module('web') | ||
.controller('aboutCtrl', ['$scope','$state','$uibModalInstance','upgradeSvs','safeApply','Toast', | ||
function($scope,$state,$modalInstance,upgradeSvs,safeApply, Toast){ | ||
|
||
angular.extend($scope, { | ||
cancel: cancel, | ||
open: open, | ||
app_logo: Global.app.logo, | ||
info: { | ||
currentVersion: Global.app.version | ||
}, | ||
custom_about_html: Global.about_html | ||
}); | ||
|
||
init(); | ||
function init(){ | ||
$scope.isLoading=true; | ||
upgradeSvs.load(function(info){ | ||
$scope.isLoading=false; | ||
|
||
angular.extend($scope.info, info); | ||
|
||
safeApply($scope); | ||
|
||
//不是最新版本,获取最新版本的releaseNote | ||
if(!$scope.info.isLastVersion){ | ||
var converter = new showdown.Converter(); | ||
upgradeSvs.getLastestReleaseNote($scope.info.lastVersion, function(text){ | ||
|
||
text = text + ''; | ||
var html = converter.makeHtml(text); | ||
$scope.info.lastReleaseNote = html; | ||
|
||
safeApply($scope); | ||
}) | ||
} | ||
.controller('aboutCtrl', ['$scope', '$state', '$uibModalInstance', | ||
'upgradeSvs', 'safeApply', 'Toast', | ||
function($scope, $state, $modalInstance, upgradeSvs, safeApply, Toast) { | ||
|
||
angular.extend($scope, { | ||
cancel: cancel, | ||
open: open, | ||
app_logo: Global.app.logo, | ||
info: { | ||
currentVersion: Global.app.version | ||
}, | ||
custom_about_html: Global.about_html | ||
}); | ||
} | ||
|
||
function open(a){ | ||
openExternal(a); | ||
} | ||
init(); | ||
|
||
function cancel(){ | ||
$modalInstance.dismiss('close'); | ||
} | ||
function init() { | ||
if (!Global.upgrade_url) return; | ||
|
||
$scope.isLoading = true; | ||
upgradeSvs.load(function(info) { | ||
$scope.isLoading = false; | ||
|
||
angular.extend($scope.info, info); | ||
|
||
safeApply($scope); | ||
|
||
}]) | ||
; | ||
//不是最新版本,获取最新版本的releaseNote | ||
if (!$scope.info.isLastVersion) { | ||
var converter = new showdown.Converter(); | ||
upgradeSvs.getLastestReleaseNote($scope.info.lastVersion, | ||
function(text) { | ||
|
||
text = text + ''; | ||
var html = converter.makeHtml(text); | ||
$scope.info.lastReleaseNote = html; | ||
|
||
safeApply($scope); | ||
}) | ||
} | ||
}); | ||
} | ||
|
||
function open(a) { | ||
openExternal(a); | ||
} | ||
|
||
function cancel() { | ||
$modalInstance.dismiss('close'); | ||
} | ||
|
||
} | ||
]); |
File renamed without changes.
File renamed without changes.
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Access Key-based logon | ||
|
||
## 1. Logon using the Access Key of a subaccount with high-level privilege | ||
|
||
* The primary account is not recommended for Access Key-based logon. A subaccount with high-level privilege is recommended. | ||
|
||
* Go to the [RAM console](https://ram.console.aliyun.com) to create a subaccount Access Key. | ||
|
||
* The subaccount must be assigned the "AliyunSTSAssumeRoleAccess" and "AliyunRAMReadOnlyAccess" permissions and the permission to access the directory to be authorized. | ||
|
||
* Authorization of the subaccount with high-level privilege (recommended configuration for novice users): | ||
|
||
 | ||
|
||
|
||
(1) Example of logon to public cloud: | ||
|
||
 | ||
|
||
(2) Example of logon to private cloud: | ||
|
||
 | ||
|
||
2. Logon using a subaccount with low-level privilege | ||
|
||
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: | ||
|
||
 | ||
|
||
Or: | ||
|
||
 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# Authorization code support | ||
|
||
Two functions are supported: | ||
|
||
Obtain an authorization code by using the on-demand authorization function of Alibaba Cloud Security Token Service (STS). | ||
|
||
Log on to the OSS browser by using the authorization code. | ||
|
||
For details, visit https://help.aliyun.com/document_detail/31935.html | ||
|
||
## 1. Create a role | ||
|
||
Create a role in accordance with the instructions described in [STS On-demand Access Authorization](https://help.aliyun.com/document_detail/31935.html). | ||
|
||
## 2. Generate an authorization code in the OSS browser | ||
|
||
* Log on using the Access Key of a subaccount rather than the primary account. | ||
|
||
* The subaccount must be assigned the "AliyunSTSAssumeRoleAccess" and "AliyunRAMReadOnlyAccess" permissions and the permission to access the directory to be authorized. | ||
|
||
Subaccount authorization (recommended configuration for novice users): | ||
|
||
 | ||
|
||
|
||
Authorization in the OSS browser: | ||
|
||
|
||
 | ||
|
||
 | ||
|
||
|
||
|
||
3. Logon using the authorization code: | ||
|
||
 | ||
|
||
4. Authorization code format | ||
|
||
The authorization code generated by a program must adopt the following format: | ||
|
||
```javascript | ||
var opt = { | ||
id: '', | ||
secret: '', | ||
stoken: '', | ||
privilege: '', | ||
expiration: '', | ||
osspath: '' | ||
}; | ||
|
||
//toString | ||
opt = JSON.stringify(opt); | ||
|
||
//base64 encode | ||
Buffer.from(opt, 'base64').toString(); | ||
``` | ||
|
||
For details, see the following code: [app/main/files/modals/grant-token-modal.js](app/main/files/modals/grant-token-modal.js). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Email sending settings | ||
|
||
## Examples: | ||
|
||
#### 1. QQ Mail: | ||
|
||
``` | ||
"host": "smtp.qq.com", | ||
"port": 465, | ||
"secure": true | ||
``` | ||
|
||
#### 2. Gmail: | ||
|
||
``` | ||
"host": "smtp.gmail.com", | ||
"port": 465, | ||
"secure": true | ||
``` | ||
|
||
#### 3. 126 | ||
|
||
``` | ||
"host": "smtp.126.com", | ||
"port": 465, | ||
"secure": true | ||
``` | ||
|
||
#### 4. 163 | ||
|
||
``` | ||
"host": "smtp.163.com", | ||
"port": 465, | ||
"secure": true | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
# 邮件发送设置 | ||
|
||
> [For English](en-smtpSetting.md) | ||
## 举例参考: | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters