Skip to content

Commit

Permalink
增加任务详情页复制时是否包括前缀的选项
Browse files Browse the repository at this point in the history
  • Loading branch information
liuhongyu authored and mayswind committed May 3, 2020
1 parent 6f3fe70 commit db66990
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/langs/zh_Hans.txt
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ Navigate to Downloading Tasks Page=转到正在下载列表页面
Stay on Current Page=留在当前页面
Remove Old Tasks After Retrying=重试任务后删除原任务
Confirm Task Removal=任务删除前确认
Task Detail Copy With Perfix=任务详情页复制时包括前缀
RPC List Display Order=RPC 列表显示顺序
Recently Used=最近使用
RPC Alias=RPC 别名
Expand Down
1 change: 1 addition & 0 deletions src/langs/zh_Hant.txt
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ Navigate to Downloading Tasks Page=轉到正在下載工作頁面
Stay on Current Page=留在目前頁面
Remove Old Tasks After Retrying=重試工作後刪除原工作
Confirm Task Removal=工作刪除前確認
Task Detail Copy With Perfix=任務詳情頁複製時包括前綴
RPC List Display Order=RPC 清單顯示順序
Recently Used=最近使用
RPC Alias=RPC 別名
Expand Down
1 change: 1 addition & 0 deletions src/scripts/config/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
afterCreatingNewTask: 'task-list',
removeOldTaskAfterRetrying: false,
confirmTaskRemoval: true,
taskDetailCopyWithPerfix: true,
afterRetryingTask: 'task-list-downloading',
displayOrder: 'default:asc',
fileListDisplayOrder: 'default:asc',
Expand Down
1 change: 1 addition & 0 deletions src/scripts/config/defaultLanguage.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@
'Stay on Current Page': 'Stay on Current Page',
'Remove Old Tasks After Retrying': 'Remove Old Tasks After Retrying',
'Confirm Task Removal': 'Confirm Task Removal',
'Task Detail Copy With Perfix': 'Task Detail Copy With Perfix',
'RPC List Display Order': 'RPC List Display Order',
'Recently Used': 'Recently Used',
'RPC Alias': 'RPC Alias',
Expand Down
4 changes: 4 additions & 0 deletions src/scripts/controllers/settings-ariang.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,10 @@
ariaNgSettingService.setConfirmTaskRemoval(value);
};

$scope.setTaskDetailCopyWithPerfix = function (value) {
ariaNgSettingService.setTaskDetailCopyWithPerfix(value);
};

$scope.setAfterRetryingTask = function (value) {
ariaNgSettingService.setAfterRetryingTask(value);
};
Expand Down
7 changes: 6 additions & 1 deletion src/scripts/controllers/task-detail.js
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,12 @@
return;
}

var value = "";
var value = '';

if (ariaNgSettingService.getTaskDetailCopyWithPerfix()) {
var name = currentRowTriggeredMenu.find('.setting-key > span').text().trim();
value = name + ': ';
};

currentRowTriggeredMenu.find('.setting-value > span').each(function (i, element) {
if (i > 0) {
Expand Down
6 changes: 6 additions & 0 deletions src/scripts/services/ariaNgSettingService.js
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,12 @@
setConfirmTaskRemoval: function (value) {
setOption('confirmTaskRemoval', value);
},
getTaskDetailCopyWithPerfix: function () {
return getOption('taskDetailCopyWithPerfix');
},
setTaskDetailCopyWithPerfix: function (value) {
setOption('taskDetailCopyWithPerfix', value);
},
getAfterRetryingTask: function () {
return getOption('afterRetryingTask');
},
Expand Down
11 changes: 11 additions & 0 deletions src/views/settings-ariang.html
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,17 @@
</select>
</div>
</div>
<div class="row">
<div class="setting-key setting-key-without-desc col-sm-4">
<span translate>Task Detail Copy With Perfix</span>
</div>
<div class="setting-value col-sm-8">
<select class="form-control" style="width: 100%;" ng-model="context.settings.taskDetailCopyWithPerfix"
ng-change="setTaskDetailCopyWithPerfix(context.settings.taskDetailCopyWithPerfix)"
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>Import / Export AriaNg Settings</span>
Expand Down

0 comments on commit db66990

Please sign in to comment.