feat(H&R): show H&R warning tooltip info in list page

This commit is contained in:
OldHawk
2017-09-12 17:47:33 +08:00
parent 19328c205c
commit 7d0a2eaf9f
4 changed files with 18 additions and 3 deletions

View File

@@ -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) {

View File

@@ -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.

View File

@@ -0,0 +1,4 @@
#### 特别说明:
1. 如果您的 HnR 警告数超过 __{{vm.hnrConfig.forbiddenDownloadMinWarningNumber}}__ 个, 您将不能再下载任何种子文件.
1. 您可以使用 __{{vm.hnrConfig.scoreToRemoveWarning}}__ 积分来消除一个 HnR 警告.
1. 如果您的积分不足, 你还可以 [捐赠一个VIP](/vip), HnR 警告对 VIP 用户不生效.

View File

@@ -1,6 +1,12 @@
<section ng-controller="WarningController as vm" ng-init="vm.getWarningTorrent();">
<div class="row margin-top-20">
<div class="col-md-12 torrent-list" id="top_of_torrent_list" ng-show="vm.warningList">
<div class="row margin-top-10 bg-danger">
<div class="col-sm-10 col-sm-offset-1">
<div marked src="'/modules/users/client/templates/status-hnr-warning-'+vm.lang+'.md'" compile="true">
</div>
</div>
</div>
<div class="table-responsive margin-top-50">
<table class="table table-hover tb-v-middle">