diff options
author | Chocobozzz <me@florianbigard.com> | 2022-09-28 15:43:59 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-09-28 15:43:59 +0200 |
commit | 77662dae240e6a60e0c5e659e79d48df8d6a5e99 (patch) | |
tree | 63c5b877eebf8f9a8f253b7a268c17ccef95a579 /client | |
parent | 251ce26db364e1d7468b43ca917dee648a9ad133 (diff) | |
download | PeerTube-77662dae240e6a60e0c5e659e79d48df8d6a5e99.tar.gz PeerTube-77662dae240e6a60e0c5e659e79d48df8d6a5e99.tar.zst PeerTube-77662dae240e6a60e0c5e659e79d48df8d6a5e99.zip |
Add channels link in menu
Diffstat (limited to 'client')
-rw-r--r-- | client/src/app/core/menu/menu.service.ts | 9 | ||||
-rw-r--r-- | client/src/app/menu/menu.component.html | 4 | ||||
-rw-r--r-- | client/src/app/menu/menu.component.scss | 21 | ||||
-rw-r--r-- | client/src/assets/images/feather/log-out.svg | 2 |
4 files changed, 18 insertions, 18 deletions
diff --git a/client/src/app/core/menu/menu.service.ts b/client/src/app/core/menu/menu.service.ts index 81837db7e..d865c7da2 100644 --- a/client/src/app/core/menu/menu.service.ts +++ b/client/src/app/core/menu/menu.service.ts | |||
@@ -7,6 +7,7 @@ import { ScreenService } from '../wrappers' | |||
7 | 7 | ||
8 | export type MenuLink = { | 8 | export type MenuLink = { |
9 | icon: GlobalIconName | 9 | icon: GlobalIconName |
10 | iconClass?: string | ||
10 | 11 | ||
11 | label: string | 12 | label: string |
12 | // Used by the left menu for example | 13 | // Used by the left menu for example |
@@ -71,6 +72,14 @@ export class MenuService { | |||
71 | 72 | ||
72 | if (userCanSeeVideosLink) { | 73 | if (userCanSeeVideosLink) { |
73 | links.push({ | 74 | links.push({ |
75 | path: '/my-library/video-channels', | ||
76 | icon: 'channel' as GlobalIconName, | ||
77 | iconClass: 'channel-icon', | ||
78 | shortLabel: $localize`Channels`, | ||
79 | label: $localize`My channels` | ||
80 | }) | ||
81 | |||
82 | links.push({ | ||
74 | path: '/my-library/videos', | 83 | path: '/my-library/videos', |
75 | icon: 'videos' as GlobalIconName, | 84 | icon: 'videos' as GlobalIconName, |
76 | shortLabel: $localize`Videos`, | 85 | shortLabel: $localize`Videos`, |
diff --git a/client/src/app/menu/menu.component.html b/client/src/app/menu/menu.component.html index c1e5f79a6..c5d08ab75 100644 --- a/client/src/app/menu/menu.component.html +++ b/client/src/app/menu/menu.component.html | |||
@@ -88,7 +88,7 @@ | |||
88 | </a> | 88 | </a> |
89 | 89 | ||
90 | <a class="menu-link" routerLink="/my-library" routerLinkActive="active" #libraryLink (click)="onActiveLinkScrollToAnchor(libraryLink)"> | 90 | <a class="menu-link" routerLink="/my-library" routerLinkActive="active" #libraryLink (click)="onActiveLinkScrollToAnchor(libraryLink)"> |
91 | <my-global-icon iconName="channel" aria-hidden="true"></my-global-icon> | 91 | <my-global-icon class="channel-icon" iconName="channel" aria-hidden="true"></my-global-icon> |
92 | <ng-container i18n>My library</ng-container> | 92 | <ng-container i18n>My library</ng-container> |
93 | </a> | 93 | </a> |
94 | 94 | ||
@@ -111,7 +111,7 @@ | |||
111 | <div i18n class="block-title">{{ menuSection.title }}</div> | 111 | <div i18n class="block-title">{{ menuSection.title }}</div> |
112 | 112 | ||
113 | <a class="menu-link" *ngFor="let link of menuSection.links" [routerLink]="link.path" routerLinkActive="active"> | 113 | <a class="menu-link" *ngFor="let link of menuSection.links" [routerLink]="link.path" routerLinkActive="active"> |
114 | <my-global-icon *ngIf="link.icon" [iconName]="link.icon" aria-hidden="true"></my-global-icon> | 114 | <my-global-icon *ngIf="link.icon" [iconName]="link.icon" [ngClass]="link.iconClass" aria-hidden="true"></my-global-icon> |
115 | <ng-container>{{ link.shortLabel }}</ng-container> | 115 | <ng-container>{{ link.shortLabel }}</ng-container> |
116 | </a> | 116 | </a> |
117 | </div> | 117 | </div> |
diff --git a/client/src/app/menu/menu.component.scss b/client/src/app/menu/menu.component.scss index a824c69fe..6cfe26431 100644 --- a/client/src/app/menu/menu.component.scss +++ b/client/src/app/menu/menu.component.scss | |||
@@ -391,26 +391,17 @@ my-actor-avatar { | |||
391 | } | 391 | } |
392 | 392 | ||
393 | my-global-icon { | 393 | my-global-icon { |
394 | &[iconName=playlists] { | 394 | position: relative; |
395 | top: -1px; | ||
396 | |||
397 | .playlist-icon { | ||
395 | @include margin-right(16px); | 398 | @include margin-right(16px); |
396 | 399 | ||
397 | height: 24px; | 400 | height: 24px; |
398 | width: 24px; | 401 | width: 24px; |
399 | } | 402 | } |
400 | 403 | ||
401 | &[iconName=videos] { | 404 | &.channel-icon { |
402 | position: relative; | 405 | top: -2px; |
403 | right: -1px; | ||
404 | } | ||
405 | |||
406 | &[iconName=channel] { | ||
407 | margin-top: -2px; | ||
408 | } | ||
409 | |||
410 | &[iconName='sign-out'] { | ||
411 | position: relative; | ||
412 | right: -2px; | ||
413 | height: 20px; | ||
414 | width: 20px; | ||
415 | } | 406 | } |
416 | } | 407 | } |
diff --git a/client/src/assets/images/feather/log-out.svg b/client/src/assets/images/feather/log-out.svg index c9002c903..627b44493 100644 --- a/client/src/assets/images/feather/log-out.svg +++ b/client/src/assets/images/feather/log-out.svg | |||
@@ -1 +1 @@ | |||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-log-out"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path><polyline points="16 17 21 12 16 7"></polyline><line x1="21" y1="12" x2="9" y2="12"></line></svg> \ No newline at end of file | <svg xmlns="http://www.w3.org/2000/svg" width="22" height="24" viewBox="0 0 22 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-log-out"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path><polyline points="16 17 21 12 16 7"></polyline><line x1="21" y1="12" x2="9" y2="12"></line></svg> | ||