From 5bf57862ff8cf9419ef6f701a4e46c97b94d603b Mon Sep 17 00:00:00 2001 From: OldHawk Date: Wed, 18 Oct 2017 18:16:18 +0800 Subject: [PATCH] feat(about): show client black list item --- config/env/torrents.js | 16 +++++----- .../controllers/about.client.controller.js | 7 +++-- modules/about/client/less/about.less | 30 +++++++++++++++++++ .../about/client/views/black.client.view.html | 18 +++++++++++ modules/core/client/app/trans-string-en.js | 5 ++-- modules/core/client/app/trans-string-zh.js | 5 ++-- 6 files changed, 66 insertions(+), 15 deletions(-) create mode 100644 modules/about/client/less/about.less diff --git a/config/env/torrents.js b/config/env/torrents.js index 34c111a3..e6aadb8a 100644 --- a/config/env/torrents.js +++ b/config/env/torrents.js @@ -540,18 +540,18 @@ module.exports = { * @clientBlackList * * download client black list - * all the list client can not download the torrent data + * all the list client can not announce or get any data * * @name: client software name */ clientBlackList: [ - {name: 'Transmission/2.93'}, - {name: 'Mozilla'}, - {name: 'AppleWebKit'}, - {name: 'Safari'}, - {name: 'Chrome'}, - {name: 'Lynx'}, - {name: 'Opera'} + {name: 'Transmission/2.93', type: 'client'}, + {name: 'Mozilla', type: 'browser'}, + {name: 'AppleWebKit', type: 'browser'}, + {name: 'Safari', type: 'browser'}, + {name: 'Chrome', type: 'browser'}, + {name: 'Lynx', type: 'browser'}, + {name: 'Opera', type: 'browser'} ], /** diff --git a/modules/about/client/controllers/about.client.controller.js b/modules/about/client/controllers/about.client.controller.js index cf8afbf7..0c967972 100644 --- a/modules/about/client/controllers/about.client.controller.js +++ b/modules/about/client/controllers/about.client.controller.js @@ -5,11 +5,12 @@ .module('about') .controller('AboutController', AboutController); - AboutController.$inject = ['$scope', '$translate', 'getStorageLangService']; + AboutController.$inject = ['$scope', 'MeanTorrentConfig']; - function AboutController($scope, $translate, getStorageLangService) { + function AboutController($scope, MeanTorrentConfig) { var vm = this; - vm.lang = getStorageLangService.getLang(); + vm.blackListConfig = MeanTorrentConfig.meanTorrentConfig.clientBlackList; + vm.announce = MeanTorrentConfig.meanTorrentConfig.announce; vm.init = function () { diff --git a/modules/about/client/less/about.less b/modules/about/client/less/about.less new file mode 100644 index 00000000..795918c1 --- /dev/null +++ b/modules/about/client/less/about.less @@ -0,0 +1,30 @@ +@import (reference) "../../../core/client/less/mt-var.less"; + +.black-list { + .black-item { + position: relative; + border: solid 1px #333; + border-radius: 4px; + background-color: #555; + padding: 10px 0 15px 0; + margin: 20px 0 0 0; + overflow: hidden; + + .fa { + font-size: 8em; + } + h4 { + color: #ddd; + } + span { + color: #999; + } + } + + .black-icon { + position: absolute; + top: -30px; + right: -30px; + opacity: 0.3; + } +} \ No newline at end of file diff --git a/modules/about/client/views/black.client.view.html b/modules/about/client/views/black.client.view.html index 9e16cf8d..e4178844 100644 --- a/modules/about/client/views/black.client.view.html +++ b/modules/about/client/views/black.client.view.html @@ -6,6 +6,24 @@ {{'ABOUT.CLIENT_BLACK_LIST' | translate}} + +
+ +
+ +
+
+
+
+

{{b.name}}

+ {{b.type}} + +
+
+
+
\ No newline at end of file diff --git a/modules/core/client/app/trans-string-en.js b/modules/core/client/app/trans-string-en.js index 9adaeb4e..8258693d 100644 --- a/modules/core/client/app/trans-string-en.js +++ b/modules/core/client/app/trans-string-en.js @@ -275,7 +275,7 @@ }, MY_TORRENT_RULES: { 0: 'This torrent file is uploaded by yourself, you have actions bellow.', - 1: 'For additional assistance, please contact our administrator: {{admin}}' + 1: 'For additional assistance, please contact our administrator.' }, TORRENT_SEED_USERS: 'Seed Users', TORRENT_LEECHER_USERS: 'Leecher Users', @@ -464,7 +464,8 @@ ABOUT: { CLIENT_BLACK_LIST: 'Client Black List', MAKER_GROUP: 'Torrents Maker Group', - MAKER_GROUP_ADMIN: 'Torrents Maker Group Configure' + MAKER_GROUP_ADMIN: 'Torrents Maker Group Configure', + BLACK_TOOLTIP: '

Note:

All the clients in the list was forbidden by server and can not announce or get any torrent data, For more help, please contact our administrator.' }, //collections views diff --git a/modules/core/client/app/trans-string-zh.js b/modules/core/client/app/trans-string-zh.js index 403c3e40..b701b00a 100644 --- a/modules/core/client/app/trans-string-zh.js +++ b/modules/core/client/app/trans-string-zh.js @@ -275,7 +275,7 @@ }, MY_TORRENT_RULES: { 0: '这个种子文件是由你自己上传的,你可以对其做如下操作.', - 1: '如需其它帮助,请与我们的管理员联系:{{admin}}.' + 1: '如需其它帮助,请与我们的 系统管理员 联系.' }, TORRENT_SEED_USERS: '做种用户列表', TORRENT_LEECHER_USERS: '下载用户列表', @@ -464,7 +464,8 @@ ABOUT: { CLIENT_BLACK_LIST: '禁止客户端列表', MAKER_GROUP: '资源压制小组', - MAKER_GROUP_ADMIN: '资源压制小组配置管理' + MAKER_GROUP_ADMIN: '资源压制小组配置管理', + BLACK_TOOLTIP: '

提示:

下面列出的所有客户端都已被服务器禁止,使用它们将不能下载到任何数据, 如需其它帮助,请与我们的 系统管理员 联系.' }, //collections views