aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-09-28 15:43:59 +0200
committerChocobozzz <me@florianbigard.com>2022-09-28 15:43:59 +0200
commit77662dae240e6a60e0c5e659e79d48df8d6a5e99 (patch)
tree63c5b877eebf8f9a8f253b7a268c17ccef95a579 /client/src/app
parent251ce26db364e1d7468b43ca917dee648a9ad133 (diff)
downloadPeerTube-77662dae240e6a60e0c5e659e79d48df8d6a5e99.tar.gz
PeerTube-77662dae240e6a60e0c5e659e79d48df8d6a5e99.tar.zst
PeerTube-77662dae240e6a60e0c5e659e79d48df8d6a5e99.zip
Add channels link in menu
Diffstat (limited to 'client/src/app')
-rw-r--r--client/src/app/core/menu/menu.service.ts9
-rw-r--r--client/src/app/menu/menu.component.html4
-rw-r--r--client/src/app/menu/menu.component.scss21
3 files changed, 17 insertions, 17 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
8export type MenuLink = { 8export 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
393my-global-icon { 393my-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}