mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-01-30 19:19:20 +01:00
feat(torrent): automatic move torrent to vip area when uploader select the source is a vip source
This commit is contained in:
@@ -575,6 +575,9 @@
|
||||
SELECT_MAKER_GROUP: '• Please select resources group upload from and anonymous option',
|
||||
MAKER_NULL: 'NULL',
|
||||
UPLOADER_ANONYMOUS: 'Anonymous Upload (The user wont see me as an uploader)',
|
||||
SELECT_VIP_PROPERTY: '• Please select the VIP property of torrent',
|
||||
IS_VIP_RESOURCES: 'set VIP property of this torrent',
|
||||
IS_VIP_RESOURCES_TIP: 'TIP: If this is a VIP resource, please select the button below and the system will automatically assign this resource to the VIP zone.',
|
||||
ANONYMOUS: 'Anonymous',
|
||||
TORRENTS_SUBMIT_UPLOAD: '• Agree the rules and submit your resources',
|
||||
SUBMIT_BUTTON: 'OK, SUBMIT NOW',
|
||||
|
||||
@@ -575,6 +575,9 @@
|
||||
SELECT_MAKER_GROUP: '• 請選擇您上傳時使用的資源小組',
|
||||
MAKER_NULL: '無',
|
||||
UPLOADER_ANONYMOUS: '匿名上傳(用戶不會看到我是上傳者)',
|
||||
SELECT_VIP_PROPERTY: '• 请选择是否设置资源的 VIP 属性',
|
||||
IS_VIP_RESOURCES_TIP: '提示:如果这是一个 VIP 资源,请选中下面的按钮,系统会自动将此资源归入 VIP 专区。',
|
||||
IS_VIP_RESOURCES: '为此资源设置 VIP 属性',
|
||||
ANONYMOUS: '匿名',
|
||||
TORRENTS_SUBMIT_UPLOAD: '• 同意上傳協議,並提交',
|
||||
SUBMIT_BUTTON: '已備妥,現在提交',
|
||||
|
||||
@@ -575,6 +575,9 @@
|
||||
SELECT_MAKER_GROUP: '• 请选择您上传时使用的资源小组',
|
||||
MAKER_NULL: '无',
|
||||
UPLOADER_ANONYMOUS: '匿名上传(用户不会看到我是上传者)',
|
||||
SELECT_VIP_PROPERTY: '• 请选择是否设置资源的 VIP 属性',
|
||||
IS_VIP_RESOURCES_TIP: '提示:如果这是一个 VIP 资源,请选中下面的按钮,系统会自动将此资源归入 VIP 专区。',
|
||||
IS_VIP_RESOURCES: '为此资源设置 VIP 属性',
|
||||
ANONYMOUS: '匿名',
|
||||
TORRENTS_SUBMIT_UPLOAD: '• 同意上传协议,并提交',
|
||||
SUBMIT_BUTTON: '已备妥,现在提交',
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
function stateChangeStart(event, toState, toParams, fromState, fromParams) {
|
||||
$('.side-background').remove();
|
||||
$('.textcomplete-dropdown').remove();
|
||||
$('#uploaded_popup_wrapper').remove();
|
||||
$('#uploaded_popup_background').remove();
|
||||
// Check authentication before changing state
|
||||
if (toState.data && toState.data.roles && toState.data.roles.length > 0) {
|
||||
var allowed = false;
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
vm.tags = [];
|
||||
vm.maker = 'NULL';
|
||||
vm.anonymous = false;
|
||||
vm.isVipProperty = false;
|
||||
vm.videoNfo = '';
|
||||
vm.customTorrent = {};
|
||||
vm.resourceImagesList = [];
|
||||
@@ -413,6 +414,22 @@
|
||||
return v;
|
||||
}
|
||||
|
||||
/**
|
||||
* selectedTypeRole
|
||||
* @param type
|
||||
* @returns {string}
|
||||
*/
|
||||
vm.selectedTypeRole = function (type) {
|
||||
var v = 'user';
|
||||
angular.forEach(vm.torrentType.value, function (t) {
|
||||
if (t.value === type) {
|
||||
v = t.role;
|
||||
}
|
||||
});
|
||||
|
||||
return v;
|
||||
};
|
||||
|
||||
/**
|
||||
* getIncludeUploadTemplateID
|
||||
* @param st
|
||||
@@ -609,7 +626,7 @@
|
||||
maker: vm.maker === 'NULL' ? undefined : vm.maker,
|
||||
torrent_filename: vm.torrentInfo.filename,
|
||||
torrent_type: 'movie',
|
||||
torrent_vip: isSelectedVipType(vm.selectedType),
|
||||
torrent_vip: isSelectedVipType(vm.selectedType) || vm.isVipProperty,
|
||||
torrent_tags: t,
|
||||
torrent_nfo: vm.videoNfo,
|
||||
torrent_announce: vm.torrentInfo.announce,
|
||||
@@ -657,7 +674,7 @@
|
||||
maker: vm.maker === 'NULL' ? undefined : vm.maker,
|
||||
torrent_filename: vm.torrentInfo.filename,
|
||||
torrent_type: 'tvserial',
|
||||
torrent_vip: isSelectedVipType(vm.selectedType),
|
||||
torrent_vip: isSelectedVipType(vm.selectedType) || vm.isVipProperty,
|
||||
torrent_seasons: vm.selectedSeasons,
|
||||
torrent_episodes: vm.inputedEpisodes,
|
||||
torrent_tags: t,
|
||||
@@ -726,7 +743,7 @@
|
||||
maker: vm.maker === 'NULL' ? undefined : vm.maker,
|
||||
torrent_filename: vm.torrentInfo.filename,
|
||||
torrent_type: vm.selectedType,
|
||||
torrent_vip: isSelectedVipType(vm.selectedType),
|
||||
torrent_vip: isSelectedVipType(vm.selectedType) || vm.isVipProperty,
|
||||
torrent_tags: t,
|
||||
torrent_nfo: vm.videoNfo,
|
||||
torrent_announce: vm.torrentInfo.announce,
|
||||
|
||||
@@ -51,8 +51,8 @@
|
||||
<div class="col-xs-12 col-sm-6 col-md-4">
|
||||
<select class="form-control" ng-model="vm.selectedType" ng-change="vm.onTorrentTypeChanged();">
|
||||
<option ng-repeat="t in vm.torrentType.value | filter:{enable: true}"
|
||||
ng-if="t.role=='user' || (t.role=='vip' && (vm.user.isVip || vm.user.isOper))"
|
||||
value="{{t.value}}">{{'MENU_TORRENTS_SUB.'+t.name | translate}}
|
||||
ng-if="t.role=='user' || (t.role=='vip' && (vm.user.isVip || vm.user.makers.length > 0 || vm.user.isOper))"
|
||||
value="{{t.value}}">{{'MENU_TORRENTS_SUB.'+t.name | translate}} {{t.role=='vip' ? '(VIP)' : ''}}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
@@ -85,6 +85,19 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12 col-sm-12 col-xs-12 margin-top-50"
|
||||
ng-if="vm.selectedTypeRole(vm.selectedType)=='user' && (vm.user.isVip || vm.user.makers.length > 0 || vm.user.isOper)">
|
||||
<legend class="small-legend" translate="SELECT_VIP_PROPERTY"></legend>
|
||||
<div class="col-xs-12">
|
||||
<span class="text-danger">{{'IS_VIP_RESOURCES_TIP' | translate}}</span>
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" ng-model="vm.isVipProperty"> {{'IS_VIP_RESOURCES' | translate}}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12 col-sm-12 col-xs-12 margin-top-50">
|
||||
<legend class="small-legend" translate="TORRENTS_SUBMIT_UPLOAD"></legend>
|
||||
<div class="col-sm-6 col-sm-offset-3 text-center">
|
||||
|
||||
Reference in New Issue
Block a user