aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/core
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-01-23 22:32:43 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-01-23 22:32:43 +0100
commitb99290b1d5d736083513fb8f66e91f61bfe07e0b (patch)
treee0e7fa738ee661a267f5330db35bc46d295f945f /client/src/app/core
parent11ac88de40215783835cf6e6259ff0f6cee258dd (diff)
downloadPeerTube-b99290b1d5d736083513fb8f66e91f61bfe07e0b.tar.gz
PeerTube-b99290b1d5d736083513fb8f66e91f61bfe07e0b.tar.zst
PeerTube-b99290b1d5d736083513fb8f66e91f61bfe07e0b.zip
Client: lazy load admin area
Diffstat (limited to 'client/src/app/core')
-rw-r--r--client/src/app/core/core.module.ts12
-rw-r--r--client/src/app/core/menu/index.ts1
-rw-r--r--client/src/app/core/menu/menu-admin.component.html31
-rw-r--r--client/src/app/core/menu/menu-admin.component.ts7
4 files changed, 48 insertions, 3 deletions
diff --git a/client/src/app/core/core.module.ts b/client/src/app/core/core.module.ts
index 27e6ee1fb..09a6f92f5 100644
--- a/client/src/app/core/core.module.ts
+++ b/client/src/app/core/core.module.ts
@@ -4,7 +4,7 @@ import { HttpModule } from '@angular/http';
4import { RouterModule } from '@angular/router'; 4import { RouterModule } from '@angular/router';
5 5
6import { AuthService } from './auth'; 6import { AuthService } from './auth';
7import { MenuComponent } from './menu'; 7import { MenuComponent, MenuAdminComponent } from './menu';
8import { throwIfAlreadyLoaded } from './module-import-guard'; 8import { throwIfAlreadyLoaded } from './module-import-guard';
9 9
10@NgModule({ 10@NgModule({
@@ -13,8 +13,14 @@ import { throwIfAlreadyLoaded } from './module-import-guard';
13 HttpModule, 13 HttpModule,
14 RouterModule 14 RouterModule
15 ], 15 ],
16 declarations: [ MenuComponent ], 16 declarations: [
17 exports: [ MenuComponent ], 17 MenuComponent,
18 MenuAdminComponent
19 ],
20 exports: [
21 MenuComponent,
22 MenuAdminComponent
23 ],
18 providers: [ AuthService ] 24 providers: [ AuthService ]
19}) 25})
20export class CoreModule { 26export class CoreModule {
diff --git a/client/src/app/core/menu/index.ts b/client/src/app/core/menu/index.ts
index d07a1144c..ff40f26e1 100644
--- a/client/src/app/core/menu/index.ts
+++ b/client/src/app/core/menu/index.ts
@@ -1 +1,2 @@
1export * from './menu.component'; 1export * from './menu.component';
2export * from './menu-admin.component';
diff --git a/client/src/app/core/menu/menu-admin.component.html b/client/src/app/core/menu/menu-admin.component.html
new file mode 100644
index 000000000..ad7a7a1b4
--- /dev/null
+++ b/client/src/app/core/menu/menu-admin.component.html
@@ -0,0 +1,31 @@
1<menu class="col-md-2 col-sm-3 col-xs-3">
2
3 <div class="panel-block">
4 <div id="panel-users" class="panel-button">
5 <span class="hidden-xs glyphicon glyphicon-user"></span>
6 <a [routerLink]="['/admin/users/list']">List users</a>
7 </div>
8
9 <div id="panel-friends" class="panel-button">
10 <span class="hidden-xs glyphicon glyphicon-cloud"></span>
11 <a [routerLink]="['/admin/friends/list']">List friends</a>
12 </div>
13
14 <div id="panel-request-stats" class="panel-button">
15 <span class="hidden-xs glyphicon glyphicon-stats"></span>
16 <a [routerLink]="['/admin/requests/stats']">Request stats</a>
17 </div>
18
19 <div id="panel-video-abuses" class="panel-button">
20 <span class="hidden-xs glyphicon glyphicon-alert"></span>
21 <a [routerLink]="['/admin/video-abuses/list']">Video abuses</a>
22 </div>
23 </div>
24
25 <div class="panel-block">
26 <div id="panel-quit-administration" class="panel-button">
27 <span class="hidden-xs glyphicon glyphicon-cog"></span>
28 <a [routerLink]="['/videos/list']">Quit admin.</a>
29 </div>
30 </div>
31</menu>
diff --git a/client/src/app/core/menu/menu-admin.component.ts b/client/src/app/core/menu/menu-admin.component.ts
new file mode 100644
index 000000000..59ffccf9f
--- /dev/null
+++ b/client/src/app/core/menu/menu-admin.component.ts
@@ -0,0 +1,7 @@
1import { Component } from '@angular/core';
2
3@Component({
4 selector: 'my-menu-admin',
5 templateUrl: './menu-admin.component.html'
6})
7export class MenuAdminComponent { }