aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--client/src/app/app.component.html2
-rw-r--r--client/src/app/app.component.ts6
-rw-r--r--client/src/app/core/menu/menu.service.ts4
3 files changed, 11 insertions, 1 deletions
diff --git a/client/src/app/app.component.html b/client/src/app/app.component.html
index 9a8a8e14f..77d876f8e 100644
--- a/client/src/app/app.component.html
+++ b/client/src/app/app.component.html
@@ -6,7 +6,7 @@
6 <div class="header"> 6 <div class="header">
7 7
8 <div class="top-left-block"> 8 <div class="top-left-block">
9 <span class="icon icon-menu" (click)="menu.toggleMenu()"></span> 9 <span class="icon icon-menu" role="button" [title]="getToggleTitle()" (click)="menu.toggleMenu()"></span>
10 10
11 <a class="peertube-title" [routerLink]="defaultRoute"> 11 <a class="peertube-title" [routerLink]="defaultRoute">
12 <span class="icon icon-logo"></span> 12 <span class="icon icon-logo"></span>
diff --git a/client/src/app/app.component.ts b/client/src/app/app.component.ts
index 75f4bdfe6..3d1026ac4 100644
--- a/client/src/app/app.component.ts
+++ b/client/src/app/app.component.ts
@@ -103,6 +103,12 @@ export class AppComponent implements OnInit, AfterViewInit {
103 this.pluginService.initializeCustomModal(this.customModal) 103 this.pluginService.initializeCustomModal(this.customModal)
104 } 104 }
105 105
106 getToggleTitle () {
107 if (this.menu.isDisplayed()) return $localize`Close the left menu`
108
109 return $localize`Open the left menu`
110 }
111
106 isUserLoggedIn () { 112 isUserLoggedIn () {
107 return this.authService.isLoggedIn() 113 return this.authService.isLoggedIn()
108 } 114 }
diff --git a/client/src/app/core/menu/menu.service.ts b/client/src/app/core/menu/menu.service.ts
index 9c0433bca..502d3bb2f 100644
--- a/client/src/app/core/menu/menu.service.ts
+++ b/client/src/app/core/menu/menu.service.ts
@@ -25,6 +25,10 @@ export class MenuService {
25 this.isMenuChangedByUser = true 25 this.isMenuChangedByUser = true
26 } 26 }
27 27
28 isDisplayed () {
29 return this.isMenuDisplayed
30 }
31
28 setMenuDisplay (display: boolean) { 32 setMenuDisplay (display: boolean) {
29 this.isMenuDisplayed = display 33 this.isMenuDisplayed = display
30 34