aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/core
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-04-10 20:29:33 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-04-10 20:29:33 +0200
commita184c71b526000f60f00649d260638723d426e6a (patch)
tree70fcb85cf5780519e59b4812167ce6f896d73afa /client/src/app/core
parentc36b4ff77ebcd6cf3a71f0a5c8fb17fa0f4a0d24 (diff)
downloadPeerTube-a184c71b526000f60f00649d260638723d426e6a.tar.gz
PeerTube-a184c71b526000f60f00649d260638723d426e6a.tar.zst
PeerTube-a184c71b526000f60f00649d260638723d426e6a.zip
Client: support signup
Diffstat (limited to 'client/src/app/core')
-rw-r--r--client/src/app/core/menu/menu.component.html5
-rw-r--r--client/src/app/core/menu/menu.component.ts6
2 files changed, 11 insertions, 0 deletions
diff --git a/client/src/app/core/menu/menu.component.html b/client/src/app/core/menu/menu.component.html
index 1e9a53246..de17940a1 100644
--- a/client/src/app/core/menu/menu.component.html
+++ b/client/src/app/core/menu/menu.component.html
@@ -12,6 +12,11 @@
12 </span> 12 </span>
13 </div> 13 </div>
14 14
15 <div *ngIf="!isLoggedIn && isRegistrationEnabled()" id="panel-user-register" class="panel-button">
16 <span class="hidden-xs glyphicon glyphicon-user"></span>
17 <a [routerLink]="['/signup']">Signup</a>
18 </div>
19
15 <div *ngIf="isLoggedIn" id="panel-user-account" class="panel-button"> 20 <div *ngIf="isLoggedIn" id="panel-user-account" class="panel-button">
16 <span class="hidden-xs glyphicon glyphicon-user"></span> 21 <span class="hidden-xs glyphicon glyphicon-user"></span>
17 <a [routerLink]="['/account']">My account</a> 22 <a [routerLink]="['/account']">My account</a>
diff --git a/client/src/app/core/menu/menu.component.ts b/client/src/app/core/menu/menu.component.ts
index 5ca60e5e0..d1f0fa807 100644
--- a/client/src/app/core/menu/menu.component.ts
+++ b/client/src/app/core/menu/menu.component.ts
@@ -2,6 +2,7 @@ import { Component, OnInit } from '@angular/core';
2import { Router } from '@angular/router'; 2import { Router } from '@angular/router';
3 3
4import { AuthService, AuthStatus } from '../auth'; 4import { AuthService, AuthStatus } from '../auth';
5import { ConfigService } from '../config';
5 6
6@Component({ 7@Component({
7 selector: 'my-menu', 8 selector: 'my-menu',
@@ -12,6 +13,7 @@ export class MenuComponent implements OnInit {
12 13
13 constructor ( 14 constructor (
14 private authService: AuthService, 15 private authService: AuthService,
16 private configService: ConfigService,
15 private router: Router 17 private router: Router
16 ) {} 18 ) {}
17 19
@@ -33,6 +35,10 @@ export class MenuComponent implements OnInit {
33 ); 35 );
34 } 36 }
35 37
38 isRegistrationEnabled() {
39 return this.configService.getConfig().signup.enabled;
40 }
41
36 isUserAdmin() { 42 isUserAdmin() {
37 return this.authService.isAdmin(); 43 return this.authService.isAdmin();
38 } 44 }