mirror of https://github.com/ghostfolio/ghostfolio
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
375 lines
11 KiB
375 lines
11 KiB
<mat-toolbar class="px-0">
|
|
<ng-container *ngIf="user">
|
|
<div class="d-flex h-100 logo-container" [ngClass]="{ filled: hasTabs }">
|
|
<a
|
|
class="align-items-center justify-content-start rounded-0"
|
|
mat-button
|
|
[ngClass]="{ 'w-100': hasTabs }"
|
|
[routerLink]="['/']"
|
|
>
|
|
<gf-logo class="px-2" [label]="pageTitle"></gf-logo>
|
|
</a>
|
|
</div>
|
|
<span class="spacer"></span>
|
|
<ul class="alig-items-center d-flex list-inline m-0 px-2">
|
|
<li class="list-inline-item">
|
|
<a
|
|
class="d-none d-sm-block"
|
|
i18n
|
|
mat-flat-button
|
|
[ngClass]="{
|
|
'font-weight-bold':
|
|
currentRoute === 'home' || currentRoute === 'zen',
|
|
'text-decoration-underline':
|
|
currentRoute === 'home' || currentRoute === 'zen'
|
|
}"
|
|
[routerLink]="['/']"
|
|
>Overview</a
|
|
>
|
|
</li>
|
|
<li class="list-inline-item">
|
|
<a
|
|
class="d-none d-sm-block"
|
|
i18n
|
|
mat-flat-button
|
|
[ngClass]="{
|
|
'font-weight-bold': currentRoute === 'portfolio',
|
|
'text-decoration-underline': currentRoute === 'portfolio'
|
|
}"
|
|
[routerLink]="['/portfolio']"
|
|
>Portfolio</a
|
|
>
|
|
</li>
|
|
<li class="list-inline-item">
|
|
<a
|
|
class="d-none d-sm-block"
|
|
i18n
|
|
mat-flat-button
|
|
[ngClass]="{
|
|
'font-weight-bold': currentRoute === 'accounts',
|
|
'text-decoration-underline': currentRoute === 'accounts'
|
|
}"
|
|
[routerLink]="['/accounts']"
|
|
>Accounts</a
|
|
>
|
|
</li>
|
|
<li *ngIf="hasPermissionToAccessAdminControl" class="list-inline-item">
|
|
<a
|
|
class="d-none d-sm-block"
|
|
i18n
|
|
mat-flat-button
|
|
[ngClass]="{
|
|
'font-weight-bold': currentRoute === 'admin',
|
|
'text-decoration-underline': currentRoute === 'admin'
|
|
}"
|
|
[routerLink]="['/admin']"
|
|
>Admin Control</a
|
|
>
|
|
</li>
|
|
<li class="list-inline-item">
|
|
<a
|
|
class="d-none d-sm-block"
|
|
i18n
|
|
mat-flat-button
|
|
[ngClass]="{
|
|
'font-weight-bold': currentRoute === routeResources,
|
|
'text-decoration-underline': currentRoute === routeResources
|
|
}"
|
|
[routerLink]="routerLinkResources"
|
|
>Resources</a
|
|
>
|
|
</li>
|
|
<li
|
|
*ngIf="
|
|
hasPermissionForSubscription && user?.subscription?.type === 'Basic'
|
|
"
|
|
class="list-inline-item"
|
|
>
|
|
<a
|
|
class="d-none d-sm-block"
|
|
i18n
|
|
mat-flat-button
|
|
[ngClass]="{
|
|
'font-weight-bold': currentRoute === routePricing,
|
|
'text-decoration-underline': currentRoute === routePricing
|
|
}"
|
|
[routerLink]="routerLinkPricing"
|
|
>Pricing</a
|
|
>
|
|
</li>
|
|
<li class="list-inline-item">
|
|
<a
|
|
class="d-none d-sm-block"
|
|
i18n
|
|
mat-flat-button
|
|
[ngClass]="{
|
|
'font-weight-bold': currentRoute === routeAbout,
|
|
'text-decoration-underline': currentRoute === routeAbout
|
|
}"
|
|
[routerLink]="routerLinkAbout"
|
|
>About</a
|
|
>
|
|
</li>
|
|
<li *ngIf="hasPermissionToAccessAssistant" class="list-inline-item">
|
|
<button
|
|
#assistantTrigger="matMenuTrigger"
|
|
class="h-100 no-min-width px-2"
|
|
mat-button
|
|
[mat-menu-trigger-for]="assistantMenu"
|
|
[matMenuTriggerRestoreFocus]="false"
|
|
(menuOpened)="onOpenAssistant()"
|
|
>
|
|
<ion-icon name="search-outline"></ion-icon>
|
|
</button>
|
|
<mat-menu
|
|
#assistantMenu="matMenu"
|
|
class="assistant"
|
|
xPosition="before"
|
|
[overlapTrigger]="true"
|
|
(closed)="assistantElement?.setIsOpen(false)"
|
|
>
|
|
<gf-assistant
|
|
#assistant
|
|
[deviceType]="deviceType"
|
|
(closed)="closeAssistant()"
|
|
/>
|
|
</mat-menu>
|
|
</li>
|
|
<li class="list-inline-item">
|
|
<button
|
|
class="no-min-width px-1"
|
|
mat-flat-button
|
|
[matMenuTriggerFor]="accountMenu"
|
|
(menuClosed)="onMenuClosed()"
|
|
(menuOpened)="onMenuOpened()"
|
|
>
|
|
<ion-icon
|
|
class="d-none d-sm-block"
|
|
name="person-circle-outline"
|
|
size="large"
|
|
></ion-icon>
|
|
<ion-icon
|
|
class="d-block d-sm-none"
|
|
size="large"
|
|
[name]="isMenuOpen ? 'close-outline' : 'menu-outline'"
|
|
></ion-icon>
|
|
</button>
|
|
<mat-menu #accountMenu="matMenu" xPosition="before">
|
|
<ng-container *ngIf="user?.access?.length > 0">
|
|
<button mat-menu-item (click)="impersonateAccount(null)">
|
|
<span class="align-items-center d-flex">
|
|
<ion-icon
|
|
*ngIf="user?.access?.length > 0"
|
|
class="mr-2"
|
|
[name]="
|
|
impersonationId
|
|
? 'radio-button-off-outline'
|
|
: 'radio-button-on-outline'
|
|
"
|
|
></ion-icon>
|
|
<span i18n>Me</span>
|
|
</span>
|
|
</button>
|
|
<button
|
|
*ngFor="let accessItem of user?.access"
|
|
mat-menu-item
|
|
(click)="impersonateAccount(accessItem.id)"
|
|
>
|
|
<span class="align-items-center d-flex">
|
|
<ion-icon
|
|
class="mr-2"
|
|
name="square-outline"
|
|
[name]="
|
|
accessItem.id === impersonationId
|
|
? 'radio-button-on-outline'
|
|
: 'radio-button-off-outline'
|
|
"
|
|
></ion-icon>
|
|
<span *ngIf="accessItem.alias">{{ accessItem.alias }}</span>
|
|
<span *ngIf="!accessItem.alias" i18n>User</span>
|
|
</span>
|
|
</button>
|
|
<hr class="m-0" />
|
|
</ng-container>
|
|
<a
|
|
class="d-flex d-sm-none"
|
|
i18n
|
|
mat-menu-item
|
|
[ngClass]="{
|
|
'font-weight-bold':
|
|
currentRoute === 'home' || currentRoute === 'zen'
|
|
}"
|
|
[routerLink]="['/']"
|
|
>Overview</a
|
|
>
|
|
<a
|
|
class="d-flex d-sm-none"
|
|
i18n
|
|
mat-menu-item
|
|
[ngClass]="{
|
|
'font-weight-bold': currentRoute === 'portfolio'
|
|
}"
|
|
[routerLink]="['/portfolio']"
|
|
>Portfolio</a
|
|
>
|
|
<a
|
|
class="d-flex d-sm-none"
|
|
i18n
|
|
mat-menu-item
|
|
[ngClass]="{ 'font-weight-bold': currentRoute === 'accounts' }"
|
|
[routerLink]="['/accounts']"
|
|
>Accounts</a
|
|
>
|
|
<a
|
|
i18n
|
|
mat-menu-item
|
|
[ngClass]="{ 'font-weight-bold': currentRoute === 'account' }"
|
|
[routerLink]="['/account']"
|
|
>My Ghostfolio</a
|
|
>
|
|
<a
|
|
*ngIf="hasPermissionToAccessAdminControl"
|
|
class="d-flex d-sm-none"
|
|
i18n
|
|
mat-menu-item
|
|
[ngClass]="{ 'font-weight-bold': currentRoute === 'admin' }"
|
|
[routerLink]="['/admin']"
|
|
>Admin Control</a
|
|
>
|
|
<hr class="m-0" />
|
|
<a
|
|
class="d-flex d-sm-none"
|
|
i18n
|
|
mat-menu-item
|
|
[ngClass]="{
|
|
'font-weight-bold': currentRoute === routeResources
|
|
}"
|
|
[routerLink]="routerLinkResources"
|
|
>Resources</a
|
|
>
|
|
<a
|
|
*ngIf="
|
|
hasPermissionForSubscription &&
|
|
user?.subscription?.type === 'Basic'
|
|
"
|
|
class="d-flex d-sm-none"
|
|
i18n
|
|
mat-menu-item
|
|
[ngClass]="{ 'font-weight-bold': currentRoute === routePricing }"
|
|
[routerLink]="routerLinkPricing"
|
|
>Pricing</a
|
|
>
|
|
<a
|
|
class="d-flex d-sm-none"
|
|
i18n
|
|
mat-menu-item
|
|
[ngClass]="{ 'font-weight-bold': currentRoute === routeAbout }"
|
|
[routerLink]="routerLinkAbout"
|
|
>About Ghostfolio</a
|
|
>
|
|
<hr class="d-flex d-sm-none m-0" />
|
|
<button mat-menu-item (click)="onSignOut()">Logout</button>
|
|
</mat-menu>
|
|
</li>
|
|
</ul>
|
|
</ng-container>
|
|
<ng-container *ngIf="user === null">
|
|
<div class="d-flex h-100 logo-container" [ngClass]="{ filled: hasTabs }">
|
|
<a
|
|
class="align-items-center justify-content-start rounded-0"
|
|
mat-button
|
|
[ngClass]="{ 'w-100': hasTabs }"
|
|
[routerLink]="['/']"
|
|
>
|
|
<gf-logo
|
|
class="px-2"
|
|
[label]="pageTitle"
|
|
[showLabel]="currentRoute !== 'register'"
|
|
></gf-logo>
|
|
</a>
|
|
</div>
|
|
<span class="spacer"></span>
|
|
<ul class="alig-items-center d-flex list-inline m-0 px-2">
|
|
<li class="list-inline-item">
|
|
<a
|
|
class="d-none d-sm-block"
|
|
i18n
|
|
mat-flat-button
|
|
[ngClass]="{
|
|
'font-weight-bold': currentRoute === routeFeatures,
|
|
'text-decoration-underline': currentRoute === routeFeatures
|
|
}"
|
|
[routerLink]="routerLinkFeatures"
|
|
>Features</a
|
|
>
|
|
</li>
|
|
<li class="list-inline-item">
|
|
<a
|
|
class="d-none d-sm-block"
|
|
i18n
|
|
mat-flat-button
|
|
[ngClass]="{
|
|
'font-weight-bold': currentRoute === routeAbout,
|
|
'text-decoration-underline': currentRoute === routeAbout
|
|
}"
|
|
[routerLink]="routerLinkAbout"
|
|
>About</a
|
|
>
|
|
</li>
|
|
<li *ngIf="hasPermissionForSubscription" class="list-inline-item">
|
|
<a
|
|
class="d-sm-block"
|
|
i18n
|
|
mat-flat-button
|
|
[ngClass]="{
|
|
'font-weight-bold': currentRoute === routePricing,
|
|
'text-decoration-underline': currentRoute === routePricing
|
|
}"
|
|
[routerLink]="routerLinkPricing"
|
|
>Pricing</a
|
|
>
|
|
</li>
|
|
<li
|
|
*ngIf="hasPermissionToAccessFearAndGreedIndex"
|
|
class="list-inline-item"
|
|
>
|
|
<a
|
|
class="d-none d-sm-block"
|
|
i18n
|
|
mat-flat-button
|
|
[ngClass]="{
|
|
'font-weight-bold': currentRoute === routeMarkets,
|
|
'text-decoration-underline': currentRoute === routeMarkets
|
|
}"
|
|
[routerLink]="routerLinkMarkets"
|
|
>Markets</a
|
|
>
|
|
</li>
|
|
<li class="list-inline-item">
|
|
<a
|
|
class="d-none d-sm-block no-min-width p-1"
|
|
href="https://github.com/ghostfolio/ghostfolio"
|
|
mat-flat-button
|
|
><ion-icon name="logo-github"></ion-icon
|
|
></a>
|
|
</li>
|
|
<li class="list-inline-item">
|
|
<button class="d-sm-block" mat-flat-button (click)="openLoginDialog()">
|
|
<ng-container i18n>Sign in</ng-container>
|
|
</button>
|
|
</li>
|
|
<li
|
|
*ngIf="currentRoute !== 'register' && hasPermissionToCreateUser"
|
|
class="list-inline-item ml-1"
|
|
>
|
|
<a
|
|
class="d-none d-sm-block"
|
|
color="primary"
|
|
mat-flat-button
|
|
[routerLink]="routerLinkRegister"
|
|
><ng-container i18n>Get started</ng-container>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</ng-container>
|
|
</mat-toolbar>
|
|
|