aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/header/header.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/header/header.component.ts')
-rw-r--r--client/src/app/header/header.component.ts20
1 files changed, 10 insertions, 10 deletions
diff --git a/client/src/app/header/header.component.ts b/client/src/app/header/header.component.ts
index 192d6945b..580535669 100644
--- a/client/src/app/header/header.component.ts
+++ b/client/src/app/header/header.component.ts
@@ -42,6 +42,16 @@ export class HeaderComponent implements OnInit {
42 ) 42 )
43 } 43 }
44 44
45 get routerLink () {
46 if (this.isUserLoggedIn()) {
47 return [ '/videos/upload' ]
48 } else if (this.isRegistrationAllowed()) {
49 return [ '/signup' ]
50 } else {
51 return [ '/login', { fromUpload: true } ]
52 }
53 }
54
45 doSearch () { 55 doSearch () {
46 const queryParams: Params = {} 56 const queryParams: Params = {}
47 57
@@ -67,16 +77,6 @@ export class HeaderComponent implements OnInit {
67 this.serverConfig.signup.allowedForCurrentIP 77 this.serverConfig.signup.allowedForCurrentIP
68 } 78 }
69 79
70 goToUpload () {
71 if (this.isUserLoggedIn()) {
72 this.router.navigate([ '/videos/upload' ])
73 } else if (this.isRegistrationAllowed()) {
74 this.router.navigate([ '/signup' ])
75 } else {
76 this.router.navigate([ '/login', { fromUpload: true } ])
77 }
78 }
79
80 private loadUserLanguagesIfNeeded (queryParams: any) { 80 private loadUserLanguagesIfNeeded (queryParams: any) {
81 if (queryParams && queryParams.languageOneOf) return of(queryParams) 81 if (queryParams && queryParams.languageOneOf) return of(queryParams)
82 82