This repository has been archived on 2022-01-02. You can view files and clone it, but cannot push or open issues or pull requests.
AriaNg/src/views/settings-ariang.html

235 lines
16 KiB
HTML
Raw Normal View History

<section class="content no-padding">
<div class="nav-tabs-custom">
<ul class="nav nav-tabs">
2017-03-19 16:17:56 +01:00
<li ng-class="{'active': isCurrentGlobalTab()}">
<a class="pointer-cursor" ng-click="changeGlobalTab()" translate>Global</a>
</li>
<li class="nav-tab-title-rpcname" ng-repeat="setting in context.rpcSettings" ng-class="{'active': isCurrentRpcTab($index)}">
<a class="pointer-cursor" ng-click="changeRpcTab($index)">
<span class="nav-tab-rpcname" ng-bind="'RPC' + (setting.rpcAlias || setting.rpcHost ? ' (' + (setting.rpcAlias ? setting.rpcAlias : setting.rpcHost + ':' + setting.rpcPort) + ')' : '')" title="{{(setting.rpcAlias ? setting.rpcAlias : setting.rpcHost + ':' + setting.rpcPort)}}">RPC</span>
</a>
<a class="pointer-cursor nav-tab-close" ng-if="!setting.isDefault" title="{{'Delete RPC Setting' | translate}}">
<i class="fa fa-times" ng-click="removeRpcSetting(setting)"></i>
</a>
2017-03-19 16:17:56 +01:00
</li>
<li class="slim">
<a class="pointer-cursor" ng-click="addNewRpcSetting()" title="{{'Add New RPC Setting' | translate}}">
<i class="fa fa-plus"></i>
</a>
</li>
</ul>
<div class="tab-content no-padding">
2017-03-19 16:17:56 +01:00
<div class="tab-pane" ng-class="{'active': isCurrentGlobalTab()}">
<div class="settings-table striped hoverable">
<div class="row">
<div class="setting-key setting-key-without-desc col-sm-4">
<span translate>Language</span>
</div>
<div class="setting-value col-sm-8">
<select class="form-control" style="width: 100%;" ng-model="context.settings.language"
ng-options="type as language.displayName for (type, language) in context.languages"
2017-03-19 16:46:16 +01:00
ng-change="setLanguage(context.settings.language)">
</select>
</div>
</div>
2016-11-06 15:41:28 +01:00
<div class="row" ng-if="context.showDebugMode">
<div class="setting-key setting-key-without-desc col-sm-4">
<span translate>Debug Mode</span>
</div>
<div class="setting-value col-sm-8">
<select class="form-control" style="width: 100%;" ng-model="context.sessionSettings.debugMode"
ng-options="option.value as (option.name | translate) for option in context.trueFalseOptions"
2017-03-19 16:46:16 +01:00
ng-change="setDebugMode(context.sessionSettings.debugMode)">
2016-11-06 15:41:28 +01:00
</select>
</div>
</div>
<div class="row">
<div class="setting-key setting-key-without-desc col-sm-4">
<span translate>Page Title</span>
2016-11-06 08:58:04 +01:00
<i class="icon-primary fa fa-question-circle" data-toggle="popover"
data-trigger="hover" data-placement="auto right" data-container="body" data-html="true"
data-content="{{('Supported Placeholder' | translate) + ':<br/>' +
('AriaNg Title' | translate) + ': ${title}<br/>' +
('Downloading Count' | translate) + ': ${downloading}<br/>' +
('Waiting Count' | translate) + ': ${waiting}<br/>' +
('Stopped Count' | translate) + ': ${stopped}<br/>' +
('Download Speed' | translate) + ': ${downspeed}<br/>' +
('Upload Speed' | translate) + ': ${upspeed}<br/><br/>' +
('Tips: You can use the &quot;noprefix&quot; tag to ignore the prefix, &quot;nosuffix&quot; tag ignore the suffix, and &quot;scale=n&quot; tag to set the decimal precision.' | translate) + '<br/>' +
('Example: ${downspeed:noprefix:nosuffix:scale=1}' | translate)}}"></i>
</div>
<div class="setting-value col-sm-8">
<input class="form-control" type="text" ng-model="context.settings.title"
2017-03-19 16:46:16 +01:00
ng-change="setTitle(context.settings.title); updateTitlePreview()"/>
<em>[<span translate>Preview</span>] <span ng-bind="context.titlePreview"></span></em>
</div>
</div>
<div class="row">
<div class="setting-key setting-key-without-desc col-sm-4">
<span translate>Page Title Refresh Interval</span>
<span class="asterisk">*</span>
</div>
<div class="setting-value col-sm-8">
<select class="form-control" style="width: 100%;"
ng-model="context.settings.titleRefreshInterval"
2017-03-19 16:46:16 +01:00
ng-change="setTitleRefreshInterval(context.settings.titleRefreshInterval)"
ng-options="time.optionValue as (time.name | translate: {value: time.value}) for time in context.availableTime">
</select>
</div>
</div>
<div class="row" ng-if="isSupportNotification()">
<div class="setting-key setting-key-without-desc col-sm-4">
<span translate>Enable Browser Notification</span>
</div>
<div class="setting-value col-sm-8">
<select class="form-control" style="width: 100%;"
ng-model="context.settings.browserNotification"
ng-change="setEnableBrowserNotification(context.settings.browserNotification)"
ng-options="option.value as (option.name | translate) for option in context.trueFalseOptions">
</select>
</div>
</div>
<div class="row">
<div class="setting-key setting-key-without-desc col-sm-4">
<span translate>Global Stat Refresh Interval</span>
<span class="asterisk">*</span>
</div>
<div class="setting-value col-sm-8">
<select class="form-control" style="width: 100%;"
ng-model="context.settings.globalStatRefreshInterval"
2017-03-19 16:46:16 +01:00
ng-change="setGlobalStatRefreshInterval(context.settings.globalStatRefreshInterval)"
ng-options="time.optionValue as (time.name | translate: {value: time.value}) for time in context.availableTime">
</select>
</div>
</div>
<div class="row">
<div class="setting-key setting-key-without-desc col-sm-4">
<span translate>Download Task Refresh Interval</span>
<span class="asterisk">*</span>
</div>
<div class="setting-value col-sm-8">
<select class="form-control" style="width: 100%;"
ng-model="context.settings.downloadTaskRefreshInterval"
2017-03-19 16:46:16 +01:00
ng-change="setDownloadTaskRefreshInterval(context.settings.downloadTaskRefreshInterval)"
ng-options="time.optionValue as (time.name | translate: {value: time.value}) for time in context.availableTime">
</select>
</div>
</div>
<div class="row">
<div class="setting-key setting-key-without-desc col-sm-4">
2017-05-14 17:47:34 +02:00
<span translate>Action After Creating New Tasks</span>
</div>
<div class="setting-value col-sm-8">
<select class="form-control" style="width: 100%;" ng-model="context.settings.afterCreatingNewTask"
ng-change="setAfterCreatingNewTask(context.settings.afterCreatingNewTask)">
<option value="task-list" translate>Navigate to Task List Page</option>
<option value="task-detail" translate>Navigate to Task Detail Page</option>
</select>
</div>
</div>
<div class="row tip no-background no-hover">
<span class="asterisk">*</span>
<span translate>Changes to the settings take effect after refreshing page.</span>
2017-06-18 08:00:14 +02:00
<button class="btn btn-xs btn-default" ng-click="resetSettings()">
<span translate>Reset Settings</span>
</button>
</div>
2016-05-16 18:59:27 +02:00
</div>
</div>
2017-03-19 16:17:56 +01:00
<div class="tab-pane" ng-repeat="setting in context.rpcSettings" ng-class="{'active': isCurrentRpcTab($index)}">
<div class="settings-table striped hoverable">
2017-03-19 16:17:56 +01:00
<div class="row">
<div class="setting-key setting-key-without-desc col-sm-4">
<span translate>Aria2 RPC Alias</span>
<span class="asterisk">*</span>
</div>
<div class="setting-value col-sm-8">
<input class="form-control" type="text" ng-placeholder="(setting.rpcHost ? setting.rpcHost + ':' + setting.rpcPort : '')" ng-model="setting.rpcAlias" ng-change="updateRpcSetting(setting, 'rpcAlias')"/>
</div>
</div>
<div class="row">
<div class="setting-key setting-key-without-desc col-sm-4">
<span translate>Aria2 RPC Address</span>
<span class="asterisk">*</span>
</div>
<div class="setting-value col-sm-8">
2017-03-24 16:46:41 +01:00
<div class="input-group input-group-multiple">
2017-03-19 16:17:56 +01:00
<span class="input-group-addon" ng-bind="setting.protocol + '://'"></span>
<input class="form-control" type="text" ng-model="setting.rpcHost" ng-change="updateRpcSetting(setting, 'rpcHost')"/>
<span class="input-group-addon">:</span>
<div class="input-grougp-addon-container">
<input class="form-control form-control-rpcport" type="text" ng-model="setting.rpcPort" ng-change="updateRpcSetting(setting, 'rpcPort')"/>
</div>
<span class="input-group-addon">/</span>
<div class="input-grougp-addon-container">
<input class="form-control form-control-rpcinterface" type="text" ng-model="setting.rpcInterface" ng-change="updateRpcSetting(setting, 'rpcInterface')"/>
</div>
</div>
</div>
</div>
<div class="row">
<div class="setting-key setting-key-without-desc col-sm-4">
<span translate>Aria2 RPC Protocol</span>
<span class="asterisk">*</span>
</div>
<div class="setting-value col-sm-8">
2017-03-19 16:17:56 +01:00
<select class="form-control" style="width: 100%;" ng-model="setting.protocol" ng-change="updateRpcSetting(setting, 'protocol')">
<option value="http" translate>Http</option>
<option value="https" translate>Https</option>
<option value="ws" translate>WebSocket</option>
<option value="wss" translate>WebSocket (Security)</option>
</select>
</div>
</div>
2017-03-19 16:17:56 +01:00
<div class="row" ng-if="setting.protocol === 'http' || setting.protocol === 'https'">
<div class="setting-key setting-key-without-desc col-sm-4">
<span translate>Aria2 RPC Http Request Method</span>
<span class="asterisk">*</span>
<i class="icon-primary fa fa-question-circle" ng-tooltip-container="body" ng-tooltip-placement="top"
ng-tooltip="{{'POST method only supports aria2 v1.15.2 and above.' | translate}}"></i>
</div>
<div class="setting-value col-sm-8">
2017-03-19 16:17:56 +01:00
<select class="form-control" style="width: 100%;" ng-model="setting.httpMethod" ng-change="updateRpcSetting(setting, 'httpMethod')">
<option value="POST" translate>POST</option>
<option value="GET" translate>GET</option>
</select>
</div>
</div>
<div class="row">
<div class="setting-key setting-key-without-desc col-sm-4">
<span translate>Aria2 RPC Secret Token</span>
<span class="asterisk">*</span>
</div>
<div class="setting-value col-sm-8">
2016-12-04 14:09:09 +01:00
<div class="input-group">
2017-03-19 16:17:56 +01:00
<input class="form-control" type="{{context.showRpcSecret ? 'text' : 'password'}}" ng-model="setting.secret" ng-change="updateRpcSetting(setting, 'secret')"/>
2016-12-04 14:09:09 +01:00
<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">
<span class="asterisk">*</span>
<span translate>Changes to the settings take effect after refreshing page.</span>
2017-03-19 16:17:56 +01:00
<button class="btn btn-xs btn-default" ng-disabled="setting.isDefault" ng-click="setDefaultRpcSetting(setting)">
2017-05-20 06:32:03 +02:00
<span translate>Activate</span>
2017-03-19 16:17:56 +01:00
</button>
</div>
</div>
2016-05-17 16:15:28 +02:00
</div>
</div>
</div>
</section>
<script id="setting-changed-notification.html" type="text/ng-template">
<div class="ui-notification custom-template">
<div class="message" ng-bind-html="message"></div>
<div class="message">
2017-03-29 03:10:12 +02:00
<a class="btn btn-small btn-primary close-notification" ng-click="refreshPage()" translate>Reload Page</a>
</div>
</div>
</script>