Fix subscription entry displayed for anonymous
This commit is contained in:
parent
2929765025
commit
5d0e72ba50
|
@ -47,13 +47,13 @@
|
|||
<ul class="ul-unstyle">
|
||||
<li *ngFor="let link of menuSection.links">
|
||||
@if (link.isPrimaryButton === true) {
|
||||
<my-button class="d-block menu-button" theme="primary" [icon]="link.icon" [ariaLabel]="link.label" [ptRouterLink]="link.path">
|
||||
<my-button class="d-block menu-button" [ngClass]="link.ngClass" theme="primary" [icon]="link.icon" [ariaLabel]="link.label" [ptRouterLink]="link.path">
|
||||
@if (!collapsed) {
|
||||
{{ link.label }}
|
||||
}
|
||||
</my-button>
|
||||
} @else {
|
||||
<a class="menu-link ellipsis" [routerLink]="link.path" routerLinkActive="active">
|
||||
<a class="menu-link ellipsis" [routerLink]="link.path" routerLinkActive="active" [ngClass]="link.ngClass">
|
||||
<my-global-icon *ngIf="link.icon" [iconName]="link.icon" [ngClass]="link.iconClass" aria-hidden="true"></my-global-icon>
|
||||
<span [ngClass]="{ 'visually-hidden': collapsed }">{{ link.label }}</span>
|
||||
</a>
|
||||
|
|
|
@ -28,6 +28,8 @@ type MenuLink = {
|
|||
path: string
|
||||
|
||||
isPrimaryButton?: boolean // default false
|
||||
|
||||
ngClass?: string
|
||||
}
|
||||
|
||||
type MenuSection = {
|
||||
|
@ -73,11 +75,11 @@ export class MenuComponent implements OnInit, OnDestroy {
|
|||
) { }
|
||||
|
||||
get shortDescription () {
|
||||
return this.serverConfig.instance.shortDescription
|
||||
return this.serverService.getHTMLConfig().instance.shortDescription
|
||||
}
|
||||
|
||||
get instanceName () {
|
||||
return this.serverConfig.instance.name
|
||||
return this.serverService.getHTMLConfig().instance.name
|
||||
}
|
||||
|
||||
get collapsed () {
|
||||
|
@ -128,7 +130,7 @@ export class MenuComponent implements OnInit, OnDestroy {
|
|||
}
|
||||
|
||||
private buildQuickLinks (): MenuSection {
|
||||
return {
|
||||
const base = {
|
||||
key: 'quick-access',
|
||||
title: $localize`Quick access`,
|
||||
links: [
|
||||
|
@ -136,14 +138,19 @@ export class MenuComponent implements OnInit, OnDestroy {
|
|||
path: this.redirectService.getDefaultRoute(),
|
||||
icon: 'home' as GlobalIconName,
|
||||
label: $localize`Home`
|
||||
},
|
||||
{
|
||||
path: '/videos/subscriptions',
|
||||
icon: 'subscriptions' as GlobalIconName,
|
||||
label: $localize`Subscriptions`
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
if (this.loggedIn) {
|
||||
base.links.push({
|
||||
path: '/videos/subscriptions',
|
||||
icon: 'subscriptions' as GlobalIconName,
|
||||
label: $localize`Subscriptions`
|
||||
})
|
||||
}
|
||||
|
||||
return base
|
||||
}
|
||||
|
||||
private buildLibraryLinks (): MenuSection {
|
||||
|
@ -193,7 +200,8 @@ export class MenuComponent implements OnInit, OnDestroy {
|
|||
path: '/videos/upload',
|
||||
icon: 'upload' as GlobalIconName,
|
||||
label: $localize`Publish`,
|
||||
isPrimaryButton: true
|
||||
isPrimaryButton: true,
|
||||
ngClass: 'publish-button'
|
||||
}
|
||||
])
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue