aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/header/header.component.ts
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2020-01-10 15:52:25 +0100
committerRigel Kent <sendmemail@rigelk.eu>2020-01-10 15:52:25 +0100
commit333952bc6478358ef6979b35d8dc215283b4717e (patch)
tree33923cfe74ae19b3f7102c301fe2372abfda06f8 /client/src/app/header/header.component.ts
parentf24c8b142d89e4a9ce40da9faed889c1985b53cc (diff)
downloadPeerTube-333952bc6478358ef6979b35d8dc215283b4717e.tar.gz
PeerTube-333952bc6478358ef6979b35d8dc215283b4717e.tar.zst
PeerTube-333952bc6478358ef6979b35d8dc215283b4717e.zip
Reinstate routerLink property of upload button
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