Browse Source

Add title to left menu toggle

pull/3592/head
Chocobozzz 1 week ago
parent
commit
d95bc70290
No known key found for this signature in database GPG Key ID: 583A612D890159BE
3 changed files with 11 additions and 1 deletions
  1. +1
    -1
      client/src/app/app.component.html
  2. +6
    -0
      client/src/app/app.component.ts
  3. +4
    -0
      client/src/app/core/menu/menu.service.ts

+ 1
- 1
client/src/app/app.component.html 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>


+ 6
- 0
client/src/app/app.component.ts 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()
}


+ 4
- 0
client/src/app/core/menu/menu.service.ts View File

@@ -25,6 +25,10 @@ export class MenuService {
this.isMenuChangedByUser = true
}

isDisplayed () {
return this.isMenuDisplayed
}

setMenuDisplay (display: boolean) {
this.isMenuDisplayed = display



Loading…
Cancel
Save