mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-01-15 03:42:23 +01:00
add many multilingual fields
add torrents and forum topbar menu
This commit is contained in:
@@ -12,7 +12,8 @@
|
||||
menuService.addMenuItem('topbar', {
|
||||
title: $translate.instant('MENU_CHAT'),
|
||||
state: 'chat',
|
||||
position: 10
|
||||
roles: ['*'],
|
||||
position: 2
|
||||
});
|
||||
}
|
||||
}());
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
controller: 'ChatController',
|
||||
controllerAs: 'vm',
|
||||
data: {
|
||||
roles: ['user', 'admin'],
|
||||
//roles: ['user', 'admin'],
|
||||
pageTitle: 'Chat'
|
||||
}
|
||||
});
|
||||
|
||||
@@ -15,10 +15,23 @@
|
||||
var stringcn = {
|
||||
COMINGSOON: '开发中,请稍候...',
|
||||
|
||||
//topbar menu
|
||||
//client topbar menu
|
||||
MENU_CHAT: '聊天室',
|
||||
MENU_TORRENTS: '种子',
|
||||
MENU_UPLOAD: '发布',
|
||||
MENU_FORUMS: '论坛',
|
||||
MENU_RANKING: '排行榜',
|
||||
MENU_RULES: '规则',
|
||||
MENU_VIP: 'VIP',
|
||||
MENU_ADMIN: '管理中心',
|
||||
|
||||
//sub menu of torrents
|
||||
MENU_TORRENTS_SUB: {
|
||||
SUB_MOVIE: '电影',
|
||||
SUB_MTV: 'MTV',
|
||||
SUB_MUSIC: '音乐',
|
||||
SUB_OTHER: '其它'
|
||||
},
|
||||
|
||||
//client account menu
|
||||
SIGNOUT: '退出登录',
|
||||
|
||||
@@ -15,10 +15,23 @@
|
||||
var stringen = {
|
||||
COMINGSOON: 'coming soon...',
|
||||
|
||||
//client menu
|
||||
//client topbar menu
|
||||
MENU_CHAT: 'Chat',
|
||||
MENU_TORRENTS: 'Torrents',
|
||||
MENU_UPLOAD: 'Upload',
|
||||
MENU_FORUMS: 'Forums',
|
||||
MENU_RANKING: 'Ranking',
|
||||
MENU_RULES: 'Rules',
|
||||
MENU_VIP: 'VIP',
|
||||
MENU_ADMIN: 'Admin',
|
||||
|
||||
//sub menu of torrents
|
||||
MENU_TORRENTS_SUB: {
|
||||
SUB_MOVIE: 'Movie',
|
||||
SUB_MTV: 'MTV',
|
||||
SUB_MUSIC: 'Music',
|
||||
SUB_OTHER: 'Other'
|
||||
},
|
||||
|
||||
//client menu
|
||||
SIGNOUT: 'Signout',
|
||||
|
||||
@@ -5,15 +5,15 @@
|
||||
.module('core.admin')
|
||||
.run(menuConfig);
|
||||
|
||||
menuConfig.$inject = ['menuService'];
|
||||
menuConfig.$inject = ['menuService', '$translate'];
|
||||
|
||||
function menuConfig(menuService) {
|
||||
function menuConfig(menuService, $translate) {
|
||||
menuService.addMenuItem('topbar', {
|
||||
title: 'Admin',
|
||||
title: $translate.instant('MENU_ADMIN'),
|
||||
state: 'admin',
|
||||
type: 'dropdown',
|
||||
roles: ['admin'],
|
||||
position: 11
|
||||
position: 10
|
||||
});
|
||||
}
|
||||
}());
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a ui-sref="home" class="navbar-brand"><span style="font-size: 25px; font-weight: bold; line-height: 16px;">meanTorrent</span></a>
|
||||
<a ui-sref="home" class="navbar-brand"><span style="font-size: 25px; font-weight: bold; line-height: 18px;">meanTorrent</span></a>
|
||||
</div>
|
||||
<nav class="navbar-collapse" uib-collapse="!vm.isCollapsed" role="navigation">
|
||||
<ul class="nav navbar-nav" ng-if="vm.menu.shouldRender(vm.authentication.user);">
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
menuService.addMenuItem('topbar', {
|
||||
title: $translate.instant('MENU_FORUMS'),
|
||||
state: 'forums',
|
||||
roles: ['*'],
|
||||
position: 1
|
||||
});
|
||||
}
|
||||
|
||||
@@ -18,9 +18,53 @@
|
||||
|
||||
// Add the dropdown list item
|
||||
menuService.addSubMenuItem('topbar', 'torrents', {
|
||||
title: 'List torrents',
|
||||
state: 'torrents.list',
|
||||
title: $translate.instant('MENU_TORRENTS_SUB.SUB_MOVIE'),
|
||||
state: 'torrents.movie',
|
||||
roles: ['*']
|
||||
});
|
||||
menuService.addSubMenuItem('topbar', 'torrents', {
|
||||
title: $translate.instant('MENU_TORRENTS_SUB.SUB_MTV'),
|
||||
state: 'torrents.mtv',
|
||||
roles: ['*']
|
||||
});
|
||||
menuService.addSubMenuItem('topbar', 'torrents', {
|
||||
title: $translate.instant('MENU_TORRENTS_SUB.SUB_MUSIC'),
|
||||
state: 'torrents.music',
|
||||
roles: ['*']
|
||||
});
|
||||
menuService.addSubMenuItem('topbar', 'torrents', {
|
||||
title: $translate.instant('MENU_TORRENTS_SUB.SUB_OTHER'),
|
||||
state: 'torrents.other',
|
||||
roles: ['*']
|
||||
});
|
||||
|
||||
menuService.addMenuItem('topbar', {
|
||||
title: $translate.instant('MENU_UPLOAD'),
|
||||
state: 'torrents.upload',
|
||||
roles: ['*'],
|
||||
position: 3
|
||||
});
|
||||
|
||||
menuService.addMenuItem('topbar', {
|
||||
title: $translate.instant('MENU_RANKING'),
|
||||
state: 'torrents.ranking',
|
||||
roles: ['*'],
|
||||
position: 4
|
||||
});
|
||||
|
||||
menuService.addMenuItem('topbar', {
|
||||
title: $translate.instant('MENU_RULES'),
|
||||
state: 'torrents.rules',
|
||||
roles: ['*'],
|
||||
position: 5
|
||||
});
|
||||
|
||||
menuService.addMenuItem('topbar', {
|
||||
title: $translate.instant('MENU_VIP'),
|
||||
state: 'torrents.vip',
|
||||
roles: ['*'],
|
||||
position: 6
|
||||
});
|
||||
|
||||
}
|
||||
}());
|
||||
|
||||
Reference in New Issue
Block a user