Add title to left menu toggle
This commit is contained in:
parent
9c1a88e3a1
commit
d95bc70290
|
@ -6,7 +6,7 @@
|
||||||
<div class="header">
|
<div class="header">
|
||||||
|
|
||||||
<div class="top-left-block">
|
<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">
|
<a class="peertube-title" [routerLink]="defaultRoute">
|
||||||
<span class="icon icon-logo"></span>
|
<span class="icon icon-logo"></span>
|
||||||
|
|
|
@ -103,6 +103,12 @@ export class AppComponent implements OnInit, AfterViewInit {
|
||||||
this.pluginService.initializeCustomModal(this.customModal)
|
this.pluginService.initializeCustomModal(this.customModal)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getToggleTitle () {
|
||||||
|
if (this.menu.isDisplayed()) return $localize`Close the left menu`
|
||||||
|
|
||||||
|
return $localize`Open the left menu`
|
||||||
|
}
|
||||||
|
|
||||||
isUserLoggedIn () {
|
isUserLoggedIn () {
|
||||||
return this.authService.isLoggedIn()
|
return this.authService.isLoggedIn()
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,6 +25,10 @@ export class MenuService {
|
||||||
this.isMenuChangedByUser = true
|
this.isMenuChangedByUser = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
isDisplayed () {
|
||||||
|
return this.isMenuDisplayed
|
||||||
|
}
|
||||||
|
|
||||||
setMenuDisplay (display: boolean) {
|
setMenuDisplay (display: boolean) {
|
||||||
this.isMenuDisplayed = display
|
this.isMenuDisplayed = display
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue