Add title to left menu toggle
This commit is contained in:
parent
9c1a88e3a1
commit
d95bc70290
|
@ -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>
|
||||
|
|
|
@ -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()
|
||||
}
|
||||
|
|
|
@ -25,6 +25,10 @@ export class MenuService {
|
|||
this.isMenuChangedByUser = true
|
||||
}
|
||||
|
||||
isDisplayed () {
|
||||
return this.isMenuDisplayed
|
||||
}
|
||||
|
||||
setMenuDisplay (display: boolean) {
|
||||
this.isMenuDisplayed = display
|
||||
|
||||
|
|
Loading…
Reference in New Issue