mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-06-20 02:39:39 +02:00
feat(core): showing site info at footer
include users, torrents, seeders, leechers, uploaded, download etc.
This commit is contained in:
@@ -577,6 +577,15 @@
|
||||
//footer view
|
||||
MIT_PROTOCOL: 'The source of this project is protected by <a href="https://github.com/twbs/bootstrap/blob/master/LICENSE" target="_blank">MIT</a> open source protocol',
|
||||
GIT_REPO: 'Power by ©meanTottent,<a href="https://github.com/taobataoma/meanTorrent" target="_blank">view on GitHub</a>',
|
||||
TOTAL_USERS: 'Total Users',
|
||||
TOTAL_TORRENTS: 'Total Torrents',
|
||||
TOTAL_TORRENTSSIZE: 'Total TorrentsSize',
|
||||
TOTAL_SEEDERS: 'Total Seeders',
|
||||
TOTAL_LEECHERS: 'Total Leechers',
|
||||
TOTAL_UPLOADED: 'Total Uploaded',
|
||||
TOTAL_DOWNLOADED: 'Total Downloaded',
|
||||
TOTAL_FORUMTOPICS: 'Total ForumTopics',
|
||||
TOTAL_FORUMREPLIES: 'Total ForumReplies',
|
||||
|
||||
///////////////////////the movie db fields////////////////////////////////
|
||||
TMDB_FIELDS: {
|
||||
|
||||
@@ -577,6 +577,15 @@
|
||||
//footer view
|
||||
MIT_PROTOCOL: '本项目源码受 <a href="https://github.com/twbs/bootstrap/blob/master/LICENSE" target="_blank">MIT</a> 开源协议保护',
|
||||
GIT_REPO: 'Power by ©meanTottent,<a href="https://github.com/taobataoma/meanTorrent" target="_blank">GitHub 源码仓库</a>',
|
||||
TOTAL_USERS: '注册会员',
|
||||
TOTAL_TORRENTS: '种子数',
|
||||
TOTAL_TORRENTSSIZE: '种子总体积',
|
||||
TOTAL_SEEDERS: '正在做种',
|
||||
TOTAL_LEECHERS: '正在下载',
|
||||
TOTAL_UPLOADED: '总上传量',
|
||||
TOTAL_DOWNLOADED: '总下载量',
|
||||
TOTAL_FORUMTOPICS: '论坛话题',
|
||||
TOTAL_FORUMREPLIES: '论坛回复',
|
||||
|
||||
///////////////////////the movie db fields////////////////////////////////
|
||||
TMDB_FIELDS: {
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
.controller('HeaderController', HeaderController);
|
||||
|
||||
HeaderController.$inject = ['$scope', '$state', '$stateParams', '$translate', 'Authentication', 'menuService', 'MeanTorrentConfig', 'localStorageService',
|
||||
'ScoreLevelService', 'InvitationsService', '$interval', 'MessagesService'];
|
||||
'ScoreLevelService', 'InvitationsService', '$interval', 'MessagesService', 'TorrentsService'];
|
||||
|
||||
function HeaderController($scope, $state, $stateParams, $translate, Authentication, menuService, MeanTorrentConfig, localStorageService, ScoreLevelService,
|
||||
InvitationsService, $interval, MessagesService) {
|
||||
InvitationsService, $interval, MessagesService, TorrentsService) {
|
||||
var vm = this;
|
||||
vm.user = Authentication.user;
|
||||
vm.language = MeanTorrentConfig.meanTorrentConfig.language;
|
||||
@@ -103,5 +103,14 @@
|
||||
//});
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* getSiteInfo
|
||||
*/
|
||||
vm.getSiteInfo = function () {
|
||||
TorrentsService.siteInfo(function (data) {
|
||||
vm.siteInfo = data;
|
||||
});
|
||||
};
|
||||
}
|
||||
}());
|
||||
|
||||
@@ -93,3 +93,11 @@ a:hover .header-profile-image {
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
.site-info {
|
||||
border-bottom: solid 1px #222;
|
||||
margin-bottom: 20px;
|
||||
padding-bottom: 20px;
|
||||
padding-top: 10px;
|
||||
padding-left: 60px;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,22 +1,38 @@
|
||||
<div class="container-fluid" style="padding-top: 15px; padding-bottom: 5px;" ng-controller="HeaderController as vm">
|
||||
<div class="container-fluid" style="padding-top: 15px; padding-bottom: 5px;" ng-controller="HeaderController as vm" ng-init="vm.getSiteInfo();">
|
||||
<div class="container">
|
||||
<div class="row view-footer">
|
||||
<div class="col-sm-7 col-sm-offset-1">
|
||||
<ul>
|
||||
<li>
|
||||
<span class="lang-list lang-footer">
|
||||
<span class="flag-icon {{l.class}}" title="{{l.title}}" ng-click="vm.changeLanguage(l.name);" ng-repeat="l in vm.language | orderBy: '-index'"></span>
|
||||
</span>
|
||||
</li>
|
||||
<li translate="GIT_REPO"></li>
|
||||
<li translate="MIT_PROTOCOL"></li>
|
||||
</ul>
|
||||
<div class="col-sm-10 col-sm-offset-1 site-info xs-hide">
|
||||
<div class="row">
|
||||
<div class="col-xs-6 col-sm-4 col-md-3">{{'TOTAL_USERS' | translate}}: {{vm.siteInfo.totalUsers}}</div>
|
||||
<div class="col-xs-6 col-sm-4 col-md-3">{{'TOTAL_TORRENTS' | translate}}: {{vm.siteInfo.totalTorrents}}</div>
|
||||
<div class="col-xs-6 col-sm-4 col-md-3">{{'TOTAL_TORRENTSSIZE' | translate}}: {{vm.siteInfo.totalTorrentsSize | bytes}}</div>
|
||||
<div class="col-xs-6 col-sm-4 col-md-3">{{'TOTAL_SEEDERS' | translate}}: {{vm.siteInfo.totalSeeders}}</div>
|
||||
<div class="col-xs-6 col-sm-4 col-md-3">{{'TOTAL_LEECHERS' | translate}}: {{vm.siteInfo.totalLeechers}}</div>
|
||||
<div class="col-xs-6 col-sm-4 col-md-3">{{'TOTAL_UPLOADED' | translate}}: {{vm.siteInfo.totalUploaded | bytes}}</div>
|
||||
<div class="col-xs-6 col-sm-4 col-md-3">{{'TOTAL_DOWNLOADED' | translate}}: {{vm.siteInfo.totalDownloaded | bytes}}</div>
|
||||
<div class="col-xs-6 col-sm-4 col-md-3">{{'TOTAL_FORUMTOPICS' | translate}}: {{vm.siteInfo.totalForumTopics}}</div>
|
||||
<div class="col-xs-6 col-sm-4 col-md-3">{{'TOTAL_FORUMREPLIES' | translate}}: {{vm.siteInfo.totalForumReplies}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3 text-right">
|
||||
<i class="icon ion-social-github"></i>
|
||||
<i class="icon ion-social-nodejs"></i>
|
||||
<i class="icon ion-social-html5-outline"></i>
|
||||
<i class="icon ion-social-css3-outline"></i>
|
||||
<div class="col-sm-12">
|
||||
<div class="col-sm-7 col-sm-offset-1">
|
||||
<ul>
|
||||
<li>
|
||||
<span class="lang-list lang-footer">
|
||||
<span class="flag-icon {{l.class}}" title="{{l.title}}" ng-click="vm.changeLanguage(l.name);"
|
||||
ng-repeat="l in vm.language | orderBy: '-index'"></span>
|
||||
</span>
|
||||
</li>
|
||||
<li translate="GIT_REPO"></li>
|
||||
<li translate="MIT_PROTOCOL"></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-sm-3 text-right">
|
||||
<i class="icon ion-social-github"></i>
|
||||
<i class="icon ion-social-nodejs"></i>
|
||||
<i class="icon ion-social-html5-outline"></i>
|
||||
<i class="icon ion-social-css3-outline"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user