From 7d0a2eaf9fdb009a2ef217bb3966197628cb21d9 Mon Sep 17 00:00:00 2001 From: OldHawk Date: Tue, 12 Sep 2017 17:47:33 +0800 Subject: [PATCH] feat(H&R): show H&R warning tooltip info in list page --- .../client/controllers/status/warning.client.controller.js | 7 ++++--- modules/users/client/templates/status-hnr-warning-en.md | 4 ++++ modules/users/client/templates/status-hnr-warning-zh.md | 4 ++++ modules/users/client/views/status/warning.client.view.html | 6 ++++++ 4 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 modules/users/client/templates/status-hnr-warning-en.md create mode 100644 modules/users/client/templates/status-hnr-warning-zh.md diff --git a/modules/users/client/controllers/status/warning.client.controller.js b/modules/users/client/controllers/status/warning.client.controller.js index d5242569..eef0f580 100644 --- a/modules/users/client/controllers/status/warning.client.controller.js +++ b/modules/users/client/controllers/status/warning.client.controller.js @@ -6,16 +6,17 @@ .controller('WarningController', WarningController); WarningController.$inject = ['$rootScope', '$state', '$translate', '$timeout', 'Authentication', 'Notification', 'PeersService', 'CompleteService', - 'MeanTorrentConfig', '$window', '$filter', 'DownloadService', 'NotifycationService', 'ModalConfirmService']; + 'MeanTorrentConfig', '$window', '$filter', 'DownloadService', 'NotifycationService', 'ModalConfirmService', 'getStorageLangService']; function WarningController($rootScope, $state, $translate, $timeout, Authentication, Notification, PeersService, CompleteService, MeanTorrentConfig, - $window, $filter, DownloadService, NotifycationService, ModalConfirmService) { + $window, $filter, DownloadService, NotifycationService, ModalConfirmService, getStorageLangService) { var vm = this; vm.user = Authentication.user; vm.tmdbConfig = MeanTorrentConfig.meanTorrentConfig.tmdbConfig; vm.resourcesTags = MeanTorrentConfig.meanTorrentConfig.resourcesTags; vm.torrentSalesType = MeanTorrentConfig.meanTorrentConfig.torrentSalesType; vm.hnrConfig = MeanTorrentConfig.meanTorrentConfig.hitAndRun; + vm.lang = getStorageLangService.getLang(); vm.searchTags = []; @@ -118,7 +119,7 @@ ModalConfirmService.showModal({}, modalOptions) .then(function (result) { - if (vm.user.score >= vm.hnrConfig.scoreToRemoveWarning) { + if (vm.user.score < vm.hnrConfig.scoreToRemoveWarning) { CompleteService.update({ completeId: comp._id }, function (response) { diff --git a/modules/users/client/templates/status-hnr-warning-en.md b/modules/users/client/templates/status-hnr-warning-en.md new file mode 100644 index 00000000..7ae453c2 --- /dev/null +++ b/modules/users/client/templates/status-hnr-warning-en.md @@ -0,0 +1,4 @@ +#### Note: +1. If the HnR warning numbers is more than __{{vm.hnrConfig.forbiddenDownloadMinWarningNumber}}__, you can not to download any torrents. +1. You can remove a warning with __{{vm.hnrConfig.scoreToRemoveWarning}}__ scores. +1. If you have no enough scores, you can [donate a vip](/vip), The HnR warning is immune to VIP user. \ No newline at end of file diff --git a/modules/users/client/templates/status-hnr-warning-zh.md b/modules/users/client/templates/status-hnr-warning-zh.md new file mode 100644 index 00000000..1335f21a --- /dev/null +++ b/modules/users/client/templates/status-hnr-warning-zh.md @@ -0,0 +1,4 @@ +#### 特别说明: +1. 如果您的 HnR 警告数超过 __{{vm.hnrConfig.forbiddenDownloadMinWarningNumber}}__ 个, 您将不能再下载任何种子文件. +1. 您可以使用 __{{vm.hnrConfig.scoreToRemoveWarning}}__ 积分来消除一个 HnR 警告. +1. 如果您的积分不足, 你还可以 [捐赠一个VIP](/vip), HnR 警告对 VIP 用户不生效. \ No newline at end of file diff --git a/modules/users/client/views/status/warning.client.view.html b/modules/users/client/views/status/warning.client.view.html index b049dc88..d1674df7 100644 --- a/modules/users/client/views/status/warning.client.view.html +++ b/modules/users/client/views/status/warning.client.view.html @@ -1,6 +1,12 @@
+
+
+
+
+
+