support setting rpc list display order
This commit is contained in:
parent
766761d2f0
commit
a30f530996
|
@ -154,6 +154,9 @@ Action After Creating New Tasks=创建新任务后执行操作
|
||||||
Removing Old Task After Restarting=重试任务后删除原任务
|
Removing Old Task After Restarting=重试任务后删除原任务
|
||||||
Navigate to Task List Page=转到任务列表页面
|
Navigate to Task List Page=转到任务列表页面
|
||||||
Navigate to Task Detail Page=转到任务详情页面
|
Navigate to Task Detail Page=转到任务详情页面
|
||||||
|
RPC List Display Order=RPC 列表显示顺序
|
||||||
|
Recently Used=最近使用
|
||||||
|
RPC Alias=RPC 别名
|
||||||
Supported Placeholder=支持的占位符
|
Supported Placeholder=支持的占位符
|
||||||
AriaNg Title=AriaNg 标题
|
AriaNg Title=AriaNg 标题
|
||||||
Downloading Count=正在下载数量
|
Downloading Count=正在下载数量
|
||||||
|
|
|
@ -154,6 +154,9 @@ Action After Creating New Tasks=建立新工作後執行操作
|
||||||
Removing Old Task After Restarting=重試工作後刪除原工作
|
Removing Old Task After Restarting=重試工作後刪除原工作
|
||||||
Navigate to Task List Page=轉到工作清單頁面
|
Navigate to Task List Page=轉到工作清單頁面
|
||||||
Navigate to Task Detail Page=轉到工作詳情頁面
|
Navigate to Task Detail Page=轉到工作詳情頁面
|
||||||
|
RPC List Display Order=RPC 清單顯示順序
|
||||||
|
Recently Used=最近使用
|
||||||
|
RPC Alias=RPC 別名
|
||||||
Supported Placeholder=支援的預留位置
|
Supported Placeholder=支援的預留位置
|
||||||
AriaNg Title=AriaNg 標題
|
AriaNg Title=AriaNg 標題
|
||||||
Downloading Count=正在下載數量
|
Downloading Count=正在下載數量
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
extendRpcServers: [],
|
extendRpcServers: [],
|
||||||
globalStatRefreshInterval: 1000,
|
globalStatRefreshInterval: 1000,
|
||||||
downloadTaskRefreshInterval: 1000,
|
downloadTaskRefreshInterval: 1000,
|
||||||
|
rpcListDisplayOrder: 'recentlyUsed',
|
||||||
afterCreatingNewTask: 'task-list',
|
afterCreatingNewTask: 'task-list',
|
||||||
removeOldTaskAfterRestarting: false
|
removeOldTaskAfterRestarting: false
|
||||||
});
|
});
|
||||||
|
|
|
@ -158,6 +158,9 @@
|
||||||
'Removing Old Task After Restarting': 'Removing Old Task After Restarting',
|
'Removing Old Task After Restarting': 'Removing Old Task After Restarting',
|
||||||
'Navigate to Task List Page': 'Navigate to Task List Page',
|
'Navigate to Task List Page': 'Navigate to Task List Page',
|
||||||
'Navigate to Task Detail Page': 'Navigate to Task Detail Page',
|
'Navigate to Task Detail Page': 'Navigate to Task Detail Page',
|
||||||
|
'RPC List Display Order': 'RPC List Display Order',
|
||||||
|
'Recently Used': 'Recently Used',
|
||||||
|
'RPC Alias': 'RPC Alias',
|
||||||
'Supported Placeholder': 'Supported Placeholder',
|
'Supported Placeholder': 'Supported Placeholder',
|
||||||
'AriaNg Title': 'AriaNg Title',
|
'AriaNg Title': 'AriaNg Title',
|
||||||
'Downloading Count': 'Downloading Count',
|
'Downloading Count': 'Downloading Count',
|
||||||
|
|
|
@ -107,6 +107,11 @@
|
||||||
$scope.updateTitlePreview();
|
$scope.updateTitlePreview();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$scope.setRPCListDisplayOrder = function (value) {
|
||||||
|
setNeedRefreshPage();
|
||||||
|
ariaNgSettingService.setRPCListDisplayOrder(value);
|
||||||
|
};
|
||||||
|
|
||||||
$scope.setAfterCreatingNewTask = function (value) {
|
$scope.setAfterCreatingNewTask = function (value) {
|
||||||
ariaNgSettingService.setAfterCreatingNewTask(value);
|
ariaNgSettingService.setAfterCreatingNewTask(value);
|
||||||
};
|
};
|
||||||
|
|
|
@ -239,6 +239,22 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var displayOrder = this.getRPCListDisplayOrder();
|
||||||
|
|
||||||
|
if (displayOrder === 'recentlyUsed') {
|
||||||
|
// Do Nothing
|
||||||
|
} else if (displayOrder === 'rpcAlias') {
|
||||||
|
result.sort(function (rpc1, rpc2) {
|
||||||
|
if (rpc1.rpcAlias < rpc2.rpcAlias) {
|
||||||
|
return -1;
|
||||||
|
} else if (rpc1.rpcAlias > rpc2.rpcAlias) {
|
||||||
|
return 1;
|
||||||
|
} else {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
},
|
},
|
||||||
getAllSessionOptions: function () {
|
getAllSessionOptions: function () {
|
||||||
|
@ -277,6 +293,12 @@
|
||||||
setTitleRefreshInterval: function (value) {
|
setTitleRefreshInterval: function (value) {
|
||||||
setOption('titleRefreshInterval', Math.max(parseInt(value), 0));
|
setOption('titleRefreshInterval', Math.max(parseInt(value), 0));
|
||||||
},
|
},
|
||||||
|
getRPCListDisplayOrder: function () {
|
||||||
|
return getOption('rpcListDisplayOrder');
|
||||||
|
},
|
||||||
|
setRPCListDisplayOrder: function (value) {
|
||||||
|
setOption('rpcListDisplayOrder', value);
|
||||||
|
},
|
||||||
getAfterCreatingNewTask: function () {
|
getAfterCreatingNewTask: function () {
|
||||||
return getOption('afterCreatingNewTask');
|
return getOption('afterCreatingNewTask');
|
||||||
},
|
},
|
||||||
|
|
|
@ -115,6 +115,19 @@
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="setting-key setting-key-without-desc col-sm-4">
|
||||||
|
<span translate>RPC List Display Order</span>
|
||||||
|
<span class="asterisk">*</span>
|
||||||
|
</div>
|
||||||
|
<div class="setting-value col-sm-8">
|
||||||
|
<select class="form-control" style="width: 100%;" ng-model="context.settings.rpcListDisplayOrder"
|
||||||
|
ng-change="setRPCListDisplayOrder(context.settings.rpcListDisplayOrder)">
|
||||||
|
<option value="recentlyUsed" translate>Recently Used</option>
|
||||||
|
<option value="rpcAlias" translate>RPC Alias</option>
|
||||||
|
</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>Action After Creating New Tasks</span>
|
<span translate>Action After Creating New Tasks</span>
|
||||||
|
|
Reference in a new issue