support show rpc secret

This commit is contained in:
MaysWind 2016-12-04 21:09:09 +08:00
parent 4e5e14cdf1
commit 976859ae25
5 changed files with 20 additions and 2 deletions

View file

@ -130,6 +130,8 @@ Downloading Count=正在下载数量
Waiting Count=正在等待数量
Stopped Count=已停止数量
You have disabled notification in your browser. You should change your browser's settings before you enable this function.=您已经在浏览器中禁用通知功能. 如需使用此功能, 请修改您浏览器的设置.
Show Secret=显示密钥
Hide Secret=隐藏密钥
Aria2 Version=Aria2 版本
Enabled Features=已启用的功能
Functions=方法

View file

@ -134,6 +134,8 @@
'Waiting Count': 'Waiting Count',
'Stopped Count': 'Stopped Count',
'You have disabled notification in your browser. You should change your browser\'s settings before you enable this function.': 'You have disabled notification in your browser. You should change your browser\'s settings before you enable this function.',
'Show Secret': 'Show Secret',
'Hide Secret': 'Hide Secret',
'Aria2 Version': 'Aria2 Version',
'Enabled Features': 'Enabled Features',
'Functions': 'Functions',

View file

@ -10,6 +10,7 @@
languages: ariaNgLanguages,
availableTime: ariaNgCommonService.getTimeOptions([1000, 2000, 3000, 5000, 10000, 30000, 60000], true),
trueFalseOptions: [{name: 'True', value: true}, {name: 'False', value: false}],
showRpcSecret: false,
settings: ariaNgSettingService.getAllOptions(),
sessionSettings: ariaNgSettingService.getAllSessionOptions()
};

View file

@ -1,3 +1,8 @@
/* bootstrap */
.input-group-addon-compact {
padding: 0 4px 0 4px;
}
/* font-awesome extend */
.fa-half {
font-size: 0.5em;

View file

@ -150,8 +150,16 @@
<span class="asterisk">*</span>
</div>
<div class="setting-value col-sm-8">
<input class="form-control" type="password" ng-model="context.settings.secret"
ng-change="settingService.setSecret(context.settings.secret)"/>
<div class="input-group">
<input class="form-control" type="{{context.showRpcSecret ? 'text' : 'password'}}" ng-model="context.settings.secret"
ng-change="settingService.setSecret(context.settings.secret)"/>
<span class="input-group-addon input-group-addon-compact no-vertical-padding">
<button class="btn btn-xs btn-default" title="{{context.showRpcSecret ? 'Hide Secret' : 'Show Secret' | translate}}"
ng-class="{'active': context.showRpcSecret}" ng-click="context.showRpcSecret = !context.showRpcSecret">
<i class="fa fa-eye"></i>
</button>
</span>
</div>
</div>
</div>
<div class="row tip no-background no-hover">