diff --git a/bower.json b/bower.json index dca6e37..40d939a 100644 --- a/bower.json +++ b/bower.json @@ -51,6 +51,7 @@ "angular-busy": "^4.1.4", "angular-promise-buttons": "^0.1.21", "angular-dragula": "^1.2.8", + "angular-clipboard": "^1.6.2", "ngSweetAlert": "^1.1.2" }, "resolutions": { diff --git a/src/index.html b/src/index.html index 4d5811e..625afe9 100644 --- a/src/index.html +++ b/src/index.html @@ -327,6 +327,7 @@ + diff --git a/src/langs/zh_Hans.txt b/src/langs/zh_Hans.txt index 339cc85..da741bb 100644 --- a/src/langs/zh_Hans.txt +++ b/src/langs/zh_Hans.txt @@ -87,6 +87,7 @@ Seed Creation Time=种子创建时间 Download Url=下载地址 Download Dir=下载路径 BT Tracker Servers=BT 服务器 +Copy=复制 (Choose Files)=(选择文件) Videos=视频 Audios=音频 diff --git a/src/langs/zh_Hant.txt b/src/langs/zh_Hant.txt index 3345c40..55cb893 100644 --- a/src/langs/zh_Hant.txt +++ b/src/langs/zh_Hant.txt @@ -87,6 +87,7 @@ Seed Creation Time=種子創建時間 Download Url=下載地址 Download Dir=下載路徑 BT Tracker Servers=BT 伺服器 +Copy=複製 (Choose Files)=(選擇文件) Videos=視頻 Audios=音頻 diff --git a/src/scripts/config/defaultLanguage.js b/src/scripts/config/defaultLanguage.js index 560a342..05d0698 100644 --- a/src/scripts/config/defaultLanguage.js +++ b/src/scripts/config/defaultLanguage.js @@ -91,6 +91,7 @@ 'Download Url': 'Download Url', 'Download Dir': 'Download Dir', 'BT Tracker Servers': 'BT Tracker Servers', + 'Copy': 'Copy', '(Choose Files)': '(Choose Files)', 'Videos': 'Videos', 'Audios': 'Audios', diff --git a/src/scripts/controllers/task-detail.js b/src/scripts/controllers/task-detail.js index a2697e9..baa8ffe 100644 --- a/src/scripts/controllers/task-detail.js +++ b/src/scripts/controllers/task-detail.js @@ -1,7 +1,7 @@ (function () { 'use strict'; - angular.module('ariaNg').controller('TaskDetailController', ['$rootScope', '$scope', '$routeParams', '$interval', 'aria2RpcErrors', 'ariaNgFileTypes', 'ariaNgCommonService', 'ariaNgSettingService', 'ariaNgMonitorService', 'aria2TaskService', 'aria2SettingService', function ($rootScope, $scope, $routeParams, $interval, aria2RpcErrors, ariaNgFileTypes, ariaNgCommonService, ariaNgSettingService, ariaNgMonitorService, aria2TaskService, aria2SettingService) { + angular.module('ariaNg').controller('TaskDetailController', ['$rootScope', '$scope', '$routeParams', '$interval', 'clipboard', 'aria2RpcErrors', 'ariaNgFileTypes', 'ariaNgCommonService', 'ariaNgSettingService', 'ariaNgMonitorService', 'aria2TaskService', 'aria2SettingService', function ($rootScope, $scope, $routeParams, $interval, clipboard, aria2RpcErrors, ariaNgFileTypes, ariaNgCommonService, ariaNgSettingService, ariaNgMonitorService, aria2TaskService, aria2SettingService) { var tabOrders = ['overview', 'blocks', 'filelist', 'btpeers']; var downloadTaskRefreshPromise = null; var pauseDownloadTaskRefresh = false; @@ -325,6 +325,25 @@ } }); + angular.element('#overview-items .row').contextmenu({ + target:'#task-overview-contextmenu', + onItem: function (context, e) { + var name = context.find('.setting-key > span').text().trim(); + var value = ""; + + context.find('.setting-value > span').each(function (i, element) { + if (i > 0) { + value += '\n'; + } + + value += angular.element(element).text().trim(); + }); + + var info = name + ': ' + value; + clipboard.copyText(info); + } + }); + $rootScope.loadPromise = refreshDownloadTask(false); }]); }()); diff --git a/src/scripts/core/app.js b/src/scripts/core/app.js index 6a6a359..630cde2 100644 --- a/src/scripts/core/app.js +++ b/src/scripts/core/app.js @@ -19,6 +19,7 @@ 'cgBusy', 'angularPromiseButtons', 'oitozero.ngSweetAlert', + 'angular-clipboard', angularDragula(angular) ]); }()); diff --git a/src/styles/controls/settings-table.css b/src/styles/controls/settings-table.css index d46af4e..cc214ea 100644 --- a/src/styles/controls/settings-table.css +++ b/src/styles/controls/settings-table.css @@ -24,6 +24,10 @@ border-top: inherit; } +.settings-table + .settings-table > div.row:first-child { + border-top: 1px solid #ddd; +} + .settings-table .input-group-addon { background-color: #eee; } @@ -36,6 +40,7 @@ color: #888; font-size: 12px; font-weight: normal; + font-style: normal; } .settings-table .description { @@ -91,6 +96,10 @@ padding: 4px 8px 4px 8px; } +.settings-table .multi-line { + display: block; +} + @media (max-width: 767px) { .settings-table .setting-key { font-weight: bold; diff --git a/src/views/task-detail.html b/src/views/task-detail.html index d055613..346d574 100644 --- a/src/views/task-detail.html +++ b/src/views/task-detail.html @@ -22,8 +22,8 @@
-
-
+
+
Task Name
@@ -32,7 +32,7 @@ ng-tooltip="{{(task.bittorrent && task.bittorrent.comment) ? task.bittorrent.comment : task.taskName}}">
-
+
Task Size
@@ -43,7 +43,7 @@
-
+
Task Status
@@ -53,7 +53,7 @@ ng-tooltip="{{task.errorMessage}}" ng-tooltip-container="body" ng-tooltip-placement="top">
-
+
Error Description
@@ -61,7 +61,7 @@
-
+
@@ -69,7 +69,7 @@
-
+
Download
@@ -77,7 +77,7 @@
-
+
Upload
@@ -85,7 +85,7 @@
-
+
Share Ratio
@@ -93,7 +93,7 @@
-
+
Remain Time
@@ -101,7 +101,7 @@
-
+
Connections
@@ -109,7 +109,7 @@
-
+
Seed Creation Time
@@ -117,7 +117,7 @@
-
+
Info Hash
@@ -125,7 +125,7 @@
-
+
Download Url
@@ -133,7 +133,7 @@
-
+
Download Dir
@@ -141,20 +141,22 @@
-
+
BT Tracker Servers - +
-
+
+
+
@@ -337,4 +339,14 @@
+
+ +