Add title to left menu toggle

pull/3592/head
Chocobozzz 2021-01-13 10:44:34 +01:00
parent 9c1a88e3a1
commit d95bc70290
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
3 changed files with 11 additions and 1 deletions

View File

@ -6,7 +6,7 @@
<div class="header">
<div class="top-left-block">
<span class="icon icon-menu" (click)="menu.toggleMenu()"></span>
<span class="icon icon-menu" role="button" [title]="getToggleTitle()" (click)="menu.toggleMenu()"></span>
<a class="peertube-title" [routerLink]="defaultRoute">
<span class="icon icon-logo"></span>

View File

@ -103,6 +103,12 @@ export class AppComponent implements OnInit, AfterViewInit {
this.pluginService.initializeCustomModal(this.customModal)
}
getToggleTitle () {
if (this.menu.isDisplayed()) return $localize`Close the left menu`
return $localize`Open the left menu`
}
isUserLoggedIn () {
return this.authService.isLoggedIn()
}

View File

@ -25,6 +25,10 @@ export class MenuService {
this.isMenuChangedByUser = true
}
isDisplayed () {
return this.isMenuDisplayed
}
setMenuDisplay (display: boolean) {
this.isMenuDisplayed = display