mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-07-01 00:18:19 +02:00
add many multilingual fields
add torrents and forum topbar menu
This commit is contained in:
@@ -12,7 +12,9 @@
|
||||
title: 'Articles',
|
||||
state: 'articles',
|
||||
type: 'dropdown',
|
||||
roles: ['*']
|
||||
roles: ['*'],
|
||||
position: 20
|
||||
|
||||
});
|
||||
|
||||
// Add the dropdown list item
|
||||
|
||||
@@ -5,13 +5,14 @@
|
||||
.module('chat')
|
||||
.run(menuConfig);
|
||||
|
||||
menuConfig.$inject = ['menuService'];
|
||||
menuConfig.$inject = ['menuService', '$translate'];
|
||||
|
||||
function menuConfig(menuService) {
|
||||
function menuConfig(menuService, $translate) {
|
||||
// Set top bar menu items
|
||||
menuService.addMenuItem('topbar', {
|
||||
title: 'Chat',
|
||||
state: 'chat'
|
||||
title: $translate.instant('MENU_CHAT'),
|
||||
state: 'chat',
|
||||
position: 10
|
||||
});
|
||||
}
|
||||
}());
|
||||
|
||||
@@ -15,7 +15,12 @@
|
||||
var stringcn = {
|
||||
COMINGSOON: '开发中,请稍候...',
|
||||
|
||||
//client menu
|
||||
//topbar menu
|
||||
MENU_CHAT: '聊天室',
|
||||
MENU_TORRENTS: '种子',
|
||||
MENU_FORUMS: '论坛',
|
||||
|
||||
//client account menu
|
||||
SIGNOUT: '退出登录',
|
||||
SIGNIN: '登录',
|
||||
SIGNUP: '注册',
|
||||
|
||||
@@ -15,6 +15,11 @@
|
||||
var stringen = {
|
||||
COMINGSOON: 'coming soon...',
|
||||
|
||||
//client menu
|
||||
MENU_CHAT: 'Chat',
|
||||
MENU_TORRENTS: 'Torrents',
|
||||
MENU_FORUMS: 'Forums',
|
||||
|
||||
//client menu
|
||||
SIGNOUT: 'Signout',
|
||||
SIGNIN: 'Sign In',
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
title: 'Admin',
|
||||
state: 'admin',
|
||||
type: 'dropdown',
|
||||
roles: ['admin']
|
||||
roles: ['admin'],
|
||||
position: 11
|
||||
});
|
||||
}
|
||||
}());
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
.module('core')
|
||||
.run(menuConfig);
|
||||
|
||||
menuConfig.$inject = ['menuService', '$translate', '$filter'];
|
||||
menuConfig.$inject = ['menuService', '$translate'];
|
||||
|
||||
function menuConfig(menuService, $translate) {
|
||||
menuService.addMenu('account', {
|
||||
|
||||
@@ -5,7 +5,13 @@
|
||||
.module('core')
|
||||
.controller('HomeController', HomeController);
|
||||
|
||||
function HomeController() {
|
||||
HomeController.$inject = ['$scope', '$translate'];
|
||||
|
||||
function HomeController($scope, $translate) {
|
||||
var vm = this;
|
||||
|
||||
//$translate.use('en');
|
||||
|
||||
vm.COMING = 'coming soon...';
|
||||
}
|
||||
}());
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a ui-sref="home" class="navbar-brand">meanTorrent</a>
|
||||
<a ui-sref="home" class="navbar-brand"><span style="font-size: 25px; font-weight: bold; line-height: 16px;">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);">
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="jumbotron text-center">
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-md-offset-3 col-sm-6 col-sm-offset-3 col-xs-12">
|
||||
<h1>Coming soon ...</h1>
|
||||
<h1 translate="COMINGSOON"></h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
18
modules/forums/client/config/forums.client.menus.js
Normal file
18
modules/forums/client/config/forums.client.menus.js
Normal file
@@ -0,0 +1,18 @@
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
angular
|
||||
.module('forums')
|
||||
.run(menuConfig);
|
||||
|
||||
menuConfig.$inject = ['menuService', '$translate'];
|
||||
|
||||
function menuConfig(menuService, $translate) {
|
||||
// Set top bar menu items
|
||||
menuService.addMenuItem('topbar', {
|
||||
title: $translate.instant('MENU_FORUMS'),
|
||||
state: 'forums',
|
||||
position: 1
|
||||
});
|
||||
}
|
||||
}());
|
||||
23
modules/forums/client/config/forums.client.routes.js
Normal file
23
modules/forums/client/config/forums.client.routes.js
Normal file
@@ -0,0 +1,23 @@
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
angular
|
||||
.module('forums.routes')
|
||||
.config(routeConfig);
|
||||
|
||||
routeConfig.$inject = ['$stateProvider'];
|
||||
|
||||
function routeConfig($stateProvider) {
|
||||
$stateProvider
|
||||
.state('forums', {
|
||||
url: '/forums',
|
||||
templateUrl: '',
|
||||
controller: '',
|
||||
controllerAs: '',
|
||||
data: {
|
||||
//roles: ['user', 'admin'],
|
||||
pageTitle: 'Forums'
|
||||
}
|
||||
});
|
||||
}
|
||||
}());
|
||||
7
modules/forums/client/forums.client.module.js
Normal file
7
modules/forums/client/forums.client.module.js
Normal file
@@ -0,0 +1,7 @@
|
||||
(function (app) {
|
||||
'use strict';
|
||||
|
||||
app.registerModule('forums', ['core']);// The core module is required for special route handling; see /core/client/config/core.client.routes
|
||||
app.registerModule('forums.services');
|
||||
app.registerModule('forums.routes', ['ui.router', 'core.routes', 'forums.services']);
|
||||
}(ApplicationConfiguration));
|
||||
26
modules/torrents/client/config/torrents.client.menus.js
Normal file
26
modules/torrents/client/config/torrents.client.menus.js
Normal file
@@ -0,0 +1,26 @@
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
angular
|
||||
.module('torrents')
|
||||
.run(menuConfig);
|
||||
|
||||
menuConfig.$inject = ['menuService', '$translate'];
|
||||
|
||||
function menuConfig(menuService, $translate) {
|
||||
menuService.addMenuItem('topbar', {
|
||||
title: $translate.instant('MENU_TORRENTS'),
|
||||
state: 'torrents',
|
||||
type: 'dropdown',
|
||||
roles: ['*'],
|
||||
position: 0
|
||||
});
|
||||
|
||||
// Add the dropdown list item
|
||||
menuService.addSubMenuItem('topbar', 'torrents', {
|
||||
title: 'List torrents',
|
||||
state: 'torrents.list',
|
||||
roles: ['*']
|
||||
});
|
||||
}
|
||||
}());
|
||||
7
modules/torrents/client/torrents.client.module.js
Normal file
7
modules/torrents/client/torrents.client.module.js
Normal file
@@ -0,0 +1,7 @@
|
||||
(function (app) {
|
||||
'use strict';
|
||||
|
||||
app.registerModule('torrents', ['core']);// The core module is required for special route handling; see /core/client/config/core.client.routes
|
||||
app.registerModule('torrents.services');
|
||||
app.registerModule('torrents.routes', ['ui.router', 'core.routes', 'torrents.services']);
|
||||
}(ApplicationConfiguration));
|
||||
Reference in New Issue
Block a user