move setting item order
This commit is contained in:
parent
a30f530996
commit
3004b7be8c
|
@ -99,6 +99,11 @@
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$scope.isSupportNotification = function () {
|
||||||
|
return ariaNgNotificationService.isSupportBrowserNotification() &&
|
||||||
|
ariaNgSettingService.isCurrentRpcUseWebSocket($scope.context.settings.protocol);
|
||||||
|
};
|
||||||
|
|
||||||
$scope.setLanguage = function (value) {
|
$scope.setLanguage = function (value) {
|
||||||
if (ariaNgSettingService.setLanguage(value)) {
|
if (ariaNgSettingService.setLanguage(value)) {
|
||||||
ariaNgLocalizationService.applyLanguage(value);
|
ariaNgLocalizationService.applyLanguage(value);
|
||||||
|
@ -107,19 +112,6 @@
|
||||||
$scope.updateTitlePreview();
|
$scope.updateTitlePreview();
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.setRPCListDisplayOrder = function (value) {
|
|
||||||
setNeedRefreshPage();
|
|
||||||
ariaNgSettingService.setRPCListDisplayOrder(value);
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.setAfterCreatingNewTask = function (value) {
|
|
||||||
ariaNgSettingService.setAfterCreatingNewTask(value);
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.setRemoveOldTaskAfterRestarting = function (value) {
|
|
||||||
ariaNgSettingService.setRemoveOldTaskAfterRestarting(value);
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.setDebugMode = function (value) {
|
$scope.setDebugMode = function (value) {
|
||||||
ariaNgSettingService.setDebugMode(value);
|
ariaNgSettingService.setDebugMode(value);
|
||||||
};
|
};
|
||||||
|
@ -128,16 +120,6 @@
|
||||||
ariaNgSettingService.setTitle(value);
|
ariaNgSettingService.setTitle(value);
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.setTitleRefreshInterval = function (value) {
|
|
||||||
setNeedRefreshPage();
|
|
||||||
ariaNgSettingService.setTitleRefreshInterval(value);
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.isSupportNotification = function () {
|
|
||||||
return ariaNgNotificationService.isSupportBrowserNotification() &&
|
|
||||||
ariaNgSettingService.isCurrentRpcUseWebSocket($scope.context.settings.protocol);
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.setEnableBrowserNotification = function (value) {
|
$scope.setEnableBrowserNotification = function (value) {
|
||||||
ariaNgSettingService.setBrowserNotification(value);
|
ariaNgSettingService.setBrowserNotification(value);
|
||||||
|
|
||||||
|
@ -151,6 +133,11 @@
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$scope.setTitleRefreshInterval = function (value) {
|
||||||
|
setNeedRefreshPage();
|
||||||
|
ariaNgSettingService.setTitleRefreshInterval(value);
|
||||||
|
};
|
||||||
|
|
||||||
$scope.setGlobalStatRefreshInterval = function (value) {
|
$scope.setGlobalStatRefreshInterval = function (value) {
|
||||||
setNeedRefreshPage();
|
setNeedRefreshPage();
|
||||||
ariaNgSettingService.setGlobalStatRefreshInterval(value);
|
ariaNgSettingService.setGlobalStatRefreshInterval(value);
|
||||||
|
@ -161,6 +148,19 @@
|
||||||
ariaNgSettingService.setDownloadTaskRefreshInterval(value);
|
ariaNgSettingService.setDownloadTaskRefreshInterval(value);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$scope.setRPCListDisplayOrder = function (value) {
|
||||||
|
setNeedRefreshPage();
|
||||||
|
ariaNgSettingService.setRPCListDisplayOrder(value);
|
||||||
|
};
|
||||||
|
|
||||||
|
$scope.setAfterCreatingNewTask = function (value) {
|
||||||
|
ariaNgSettingService.setAfterCreatingNewTask(value);
|
||||||
|
};
|
||||||
|
|
||||||
|
$scope.setRemoveOldTaskAfterRestarting = function (value) {
|
||||||
|
ariaNgSettingService.setRemoveOldTaskAfterRestarting(value);
|
||||||
|
};
|
||||||
|
|
||||||
$scope.addNewRpcSetting = function () {
|
$scope.addNewRpcSetting = function () {
|
||||||
setNeedRefreshPage();
|
setNeedRefreshPage();
|
||||||
|
|
||||||
|
|
|
@ -287,12 +287,30 @@
|
||||||
setTitle: function (value) {
|
setTitle: function (value) {
|
||||||
setOption('title', value);
|
setOption('title', value);
|
||||||
},
|
},
|
||||||
|
getBrowserNotification: function () {
|
||||||
|
return getOption('browserNotification');
|
||||||
|
},
|
||||||
|
setBrowserNotification: function (value) {
|
||||||
|
setOption('browserNotification', value);
|
||||||
|
},
|
||||||
getTitleRefreshInterval: function () {
|
getTitleRefreshInterval: function () {
|
||||||
return getOption('titleRefreshInterval');
|
return getOption('titleRefreshInterval');
|
||||||
},
|
},
|
||||||
setTitleRefreshInterval: function (value) {
|
setTitleRefreshInterval: function (value) {
|
||||||
setOption('titleRefreshInterval', Math.max(parseInt(value), 0));
|
setOption('titleRefreshInterval', Math.max(parseInt(value), 0));
|
||||||
},
|
},
|
||||||
|
getGlobalStatRefreshInterval: function () {
|
||||||
|
return getOption('globalStatRefreshInterval');
|
||||||
|
},
|
||||||
|
setGlobalStatRefreshInterval: function (value) {
|
||||||
|
setOption('globalStatRefreshInterval', Math.max(parseInt(value), 0));
|
||||||
|
},
|
||||||
|
getDownloadTaskRefreshInterval: function () {
|
||||||
|
return getOption('downloadTaskRefreshInterval');
|
||||||
|
},
|
||||||
|
setDownloadTaskRefreshInterval: function (value) {
|
||||||
|
setOption('downloadTaskRefreshInterval', Math.max(parseInt(value), 0));
|
||||||
|
},
|
||||||
getRPCListDisplayOrder: function () {
|
getRPCListDisplayOrder: function () {
|
||||||
return getOption('rpcListDisplayOrder');
|
return getOption('rpcListDisplayOrder');
|
||||||
},
|
},
|
||||||
|
@ -311,12 +329,6 @@
|
||||||
setRemoveOldTaskAfterRestarting: function (value) {
|
setRemoveOldTaskAfterRestarting: function (value) {
|
||||||
setOption('removeOldTaskAfterRestarting', value);
|
setOption('removeOldTaskAfterRestarting', value);
|
||||||
},
|
},
|
||||||
getBrowserNotification: function () {
|
|
||||||
return getOption('browserNotification');
|
|
||||||
},
|
|
||||||
setBrowserNotification: function (value) {
|
|
||||||
setOption('browserNotification', value);
|
|
||||||
},
|
|
||||||
getCurrentRpcDisplayName: function () {
|
getCurrentRpcDisplayName: function () {
|
||||||
var options = getOptions();
|
var options = getOptions();
|
||||||
|
|
||||||
|
@ -503,18 +515,6 @@
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
getGlobalStatRefreshInterval: function () {
|
|
||||||
return getOption('globalStatRefreshInterval');
|
|
||||||
},
|
|
||||||
setGlobalStatRefreshInterval: function (value) {
|
|
||||||
setOption('globalStatRefreshInterval', Math.max(parseInt(value), 0));
|
|
||||||
},
|
|
||||||
getDownloadTaskRefreshInterval: function () {
|
|
||||||
return getOption('downloadTaskRefreshInterval');
|
|
||||||
},
|
|
||||||
setDownloadTaskRefreshInterval: function (value) {
|
|
||||||
setOption('downloadTaskRefreshInterval', Math.max(parseInt(value), 0));
|
|
||||||
},
|
|
||||||
getDisplayOrder: function () {
|
getDisplayOrder: function () {
|
||||||
var value = getOption('displayOrder');
|
var value = getOption('displayOrder');
|
||||||
|
|
||||||
|
|
|
@ -64,6 +64,18 @@
|
||||||
<em>[<span translate>Preview</span>] <span ng-bind="context.titlePreview"></span></em>
|
<em>[<span translate>Preview</span>] <span ng-bind="context.titlePreview"></span></em>
|
||||||
</div>
|
</div>
|
||||||
</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="row">
|
||||||
<div class="setting-key setting-key-without-desc col-sm-4">
|
<div class="setting-key setting-key-without-desc col-sm-4">
|
||||||
<span translate>Page Title Refresh Interval</span>
|
<span translate>Page Title Refresh Interval</span>
|
||||||
|
@ -77,18 +89,6 @@
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</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="row">
|
||||||
<div class="setting-key setting-key-without-desc col-sm-4">
|
<div class="setting-key setting-key-without-desc col-sm-4">
|
||||||
<span translate>Global Stat Refresh Interval</span>
|
<span translate>Global Stat Refresh Interval</span>
|
||||||
|
|
Reference in a new issue