aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/menu/menu.component.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-06-28 13:59:48 +0200
committerChocobozzz <me@florianbigard.com>2018-06-28 15:53:12 +0200
commit8afc19a6121569da054462c7cb351a3f13030a32 (patch)
tree6dba42963681062536e635dd3ca401e1c7b0ca9f /client/src/app/menu/menu.component.ts
parent3ea9a1c311c3e3c55fb95560d4dd99a77c52df4a (diff)
downloadPeerTube-8afc19a6121569da054462c7cb351a3f13030a32.tar.gz
PeerTube-8afc19a6121569da054462c7cb351a3f13030a32.tar.zst
PeerTube-8afc19a6121569da054462c7cb351a3f13030a32.zip
Add ability to choose the language
Diffstat (limited to 'client/src/app/menu/menu.component.ts')
-rw-r--r--client/src/app/menu/menu.component.ts10
1 files changed, 8 insertions, 2 deletions
diff --git a/client/src/app/menu/menu.component.ts b/client/src/app/menu/menu.component.ts
index c0aea89b3..dded6b4d5 100644
--- a/client/src/app/menu/menu.component.ts
+++ b/client/src/app/menu/menu.component.ts
@@ -1,8 +1,8 @@
1import { Component, OnInit } from '@angular/core' 1import { Component, OnInit, ViewChild } from '@angular/core'
2import { Router } from '@angular/router'
3import { UserRight } from '../../../../shared/models/users/user-right.enum' 2import { UserRight } from '../../../../shared/models/users/user-right.enum'
4import { AuthService, AuthStatus, RedirectService, ServerService } from '../core' 3import { AuthService, AuthStatus, RedirectService, ServerService } from '../core'
5import { User } from '../shared/users/user.model' 4import { User } from '../shared/users/user.model'
5import { LanguageChooserComponent } from '@app/menu/language-chooser.component'
6 6
7@Component({ 7@Component({
8 selector: 'my-menu', 8 selector: 'my-menu',
@@ -10,6 +10,8 @@ import { User } from '../shared/users/user.model'
10 styleUrls: [ './menu.component.scss' ] 10 styleUrls: [ './menu.component.scss' ]
11}) 11})
12export class MenuComponent implements OnInit { 12export class MenuComponent implements OnInit {
13 @ViewChild('languageChooserModal') languageChooserModal: LanguageChooserComponent
14
13 user: User 15 user: User
14 isLoggedIn: boolean 16 isLoggedIn: boolean
15 userHasAdminAccess = false 17 userHasAdminAccess = false
@@ -90,6 +92,10 @@ export class MenuComponent implements OnInit {
90 this.redirectService.redirectToHomepage() 92 this.redirectService.redirectToHomepage()
91 } 93 }
92 94
95 openLanguageChooser () {
96 this.languageChooserModal.show()
97 }
98
93 private computeIsUserHasAdminAccess () { 99 private computeIsUserHasAdminAccess () {
94 const right = this.getFirstAdminRightAvailable() 100 const right = this.getFirstAdminRightAvailable()
95 101