diff options
author | Chocobozzz <me@florianbigard.com> | 2021-01-13 10:44:34 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-01-13 10:44:34 +0100 |
commit | d95bc7029012c9f28144fd58948962c49910a1ae (patch) | |
tree | 864832300ce3c5be1141622b06a324bf75a48298 /client/src | |
parent | 9c1a88e3a1dc2a9d97ba0d798c664234541f1dba (diff) | |
download | PeerTube-d95bc7029012c9f28144fd58948962c49910a1ae.tar.gz PeerTube-d95bc7029012c9f28144fd58948962c49910a1ae.tar.zst PeerTube-d95bc7029012c9f28144fd58948962c49910a1ae.zip |
Add title to left menu toggle
Diffstat (limited to 'client/src')
-rw-r--r-- | client/src/app/app.component.html | 2 | ||||
-rw-r--r-- | client/src/app/app.component.ts | 6 | ||||
-rw-r--r-- | client/src/app/core/menu/menu.service.ts | 4 |
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 | ||