export type MenuLink = {
icon: GlobalIconName
+ iconClass?: string
label: string
// Used by the left menu for example
export class MenuService {
isMenuDisplayed = true
isMenuChangedByUser = false
- menuWidth = 240 // should be kept equal to $menu-width
+ menuWidth = 240 // should be kept equal to $menu-width
constructor (
private screenService: ScreenService
// On touch screens, lock body scroll and display content overlay when memu is opened
if (this.isMenuDisplayed) {
document.body.classList.add('menu-open')
- this.screenService.onFingerSwipe('left', () => { this.setMenuDisplay(false) })
+ this.screenService.onFingerSwipe('left', () => this.setMenuDisplay(false))
return
}
let links: MenuLink[] = []
if (userCanSeeVideosLink) {
+ links.push({
+ path: '/my-library/video-channels',
+ icon: 'channel' as GlobalIconName,
+ iconClass: 'channel-icon',
+ shortLabel: $localize`Channels`,
+ label: $localize`My channels`
+ })
+
links.push({
path: '/my-library/videos',
icon: 'videos' as GlobalIconName,
return {
key: 'in-my-library',
- title: 'In my library',
+ title: $localize`In my library`,
links
}
}
path: '/videos/trending'
},
{
- icon: 'recently-added' as 'recently-added',
+ icon: 'add' as 'add',
label: $localize`Recently added videos`,
shortLabel: $localize`Recently added`,
path: '/videos/recently-added'