diff --git a/modules/core/client/app/trans-string-en.js b/modules/core/client/app/trans-string-en.js index 1b542ae7..a80fab70 100644 --- a/modules/core/client/app/trans-string-en.js +++ b/modules/core/client/app/trans-string-en.js @@ -207,6 +207,7 @@ CA_KEYWORD: 'Keyword', CA_TORRENT_STATUS: 'Torrent status', CA_TORRENT_HNR: 'Hit and Run', + CA_TORRENT_VIP: 'VIP resources', CA_RESOURCE_TYPE: 'Resource type', PH_KEYWORD: 'Search keyword', CLEAR_ALL_CONDITION: 'Clear All Condition', diff --git a/modules/core/client/app/trans-string-zh.js b/modules/core/client/app/trans-string-zh.js index 224dd0a4..83f50bed 100644 --- a/modules/core/client/app/trans-string-zh.js +++ b/modules/core/client/app/trans-string-zh.js @@ -207,6 +207,7 @@ CA_KEYWORD: '关键字', CA_TORRENT_STATUS: '种子状态', CA_TORRENT_HNR: 'Hit and Run', + CA_TORRENT_VIP: 'VIP 资源', CA_RESOURCE_TYPE: '资源类型', PH_KEYWORD: '搜索关键字', CLEAR_ALL_CONDITION: '清空所有条件', diff --git a/modules/core/client/less/mt.less b/modules/core/client/less/mt.less index 3bb3f88c..7e969aa0 100644 --- a/modules/core/client/less/mt.less +++ b/modules/core/client/less/mt.less @@ -614,7 +614,7 @@ body { min-width: 90px; } .td-admin-cmd { - min-width: 140px; + min-width: 143px; } } @@ -741,6 +741,22 @@ body { } } +.label-vip-info { + color: @mt-base-color; + font-weight: bold; + background-color: #f1f8ff; + &:hover { + cursor: pointer; + color: #f00; + } + &:active { + color: #0366d6; + } + &.used { + background-color: #c9e4ff !important; + } +} + .label-se-info { color: @mt-base-color; background-color: #f1f8ff; @@ -800,6 +816,14 @@ body { } } +.checkbox-vip { + margin-top: 0; + margin-bottom: 0; + input[type="checkbox"] { + margin-top: 8px; + } +} + .incline-block-valign { display: inline-block; vertical-align: middle; diff --git a/modules/torrents/client/controllers/admin/admin-list.client.controller.js b/modules/torrents/client/controllers/admin/admin-list.client.controller.js index f0cea03e..36a84c3e 100644 --- a/modules/torrents/client/controllers/admin/admin-list.client.controller.js +++ b/modules/torrents/client/controllers/admin/admin-list.client.controller.js @@ -25,6 +25,7 @@ vm.searchKey = ''; vm.releaseYear = undefined; vm.filterHnR = false; + vm.filterVIP = false; vm.torrentStatus = 'reviewed'; vm.torrentRLevel = 'none'; @@ -187,7 +188,8 @@ torrent_type: vm.selectedType, torrent_release: vm.releaseYear, torrent_tags: vm.searchTags, - torrent_hnr: vm.filterHnR + torrent_hnr: vm.filterHnR, + torrent_vip: vm.filterVIP }, function (items) { if (items.length === 0) { Notification.error({ @@ -279,6 +281,17 @@ vm.torrentBuildPager(); }; + /** + * onVIPClicked, onVIPChanged + */ + vm.onVIPClicked = function () { + vm.filterVIP = !vm.filterVIP; + vm.torrentBuildPager(); + }; + vm.onVIPChanged = function () { + vm.torrentBuildPager(); + }; + /** * onRLevelClicked * @param y diff --git a/modules/torrents/client/controllers/torrent-info.client.controller.js b/modules/torrents/client/controllers/torrent-info.client.controller.js index e5b87e51..7bd57db4 100644 --- a/modules/torrents/client/controllers/torrent-info.client.controller.js +++ b/modules/torrents/client/controllers/torrent-info.client.controller.js @@ -148,6 +148,19 @@ }); }; + /** + * toggleVIP + */ + vm.toggleVIP = function () { + vm.torrentLocalInfo.$toggleVIPStatus(function (res) { + mtDebug.info(res); + vm.torrentLocalInfo = res; + NotifycationService.showSuccessNotify('TORRENT_TOGGLE_VIP_SUCCESSFULLY'); + }, function (res) { + NotifycationService.showErrorNotify(res.data.message, 'TORRENT_TOGGLE_VIP_FAILED'); + }); + }; + /** * doScrape */ diff --git a/modules/torrents/client/views/admin/admin-list.client.view.html b/modules/torrents/client/views/admin/admin-list.client.view.html index 74cc3835..25491bc9 100644 --- a/modules/torrents/client/views/admin/admin-list.client.view.html +++ b/modules/torrents/client/views/admin/admin-list.client.view.html @@ -51,6 +51,15 @@ +