feat(vip): new vip menu struct

This commit is contained in:
OldHawk
2017-10-27 14:32:27 +08:00
parent 6f45b24b12
commit 5fffbf5d91
10 changed files with 239 additions and 135 deletions

View File

@@ -163,6 +163,8 @@
OPERLIST: 'Admin/Oper List',
COLLECTIONS: 'Movie Collections',
VIP: 'Vip',
VIP_DONATE: 'Vip Donate',
VIP_RULES: 'Vip Rules',
FORUM: 'Forum',
ADMIN_USER_LIST: 'User List',
ADMIN_USER_VIEW: 'View User',
@@ -462,12 +464,15 @@
//vip views
VIP: {
VIP_TITLE: 'VIP Club',
VIP_SUB_TITLE: '- A symbol of rights and status',
BUTTON_DONATE: 'Donate',
DONATE_VIP: 'Donate a VIP',
TORRENTS_LIST: 'Vip Torrents List',
TORRENTS_LIST_ERROR: 'Vip torrents list error',
VIP_TORRENTS_IS_LOADING: 'Vip torrents is loading...',
VIP_TORRENTS_IS_EMPTY: 'No Vip torrents of this type is founded!'
VIP_TORRENTS_IS_EMPTY: 'No Vip torrents of this type is founded!',
DONATE_TOOLTIP: '<h4>Note:</h4>Before donations, please carefully read the <strong><a href="/vip/rules">membership user license agreement</a></strong> of CHD.im, and clear the rights and obligations of members, if you continure donations, said you agree to these terms, if you need any other help, please contact our <strong><a href="mailto:{{admin}}">administrator</a></strong>.'
},
//about views

View File

@@ -163,6 +163,8 @@
OPERLIST: 'Admin/Oper 列表',
COLLECTIONS: '电影系列',
VIP: 'Vip',
VIP_DONATE: '捐赠VIP',
VIP_RULES: 'Vip用户协议',
FORUM: '论坛',
ADMIN_USER_LIST: '用户管理',
ADMIN_USER_VIEW: '查看用户',
@@ -462,12 +464,15 @@
//vip views
VIP: {
VIP_TITLE: 'VIP 会员',
VIP_SUB_TITLE: '- 一个身份、权利和地位的象征',
BUTTON_DONATE: '捐赠Vip',
DONATE_VIP: '捐赠Vip',
TORRENTS_LIST: 'Vip 资源专区',
TORRENTS_LIST_ERROR: 'Vip 资源获取失败',
VIP_TORRENTS_IS_LOADING: 'Vip资源正在获取, 请稍候...',
VIP_TORRENTS_IS_EMPTY: '没有找到该类的VIP种子资源!'
VIP_TORRENTS_IS_EMPTY: '没有找到该类的VIP种子资源!',
DONATE_TOOLTIP: '<h4>Note:</h4>在捐赠前, 请认真阅读 <strong>{{site}}</strong> 的 会员用户许可协议 以明确会员用户的权利与义务, 如继续进行捐赠操作, 则表示您已完全同意这些条款, 如需其它帮助,请与我们的 <strong><a href="mailto:{{admin}}">系统管理员</a> </strong>联系.',
},
//about views

View File

@@ -74,7 +74,7 @@
<dt class="h-line"></dt>
<dd class="h-line">
<a ui-sref="settings.profile">{{ 'EDIT_PROFILE' | translate }}</a>
<a ui-sref="vip" ng-if="!vm.user.isVip"> | {{ 'VIP.DONATE_VIP' | translate }}</a>
<a ui-sref="vip.rules" ng-if="!vm.user.isVip"> | {{ 'VIP.DONATE_VIP' | translate }}</a>
</dd>
</div>

View File

@@ -10,7 +10,7 @@
function menuConfig(menuService) {
menuService.addMenuItem('topbar', {
title: 'MENU_VIP',
state: 'vip',
state: 'vip.list',
roles: ['*'],
position: 5
});

View File

@@ -11,10 +11,29 @@
$stateProvider
.state('vip', {
url: '/vip',
abstract: true,
template: '<ui-view/>'
})
.state('vip.list', {
url: '',
templateUrl: '/modules/vip/client/views/vip.client.view.html',
data: {
pageTitle: 'PAGETITLE.VIP'
}
})
.state('vip.rules', {
url: '/rules',
templateUrl: '/modules/vip/client/views/rules.client.view.html',
data: {
pageTitle: 'PAGETITLE.VIP_RULES'
}
})
.state('vip.donate', {
url: '/donate',
templateUrl: '/modules/vip/client/views/donate.client.view.html',
data: {
pageTitle: 'PAGETITLE.VIP_DONATE'
}
});
}
}());

View File

@@ -17,9 +17,11 @@
vm.RTS = ResourcesTagsServices;
vm.lang = getStorageLangService.getLang();
vm.itemsPerPageConfig = MeanTorrentConfig.meanTorrentConfig.itemsPerPage;
vm.announce = MeanTorrentConfig.meanTorrentConfig.announce;
vm.torrentType = MeanTorrentConfig.meanTorrentConfig.torrentType;
vm.vipTorrentType = 'movie';
vm.appConfig = MeanTorrentConfig.meanTorrentConfig.app;
vm.searchTags = [];
uibButtonConfig.activeClass = 'btn-success';

View File

@@ -0,0 +1,10 @@
@import (reference) "../../../core/client/less/mt-var.less";
.donate-button {
margin-top: 15px;
@media (max-width: @screen-xs-max) {
margin-top: 5px;
text-align: left !important;
}
}

View File

@@ -0,0 +1,21 @@
<div ng-controller="VipController as vm">
<div class="pagetop">
<div class="container">
<div class="row margin-top-20 margin-bottom-30">
<div class="col-sm-9">
<h3>{{'VIP.VIP_TITLE' | translate}}
<small>{{'VIP.VIP_SUB_TITLE' | translate}}</small>
</h3>
</div>
</div>
</div>
</div>
<div class="container">
<div class="margin-top-20">
<div class="alert alert-warning" role="alert" style="padding: 10px 50px;">
<span translate="VIP.DONATE_TOOLTIP" translate-values="{site: vm.appConfig.name, admin: vm.announce.admin}"></span>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,26 @@
<div ng-controller="VipController as vm">
<div class="pagetop">
<div class="container">
<div class="row margin-top-20 margin-bottom-30">
<div class="col-sm-9">
<h3>{{'VIP.VIP_TITLE' | translate}}
<small>{{'VIP.VIP_SUB_TITLE' | translate}}</small>
</h3>
</div>
<div class="col-sm-3 text-right donate-button">
<a ui-sref="vip.donate" class="btn btn-width-120 margin-top-5"
mouse-enter-toggle-class="btn-mt" base-class="btn-mt-o">
{{'VIP.BUTTON_DONATE' | translate}}
</a>
</div>
</div>
</div>
</div>
<div class="container">
<div class="col-sm-10">
<div marked src="'/modules/vip/client/templates/vip-'+vm.lang+'.md'" compile="true">
</div>
</div>
</div>
</div>

View File

@@ -1,114 +1,128 @@
<section class="container" ng-controller="VipController as vm">
<div class="row margin-top-20" ng-if="!vm.user.isVip && !vm.user.isOper">
<div class="col-sm-2 xs-show">
<button class="btn btn-lg btn-mt btn-block btn-donate margin-bottom-30">{{'VIP.BUTTON_DONATE' | translate}}</button>
<div ng-controller="VipController as vm">
<div class="pagetop">
<div class="container">
<div class="row margin-top-20 margin-bottom-30">
<div class="col-sm-9">
<h3>{{'VIP.VIP_TITLE' | translate}}
<small>{{'VIP.VIP_SUB_TITLE' | translate}}</small>
</h3>
</div>
<div class="col-sm-3 text-right donate-button">
<a ui-sref="vip.donate" class="btn btn-width-120 margin-top-5"
mouse-enter-toggle-class="btn-mt" base-class="btn-mt-o">
{{'VIP.BUTTON_DONATE' | translate}}
</a>
</div>
</div>
</div>
</div>
<div class="container" ng-if="!vm.user.isVip && !vm.user.isOper">
<div class="col-sm-10">
<div marked src="'/modules/vip/client/templates/vip-'+vm.lang+'.md'" compile="true">
</div>
</div>
<div class="col-sm-2 xs-hide" style="padding-left: 5px">
<button class="btn btn-lg btn-mt btn-block btn-donate margin-top-20">{{'VIP.BUTTON_DONATE' | translate}}</button>
</div>
</div>
<div class="row margin-top-20" ng-if="vm.user.isVip || vm.user.isOper" ng-init="vm.buildPager();">
<div class="col-md-12 torrent-list" id="top_of_torrent_list" ng-show="vm.pagedItems">
<h3 class="margin-bottom-30">
{{'VIP.TORRENTS_LIST' | translate}}
</h3>
<div class="container" ng-if="vm.user.isVip || vm.user.isOper" ng-init="vm.buildPager();">
<div class="row margin-top-20">
<div class="col-md-12 torrent-list" id="top_of_torrent_list" ng-show="vm.pagedItems">
<h3 class="margin-bottom-30">
{{'VIP.TORRENTS_LIST' | translate}}
</h3>
<div class="margin-bottom-20">
<div class="btn-group torrent-type-group">
<label class="btn btn-default"
ng-repeat="t in vm.torrentType.value | filter:{enable: true} | orderBy: 'position'"
ng-model="vm.vipTorrentType" uib-btn-radio="'{{t.value}}'"
ng-click="vm.buildPager();">
{{'MENU_TORRENTS_SUB.'+t.name | translate}}
</label>
</div>
</div>
<div class="pagination-div-top">
<div class="row">
<div class="col-sm-12 col-md-9">
<ul uib-pagination boundary-links="true" max-size="8" items-per-page="vm.itemsPerPage" total-items="vm.filterLength"
ng-model="vm.currentPage"
ng-change="vm.pageChanged()"
first-text="{{ 'PAGE_TEXT_FIRST' | translate}}" previous-text="{{ 'PAGE_TEXT_PREVIOUS' | translate}}"
next-text="{{ 'PAGE_TEXT_NEXT' | translate}}" last-text="{{ 'PAGE_TEXT_LAST' | translate}}">
</ul>
</div>
<div class="col-sm-12 col-md-3">
<input class="form-control margin-top-20 margin-bottom-20" type="text" ng-model="vm.search" placeholder="Search"
ng-change="vm.figureOutItemsToDisplay()"/>
<div class="margin-bottom-20">
<div class="btn-group torrent-type-group">
<label class="btn btn-default"
ng-repeat="t in vm.torrentType.value | filter:{enable: true} | orderBy: 'position'"
ng-model="vm.vipTorrentType" uib-btn-radio="'{{t.value}}'"
ng-click="vm.buildPager();">
{{'MENU_TORRENTS_SUB.'+t.name | translate}}
</label>
</div>
</div>
</div>
<div class="table-responsive">
<table class="table table-hover tb-v-middle">
<thead>
<tr>
<th>{{ 'TABLE_FIELDS.INFO' | translate}}</th>
<th>
<a href="#" tooltip-placement="top"
ng-click="vm.orderByVote();"
uib-tooltip="{{ 'TABLE_FIELDS.TITLE_VOTES' | translate}}">{{ 'TABLE_FIELDS.VOTES' | translate}}</a>
<i class="fa fa-caret-down text-info" ng-if="vm.sortVote == '-'"></i>
<i class="fa fa-caret-up text-info" ng-if="vm.sortVote == '+'"></i>
</th>
<th class="text-center">{{ 'TABLE_FIELDS.LIFETIME' | translate}}</th>
<th class="text-center">{{ 'TABLE_FIELDS.SIZE' | translate}}</th>
<th>
<a href="#" tooltip-placement="top"
ng-click="vm.orderBySLF();"
uib-tooltip="{{ 'TABLE_FIELDS.TITLE_SEEDS_LEECHERS_FINISHED' | translate}}" ng-bind-html="vm.getOrderTableHead()"></a>
</th>
<th class="text-center">{{ 'TABLE_FIELDS.PUBLISHER' | translate}}</th>
</tr>
</thead>
<tbody>
<tr ng-if="vm.tooltipMsg">
<td colspan="6">
<div class="text-center margin-top-50 margin-bottom-30 padding-top-20 padding-bottom-50">
<h2>{{vm.tooltipMsg | translate}}</h2>
</div>
</td>
</tr>
<tr class="torrent-list-info"
ng-if="!vm.tooltipMsg"
ng-repeat="item in vm.pagedItems" ng-click="vm.openTorrentInfo(item._id);">
<td class="col-md-7 td-text-overflow">
<div class="media">
<div class="media-left">
<img class="media-object" torrent-logo="item"
ng-src="{{vm.TGI.getTorrentListImage(item)}}"
alt="{{vm.TGI.getTorrentTitle(item)}}">
<div class="pagination-div-top">
<div class="row">
<div class="col-sm-12 col-md-9">
<ul uib-pagination boundary-links="true" max-size="8" items-per-page="vm.itemsPerPage" total-items="vm.filterLength"
ng-model="vm.currentPage"
ng-change="vm.pageChanged()"
first-text="{{ 'PAGE_TEXT_FIRST' | translate}}" previous-text="{{ 'PAGE_TEXT_PREVIOUS' | translate}}"
next-text="{{ 'PAGE_TEXT_NEXT' | translate}}" last-text="{{ 'PAGE_TEXT_LAST' | translate}}">
</ul>
</div>
<div class="col-sm-12 col-md-3">
<input class="form-control margin-top-20 margin-bottom-20" type="text" ng-model="vm.search" placeholder="Search"
ng-change="vm.figureOutItemsToDisplay()"/>
</div>
</div>
</div>
<div class="layer-download" ng-class="{'music': item.torrent_type=='music'}">
<i class="fa fa-arrow-circle-o-down fa-3x" aria-hidden="true"
title="{{ 'TITLE_ALT.DOWNLOAD_TORRENT' | translate}}"
ng-click="vm.DLS.downloadTorrent(item._id); $event.stopPropagation();"
ng-class="{'fa-arrow-circle-down': vm.hover}"
ng-mouseover="vm.hover = true;" ng-mouseleave="vm.hover = false;"></i>
</div>
<div class="table-responsive">
<table class="table table-hover tb-v-middle">
<thead>
<tr>
<th>{{ 'TABLE_FIELDS.INFO' | translate}}</th>
<th>
<a href="#" tooltip-placement="top"
ng-click="vm.orderByVote();"
uib-tooltip="{{ 'TABLE_FIELDS.TITLE_VOTES' | translate}}">{{ 'TABLE_FIELDS.VOTES' | translate}}</a>
<i class="fa fa-caret-down text-info" ng-if="vm.sortVote == '-'"></i>
<i class="fa fa-caret-up text-info" ng-if="vm.sortVote == '+'"></i>
</th>
<th class="text-center">{{ 'TABLE_FIELDS.LIFETIME' | translate}}</th>
<th class="text-center">{{ 'TABLE_FIELDS.SIZE' | translate}}</th>
<th>
<a href="#" tooltip-placement="top"
ng-click="vm.orderBySLF();"
uib-tooltip="{{ 'TABLE_FIELDS.TITLE_SEEDS_LEECHERS_FINISHED' | translate}}"
ng-bind-html="vm.getOrderTableHead()"></a>
</th>
<th class="text-center">{{ 'TABLE_FIELDS.PUBLISHER' | translate}}</th>
</tr>
</thead>
<tbody>
<tr ng-if="vm.tooltipMsg">
<td colspan="6">
<div class="text-center margin-top-50 margin-bottom-30 padding-top-20 padding-bottom-50">
<h2>{{vm.tooltipMsg | translate}}</h2>
</div>
<div class="media-body">
<h5 class="media-heading">
<span>{{vm.TGI.getTorrentDoubleTitle(item)}}</span>
</td>
</tr>
<tr class="torrent-list-info"
ng-if="!vm.tooltipMsg"
ng-repeat="item in vm.pagedItems" ng-click="vm.openTorrentInfo(item._id);">
<td class="col-md-7 td-text-overflow">
<div class="media">
<div class="media-left">
<img class="media-object" torrent-logo="item"
ng-src="{{vm.TGI.getTorrentListImage(item)}}"
alt="{{vm.TGI.getTorrentTitle(item)}}">
<div class="layer-download" ng-class="{'music': item.torrent_type=='music'}">
<i class="fa fa-arrow-circle-o-down fa-3x" aria-hidden="true"
title="{{ 'TITLE_ALT.DOWNLOAD_TORRENT' | translate}}"
ng-click="vm.DLS.downloadTorrent(item._id); $event.stopPropagation();"
ng-class="{'fa-arrow-circle-down': vm.hover}"
ng-mouseover="vm.hover = true;" ng-mouseleave="vm.hover = false;"></i>
</div>
</div>
<div class="media-body">
<h5 class="media-heading">
<span>{{vm.TGI.getTorrentDoubleTitle(item)}}</span>
<span class="upload-by" ng-show="item.user.displayName"> (By:
<span user-info="item.user" info-name></span> )</span>
</h5>
</h5>
<div class="list-all-genres">
<span class="genres-item" ng-repeat="t in item.resource_detail_info.genres">{{t.name}}</span>
</div>
<div class="list-all-genres">
<span class="genres-item" ng-repeat="t in item.resource_detail_info.genres">{{t.name}}</span>
</div>
<div class="torrent-filename text-long">{{item.resource_detail_info.subtitle}}</div>
<div class="torrent-filename text-long">{{item.torrent_filename | filename}}</div>
<div class="torrent-filename text-long">{{item.resource_detail_info.subtitle}}</div>
<div class="torrent-filename text-long">{{item.torrent_filename | filename}}</div>
<div class="list-all-tags">
<div class="list-all-tags">
<span class="label label-release label-warning" ng-show="item.resource_detail_info.release_date"
ng-click="$event.stopPropagation();">
{{ item.resource_detail_info.release_date}}
@@ -139,51 +153,53 @@
{{ 'RESOURCESTAGS.' + vm.RTS.getTagTitle(t) + '.' + t.toUpperCase() | translate}}
</span>
</span>
</div>
</div>
</div>
</div>
</td>
<td class="col-md-1 td-v-middle td-imdb">
</td>
<td class="col-md-1 td-v-middle td-imdb">
<span title="{{ 'TITLE_ALT.IMDB_VOTES' | translate}}"
class="torrent-votes"><kbd>{{vm.TGI.getVoteTitle(item)}}</kbd> {{item.resource_detail_info.vote_average | number : 1}}</span>
</td>
<td class="col-md-1 td-v-middle text-center td-life">{{item.createdat | life}}</td>
<td class="col-md-1 td-v-middle text-center td-size">{{item.torrent_size | bytes:2}}</td>
<td class="col-md-1 td-v-middle list-user-info td-user-info">
<p class="no-margin-p" title="{{ 'TITLE_ALT.SEEDS' | translate}}">
<span class="glyphicon glyphicon-arrow-up torrent-up"></span>
{{item.torrent_seeds}}
</p>
</td>
<td class="col-md-1 td-v-middle text-center td-life">{{item.createdat | life}}</td>
<td class="col-md-1 td-v-middle text-center td-size">{{item.torrent_size | bytes:2}}</td>
<td class="col-md-1 td-v-middle list-user-info td-user-info">
<p class="no-margin-p" title="{{ 'TITLE_ALT.SEEDS' | translate}}">
<span class="glyphicon glyphicon-arrow-up torrent-up"></span>
{{item.torrent_seeds}}
</p>
<p class="no-margin-p" title="{{ 'TITLE_ALT.LEECHERS' | translate}}">
<span class="glyphicon glyphicon-arrow-down torrent-down"></span>
{{item.torrent_leechers}}
</p>
<p class="no-margin-p" title="{{ 'TITLE_ALT.LEECHERS' | translate}}">
<span class="glyphicon glyphicon-arrow-down torrent-down"></span>
{{item.torrent_leechers}}
</p>
<p class="no-margin-p" title="{{ 'TITLE_ALT.FINISHED' | translate}}">
<span class="glyphicon glyphicon-ok torrent-finished"></span>
{{item.torrent_finished}}
</p>
</td>
<td class="col-md-1 td-v-middle text-center td-uploader">
<span user-info="item.user" info-name></span>
<div maker-info="item.maker"></div>
<!--<span vip-flag="item.user"></span>-->
<!--<span message-to="item.user" to-class="message-to-icon"></span>-->
</td>
</tr>
</tbody>
</table>
</div>
<p class="no-margin-p" title="{{ 'TITLE_ALT.FINISHED' | translate}}">
<span class="glyphicon glyphicon-ok torrent-finished"></span>
{{item.torrent_finished}}
</p>
</td>
<td class="col-md-1 td-v-middle text-center td-uploader">
<span user-info="item.user" info-name></span>
<div class="pagination-div-bottom">
<ul uib-pagination boundary-links="true" max-size="8" items-per-page="vm.itemsPerPage" total-items="vm.filterLength"
ng-model="vm.currentPage"
ng-change="vm.pageChanged()"
first-text="{{ 'PAGE_TEXT_FIRST' | translate}}" previous-text="{{ 'PAGE_TEXT_PREVIOUS' | translate}}"
next-text="{{ 'PAGE_TEXT_NEXT' | translate}}" last-text="{{ 'PAGE_TEXT_LAST' | translate}}">
</ul>
<div maker-info="item.maker"></div>
<!--<span vip-flag="item.user"></span>-->
<!--<span message-to="item.user" to-class="message-to-icon"></span>-->
</td>
</tr>
</tbody>
</table>
</div>
<div class="pagination-div-bottom">
<ul uib-pagination boundary-links="true" max-size="8" items-per-page="vm.itemsPerPage" total-items="vm.filterLength"
ng-model="vm.currentPage"
ng-change="vm.pageChanged()"
first-text="{{ 'PAGE_TEXT_FIRST' | translate}}" previous-text="{{ 'PAGE_TEXT_PREVIOUS' | translate}}"
next-text="{{ 'PAGE_TEXT_NEXT' | translate}}" last-text="{{ 'PAGE_TEXT_LAST' | translate}}">
</ul>
</div>
</div>
</div>
</div>
</section>
</div>