aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/menu/menu.component.ts
diff options
context:
space:
mode:
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