modify style
This commit is contained in:
parent
f0db1b3e69
commit
8daaffc10a
|
@ -163,9 +163,11 @@ RPC Alias=RPC 别名
|
||||||
Import / Export AriaNg Settings=导入 / 导出 AriaNg 设置
|
Import / Export AriaNg Settings=导入 / 导出 AriaNg 设置
|
||||||
Import Settings=导入设置
|
Import Settings=导入设置
|
||||||
Export Settings=导出设置
|
Export Settings=导出设置
|
||||||
|
AriaNg settings data=AriaNg 设置数据
|
||||||
Confirm Import=确认导入
|
Confirm Import=确认导入
|
||||||
Are you sure you want to import all settings?=您是否要导入所有设置?
|
Are you sure you want to import all settings?=您是否要导入所有设置?
|
||||||
Invalid settings data format!=无效的设置数据格式!
|
Invalid settings data format!=无效的设置数据格式!
|
||||||
|
Data has been copied to clipboard.=数据已经复制到剪贴板中.
|
||||||
Supported Placeholder=支持的占位符
|
Supported Placeholder=支持的占位符
|
||||||
AriaNg Title=AriaNg 标题
|
AriaNg Title=AriaNg 标题
|
||||||
Downloading Count=正在下载数量
|
Downloading Count=正在下载数量
|
||||||
|
|
|
@ -163,9 +163,11 @@ RPC Alias=RPC 別名
|
||||||
Import / Export AriaNg Settings=匯入 / 匯出 AriaNg 設定
|
Import / Export AriaNg Settings=匯入 / 匯出 AriaNg 設定
|
||||||
Import Settings=匯入設定
|
Import Settings=匯入設定
|
||||||
Export Settings=匯出設定
|
Export Settings=匯出設定
|
||||||
|
AriaNg settings data=AriaNg 設定資料
|
||||||
Confirm Import=確認匯入
|
Confirm Import=確認匯入
|
||||||
Are you sure you want to import all settings?=您是否要匯入所有設定?
|
Are you sure you want to import all settings?=您是否要匯入所有設定?
|
||||||
Invalid settings data format!=無效的設定資料格式!
|
Invalid settings data format!=無效的設定資料格式!
|
||||||
|
Data has been copied to clipboard.=資料已經複製到剪貼簿中.
|
||||||
Supported Placeholder=支援的預留位置
|
Supported Placeholder=支援的預留位置
|
||||||
AriaNg Title=AriaNg 標題
|
AriaNg Title=AriaNg 標題
|
||||||
Downloading Count=正在下載數量
|
Downloading Count=正在下載數量
|
||||||
|
|
|
@ -167,9 +167,11 @@
|
||||||
'Import / Export AriaNg Settings': 'Import / Export AriaNg Settings',
|
'Import / Export AriaNg Settings': 'Import / Export AriaNg Settings',
|
||||||
'Import Settings': 'Import Settings',
|
'Import Settings': 'Import Settings',
|
||||||
'Export Settings': 'Export Settings',
|
'Export Settings': 'Export Settings',
|
||||||
|
'AriaNg settings data': 'AriaNg settings data',
|
||||||
'Confirm Import': 'Confirm Import',
|
'Confirm Import': 'Confirm Import',
|
||||||
'Are you sure you want to import all settings?': 'Are you sure you want to import all settings?',
|
'Are you sure you want to import all settings?': 'Are you sure you want to import all settings?',
|
||||||
'Invalid settings data format!': 'Invalid settings data format!',
|
'Invalid settings data format!': 'Invalid settings data format!',
|
||||||
|
'Data has been copied to clipboard.': 'Data has been copied to clipboard.',
|
||||||
'Supported Placeholder': 'Supported Placeholder',
|
'Supported Placeholder': 'Supported Placeholder',
|
||||||
'AriaNg Title': 'AriaNg Title',
|
'AriaNg Title': 'AriaNg Title',
|
||||||
'Downloading Count': 'Downloading Count',
|
'Downloading Count': 'Downloading Count',
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
(function () {
|
(function () {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('ariaNg').controller('AriaNgSettingsController', ['$rootScope', '$scope', '$routeParams', '$window', '$interval', '$timeout', '$filter', 'ariaNgLanguages', 'ariaNgCommonService', 'ariaNgNotificationService', 'ariaNgLocalizationService', 'ariaNgLogService', 'ariaNgFileService', 'ariaNgSettingService', 'ariaNgMonitorService', 'ariaNgTitleService', 'aria2SettingService', function ($rootScope, $scope, $routeParams, $window, $interval, $timeout, $filter, ariaNgLanguages, ariaNgCommonService, ariaNgNotificationService, ariaNgLocalizationService, ariaNgLogService, ariaNgFileService, ariaNgSettingService, ariaNgMonitorService, ariaNgTitleService, aria2SettingService) {
|
angular.module('ariaNg').controller('AriaNgSettingsController', ['$rootScope', '$scope', '$routeParams', '$window', '$interval', '$timeout', '$filter', 'clipboard', 'ariaNgLanguages', 'ariaNgCommonService', 'ariaNgNotificationService', 'ariaNgLocalizationService', 'ariaNgLogService', 'ariaNgFileService', 'ariaNgSettingService', 'ariaNgMonitorService', 'ariaNgTitleService', 'aria2SettingService', function ($rootScope, $scope, $routeParams, $window, $interval, $timeout, $filter, clipboard, ariaNgLanguages, ariaNgCommonService, ariaNgNotificationService, ariaNgLocalizationService, ariaNgLogService, ariaNgFileService, ariaNgSettingService, ariaNgMonitorService, ariaNgTitleService, aria2SettingService) {
|
||||||
var extendType = $routeParams.extendType;
|
var extendType = $routeParams.extendType;
|
||||||
var lastRefreshPageNotification = null;
|
var lastRefreshPageNotification = null;
|
||||||
|
|
||||||
|
@ -44,7 +44,8 @@
|
||||||
rpcSettings: ariaNgSettingService.getAllRpcSettings(),
|
rpcSettings: ariaNgSettingService.getAllRpcSettings(),
|
||||||
isSupportBlob: ariaNgFileService.isSupportBlob(),
|
isSupportBlob: ariaNgFileService.isSupportBlob(),
|
||||||
importSettings: null,
|
importSettings: null,
|
||||||
exportSettings: null
|
exportSettings: null,
|
||||||
|
exportSettingsCopied: false
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.context.showDebugMode = $scope.context.sessionSettings.debugMode || extendType === 'debug';
|
$scope.context.showDebugMode = $scope.context.sessionSettings.debugMode || extendType === 'debug';
|
||||||
|
@ -211,12 +212,19 @@
|
||||||
|
|
||||||
$scope.showExportSettingsModal = function () {
|
$scope.showExportSettingsModal = function () {
|
||||||
$scope.context.exportSettings = $filter('json')(ariaNgSettingService.exportAllOptions());
|
$scope.context.exportSettings = $filter('json')(ariaNgSettingService.exportAllOptions());
|
||||||
|
$scope.context.exportSettingsCopied = false;
|
||||||
angular.element('#export-settings-modal').modal();
|
angular.element('#export-settings-modal').modal();
|
||||||
};
|
};
|
||||||
|
|
||||||
$('#export-settings-modal').on('hide.bs.modal', function (e) {
|
$('#export-settings-modal').on('hide.bs.modal', function (e) {
|
||||||
$scope.context.exportSettings = null;
|
$scope.context.exportSettings = null;
|
||||||
|
$scope.context.exportSettingsCopied = false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$scope.copyExportSettings = function () {
|
||||||
|
clipboard.copyText($scope.context.exportSettings);
|
||||||
|
$scope.context.exportSettingsCopied = true;
|
||||||
|
};
|
||||||
|
|
||||||
$scope.addNewRpcSetting = function () {
|
$scope.addNewRpcSetting = function () {
|
||||||
setNeedRefreshPage();
|
setNeedRefreshPage();
|
||||||
|
|
|
@ -248,3 +248,12 @@ td {
|
||||||
width: 6px;
|
width: 6px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* animation */
|
||||||
|
.fade-in.ng-enter {
|
||||||
|
transition:0.3s linear all;
|
||||||
|
opacity:0;
|
||||||
|
}
|
||||||
|
.fade-in.ng-enter.ng-enter-active {
|
||||||
|
opacity:1;
|
||||||
|
}
|
||||||
|
|
|
@ -283,7 +283,8 @@
|
||||||
<div class="modal-body no-padding">
|
<div class="modal-body no-padding">
|
||||||
<div class="settings-table striped">
|
<div class="settings-table striped">
|
||||||
<input id="import-file-holder" type="file" style="display: none"/>
|
<input id="import-file-holder" type="file" style="display: none"/>
|
||||||
<textarea class="form-control" ng-model="context.importSettings" rows="20"></textarea>
|
<textarea class="form-control" ng-model="context.importSettings" rows="20"
|
||||||
|
ng-placeholder="'AriaNg settings data' | translate"></textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
|
@ -302,13 +303,14 @@
|
||||||
<h4 class="modal-title">
|
<h4 class="modal-title">
|
||||||
<span translate>Export Settings</span>
|
<span translate>Export Settings</span>
|
||||||
<small>
|
<small>
|
||||||
<a class="pointer-cursor" title="{{'Copy' | translate}}" text="context.exportSettings" clipboard>
|
|
||||||
<i class="icon-primary fa fa-copy"></i>
|
|
||||||
</a>
|
|
||||||
<a class="pointer-cursor" title="{{'Save' | translate}}" ng-if="context.isSupportBlob"
|
<a class="pointer-cursor" title="{{'Save' | translate}}" ng-if="context.isSupportBlob"
|
||||||
ng-blob-download="context.exportSettings" ng-file-name="AriaNgConfig.json" ng-content-type="application/json">
|
ng-blob-download="context.exportSettings" ng-file-name="AriaNgConfig.json" ng-content-type="application/json">
|
||||||
<i class="icon-primary fa fa-save"></i>
|
<i class="icon-primary fa fa-save"></i>
|
||||||
</a>
|
</a>
|
||||||
|
<a class="pointer-cursor" title="{{'Copy' | translate}}" ng-click="copyExportSettings()">
|
||||||
|
<i class="icon-primary fa fa-copy"></i>
|
||||||
|
</a>
|
||||||
|
<span class="label label-default fade-in" ng-if="context.exportSettingsCopied" translate>Data has been copied to clipboard.</span>
|
||||||
</small>
|
</small>
|
||||||
</h4>
|
</h4>
|
||||||
</div>
|
</div>
|
||||||
|
|
Reference in a new issue