diff options
Diffstat (limited to 'client/src/app/menu/menu.component.ts')
-rw-r--r-- | client/src/app/menu/menu.component.ts | 10 |
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 @@ | |||
1 | import { Component, OnInit } from '@angular/core' | 1 | import { Component, OnInit, ViewChild } from '@angular/core' |
2 | import { Router } from '@angular/router' | ||
3 | import { UserRight } from '../../../../shared/models/users/user-right.enum' | 2 | import { UserRight } from '../../../../shared/models/users/user-right.enum' |
4 | import { AuthService, AuthStatus, RedirectService, ServerService } from '../core' | 3 | import { AuthService, AuthStatus, RedirectService, ServerService } from '../core' |
5 | import { User } from '../shared/users/user.model' | 4 | import { User } from '../shared/users/user.model' |
5 | import { 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 | }) |
12 | export class MenuComponent implements OnInit { | 12 | export 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 | ||