feat(about): add function with admin/oper list

user can send message to them at here
This commit is contained in:
OldHawk
2017-10-20 14:24:35 +08:00
parent 65a415b303
commit bc848f260d
8 changed files with 132 additions and 11 deletions

View File

@@ -32,6 +32,12 @@
state: 'about.maker',
position: 3
});
menuService.addSubMenuItem('topbar', 'about', {
title: 'MENU_ABOUT_OPERLIST',
state: 'about.operlist',
position: 4,
divider: true
});
}
}());

View File

@@ -35,6 +35,14 @@
roles: ['user', 'oper', 'admin'],
pageTitle: 'PAGETITLE.MAKER'
}
})
.state('about.operlist', {
url: '/operlist',
templateUrl: '/modules/about/client/views/operlist.client.view.html',
data: {
roles: ['user', 'oper', 'admin'],
pageTitle: 'PAGETITLE.OPERLIST'
}
});
}
}());

View File

@@ -5,16 +5,29 @@
.module('about')
.controller('AboutController', AboutController);
AboutController.$inject = ['$scope', 'getStorageLangService', 'MeanTorrentConfig'];
AboutController.$inject = ['$scope', 'getStorageLangService', 'MeanTorrentConfig', 'AdminService'];
function AboutController($scope, getStorageLangService, MeanTorrentConfig) {
function AboutController($scope, getStorageLangService, MeanTorrentConfig, AdminService) {
var vm = this;
vm.lang = getStorageLangService.getLang();
vm.blackListConfig = MeanTorrentConfig.meanTorrentConfig.clientBlackList;
vm.appConfig = MeanTorrentConfig.meanTorrentConfig.app;
vm.announce = MeanTorrentConfig.meanTorrentConfig.announce;
vm.init = function () {
};
/**
* getOperList
*/
vm.getOperList = function () {
AdminService.get({
isOper: true,
isAdmin: true
}, function (data) {
vm.operList = data.rows;
});
};
}
}());

View File

@@ -23,7 +23,9 @@
z-index: 100;
}
span {
color: #888;
color: #999;
position: relative;
z-index: 100;
}
&:hover {
@@ -32,7 +34,7 @@
transform: scale(1.5);
/* csslint ignore:end */
}
h4 {
h4, span {
color: #fff;
}
.black-icon {
@@ -49,6 +51,62 @@
}
}
.oper-list {
.oper-item {
cursor: pointer;
position: relative;
border: solid 1px darken(@state-danger-text, 15%);
border-radius: 4px;
background-color: lighten(@state-danger-text, 1%);
padding: 10px 0 15px 0;
margin: 20px 0 0 0;
overflow: hidden;
&.is-admin {
background-color: darken(@state-danger-text, 10%);
}
.fa {
transition-property: transform, opacity;
transition-duration: .5s;
transition-timing-function: ease;
font-size: 7em;
color: #888;
}
span {
color: #ddd;
position: relative;
z-index: 100;
}
div {
color: #999;
position: relative;
z-index: 100;
}
&:hover {
.fa {
/* csslint ignore:start */
transform: scale(1.5);
/* csslint ignore:end */
}
.h3, .h4, div {
color: #fff;
}
.oper-icon {
opacity: 0.3;
}
}
}
.oper-icon {
position: absolute;
top: 2px;
right: -40px;
opacity: 0.5;
}
}
.maker-side-overlay {
top: 50px !important;
@media (min-width: @screen-sm-min) {

View File

@@ -16,11 +16,9 @@
<div class="row black-list">
<div class="col-xs-6 col-sm-4 col-md-3" ng-repeat="b in vm.blackListConfig">
<div class="text-center black-item">
<div>
<h4>{{b.name}}</h4>
<span>{{b.type}}</span>
<i class="fa fa-ban text-danger black-icon"></i>
</div>
<h4>{{b.name}}</h4>
<span>{{b.type}}</span>
<i class="fa fa-ban text-danger black-icon"></i>
</div>
</div>
</div>

View File

@@ -0,0 +1,30 @@
<section class="container" ng-controller="AboutController as vm" ng-init="vm.getOperList();">
<div class="row margin-top-20">
<div class="col-sm-12 col-md-10 col-md-offset-1">
<span>
<h3 class="margin-bottom-30">
{{'ABOUT.OPER_LIST' | translate}}
</h3>
</span>
<div class="margin-top-10">
<div class="alert alert-warning" role="alert" style="padding: 10px 50px;">
<span translate="ABOUT.OPER_LIST_TOOLTIP" translate-values="{site: vm.appConfig.name, admin: vm.announce.admin}"></span>
</div>
</div>
<div class="row oper-list">
<div class="col-xs-6 col-sm-4 col-md-3" ng-repeat="o in vm.operList">
<div class="text-center oper-item" ng-class="{'is-admin': o.isAdmin}">
<span info-class="h3" user-info="o" info-name></span>
<span to-class="h4" message-to="o" to-class="message-to-icon"></span>
<div class="margin-top-10">ID: {{o.username}}</div>
<div>{{o.isAdmin ? 'Administrator' : 'Operator'}}</div>
<i class="fa fa-user-circle-o text-danger oper-icon"></i>
</div>
</div>
</div>
</div>
</div>
</section>

View File

@@ -36,6 +36,7 @@
MENU_ABOUT_RULES: 'Rules',
MENU_ABOUT_BLACKLIST: 'Client Black List',
MENU_ABOUT_MAKERGROUP: 'Torrents Maker Group',
MENU_ABOUT_OPERLIST: 'Admin/Oper List',
MENU_VIP: 'VIP',
MENU_ADMIN: 'Admin',
@@ -155,6 +156,7 @@
RULES: 'Rules',
BLACK: 'Client Black List',
MAKER: 'Torrents Maker Group',
OPERLIST: 'Admin/Oper List',
COLLECTIONS: 'Torrents Collections',
VIP: 'Vip',
FORUM: 'Forum',
@@ -470,7 +472,9 @@
FORM_MAKER_DESC: 'Maker Group Description',
FORM_MAKER_FOR: 'Create maker group for - {{name}}',
MAKER_CREATE_SUCCESSFULLY: 'Create maker group successfully',
MAKER_CREATE_FAILED: 'Create maker group failed'
MAKER_CREATE_FAILED: 'Create maker group failed',
OPER_LIST: 'Admin and Oper List',
OPER_LIST_TOOLTIP: '<h4>Note:</h4>All the users in the list was the Administrator or Operator of <strong>{{site}}</strong>, If you need any help, please mailto our <strong><a href="mailto:{{admin}}">administrator</a></strong> or send a message to them from below.'
},
//collections views

View File

@@ -36,6 +36,7 @@
MENU_ABOUT_RULES: '站内规则',
MENU_ABOUT_BLACKLIST: '禁止客户端列表',
MENU_ABOUT_MAKERGROUP: '资源压制小组',
MENU_ABOUT_OPERLIST: 'Admin/Oper 列表',
MENU_VIP: 'VIP',
MENU_ADMIN: '管理中心',
@@ -155,6 +156,7 @@
RULES: '规则',
BLACK: '禁止客户端列表',
MAKER: '资源压制小组',
OPERLIST: 'Admin/Oper 列表',
COLLECTIONS: '资源系列',
VIP: 'Vip',
FORUM: '论坛',
@@ -470,7 +472,9 @@
FORM_MAKER_DESC: '资源压制小组简介',
FORM_MAKER_FOR: '创建资源压制小组 - {{name}}',
MAKER_CREATE_SUCCESSFULLY: '资源压制小组创建成功',
MAKER_CREATE_FAILED: '资源压制小组创建失败'
MAKER_CREATE_FAILED: '资源压制小组创建失败',
OPER_LIST: 'Admin & Oper 列表',
OPER_LIST_TOOLTIP: '<h4>提示:</h4>下面列出的所有用户都是 <strong>{{site}}</strong> 站点的 Administrator 或 Operator, 如果你需要帮助, 请向我们的 <strong><a href="mailto:{{admin}}">系统管理员</a></strong> 发送邮件或向下面列出的管理员发送站内消息.'
},
//collections views