Add "media player"-button to the left menu (#129)

This commit is contained in:
Lu 2023-05-25 16:54:58 +03:00 committed by GitHub
parent 9af6ef8299
commit 2e30b0b8e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 4 deletions

View File

@ -179,6 +179,10 @@
<mat-icon>badge</mat-icon>
<span>{{ 'App.Badges' | translate }}</span>
</a>
<a mat-menu-item (click)="toggleProfileMenu(); openMediaPlayer()" [routerLinkActiveOptions]="{ exact: true }" routerLinkActive="active">
<mat-icon>play_circle</mat-icon>
<span>{{ 'App.MediaPlayer' | translate }}</span>
</a>
<a [routerLink]="['/settings']" mat-menu-item (click)="toggleProfileMenu()" [routerLinkActiveOptions]="{ exact: true }" routerLinkActive="active">
<mat-icon>settings</mat-icon>
<span>{{ 'App.Settings' | translate }}</span>

View File

@ -70,7 +70,8 @@ export class AppComponent {
public searchService: SearchService,
public theme: ThemeService,
private state: State,
private eventService: EventService
private eventService: EventService,
private optionService: OptionsService
) {
if (!this.visibilityHandler) {
this.visibilityHandler = addEventListener('visibilitychange', (event) => {
@ -188,6 +189,10 @@ export class AppComponent {
this.draweraccount.toggle();
}
openMediaPlayer() {
this.optionService.values.showMediaPlayer = true;
}
/** Run initialize whenever user has been authenticated. */
async initialize() {
console.log('INITIALIZE IS RUNNING....');

View File

@ -25,7 +25,8 @@
"Badges": "Badges",
"Settings": "Settings",
"About": "About",
"Logout": "Logout"
"Logout": "Logout",
"MediaPlayer": "Media Player"
},
"Badge": {
"CreatedBy": "Created by",

View File

@ -25,7 +25,8 @@
"Badges": "Badges",
"Settings": "Settings",
"About": "About",
"Logout": "Logout"
"Logout": "Logout",
"MediaPlayer": "Mediespiller"
},
"Badge": {
"CreatedBy": "Created by",

View File

@ -25,7 +25,8 @@
"Badges": "Badges",
"Settings": "Settings",
"About": "About",
"Logout": "Logout"
"Logout": "Logout",
"MediaPlayer": "Media Player"
},
"Badge": {
"CreatedBy": "Created by",