feat(torrents): show review button in detail page admin panel

This commit is contained in:
OldHawk
2018-05-15 11:17:37 +08:00
parent 7138c4983e
commit e319f0c0fc
2 changed files with 17 additions and 0 deletions

View File

@@ -146,6 +146,20 @@
});
};
/**
* reviewedTorrentStatus
* @param item
*/
vm.reviewedTorrentStatus = function () {
vm.torrentLocalInfo.$setReviewedStatus(function (res) {
mtDebug.info(res);
vm.torrentLocalInfo = res;
NotifycationService.showSuccessNotify('TORRENT_SETREVIEWED_SUCCESSFULLY');
}, function (res) {
NotifycationService.showErrorNotify(res.data.message, 'TORRENT_SETREVIEWED_ERROR');
});
};
/**
* toggleHnR
*/

View File

@@ -1043,6 +1043,9 @@
ng-click="vm.updateTorrent();">
{{ 'ADMIN_BASIC_UPDATE' | translate}}
</button>
<button class="btn btn-mt btn-sm" ng-show="vm.torrentLocalInfo.torrent_status == 'new'"
ng-click="vm.reviewedTorrentStatus();">{{ 'ADMIN_BASIC_REVIEWED' | translate}}
</button>
<button class="btn btn-default btn-sm" ng-click="vm.deleteTorrent();">{{ 'ADMIN_BASIC_DELETE' | translate}}</button>
<button class="btn btn-default btn-sm"
ng-click="vm.toggleHnR();">{{ (vm.torrentLocalInfo.torrent_hnr ? 'ADMIN_BASIC_UNSET_HNR' : 'ADMIN_BASIC_SET_HNR') | translate}}