2021-10-30 10:46:54 +02:00
|
|
|
<mat-toolbar class="px-2">
|
2021-04-13 21:53:58 +02:00
|
|
|
<ng-container *ngIf="user">
|
2021-10-30 10:46:54 +02:00
|
|
|
<a
|
|
|
|
[routerLink]="['/']"
|
|
|
|
class="align-items-center d-flex h-100 mx-2 no-min-width px-2 rounded-0"
|
|
|
|
mat-button
|
|
|
|
>
|
2021-04-13 21:53:58 +02:00
|
|
|
<gf-logo></gf-logo>
|
|
|
|
</a>
|
|
|
|
<span class="spacer"></span>
|
|
|
|
<a
|
|
|
|
class="d-none d-sm-block"
|
|
|
|
i18n
|
|
|
|
mat-flat-button
|
2021-06-05 17:16:07 +02:00
|
|
|
[ngClass]="{
|
|
|
|
'font-weight-bold': currentRoute === 'home' || currentRoute === 'zen',
|
|
|
|
'text-decoration-underline':
|
|
|
|
currentRoute === 'home' || currentRoute === 'zen'
|
|
|
|
}"
|
2021-05-14 21:15:20 +02:00
|
|
|
[routerLink]="['/']"
|
2021-04-13 21:53:58 +02:00
|
|
|
>Overview</a
|
|
|
|
>
|
|
|
|
<a
|
|
|
|
class="d-none d-sm-block mx-1"
|
|
|
|
i18n
|
|
|
|
mat-flat-button
|
2021-06-05 17:16:07 +02:00
|
|
|
[ngClass]="{
|
2021-08-07 07:12:40 +02:00
|
|
|
'font-weight-bold': currentRoute === 'portfolio',
|
|
|
|
'text-decoration-underline': currentRoute === 'portfolio'
|
2021-06-05 17:16:07 +02:00
|
|
|
}"
|
2021-08-07 07:12:40 +02:00
|
|
|
[routerLink]="['/portfolio']"
|
|
|
|
>Portfolio</a
|
2021-04-13 21:53:58 +02:00
|
|
|
>
|
2021-05-01 12:30:52 +02:00
|
|
|
<a
|
|
|
|
class="d-none d-sm-block mx-1"
|
|
|
|
i18n
|
|
|
|
mat-flat-button
|
2021-06-05 17:16:07 +02:00
|
|
|
[ngClass]="{
|
|
|
|
'font-weight-bold': currentRoute === 'accounts',
|
|
|
|
'text-decoration-underline': currentRoute === 'accounts'
|
|
|
|
}"
|
2021-05-14 21:15:20 +02:00
|
|
|
[routerLink]="['/accounts']"
|
2021-05-01 12:30:52 +02:00
|
|
|
>Accounts</a
|
|
|
|
>
|
2021-04-13 21:53:58 +02:00
|
|
|
<a
|
2021-04-24 22:01:38 +02:00
|
|
|
*ngIf="hasPermissionToAccessAdminControl"
|
2021-04-13 21:53:58 +02:00
|
|
|
class="d-none d-sm-block mx-1"
|
|
|
|
i18n
|
|
|
|
mat-flat-button
|
2021-06-05 17:16:07 +02:00
|
|
|
[ngClass]="{
|
|
|
|
'font-weight-bold': currentRoute === 'admin',
|
|
|
|
'text-decoration-underline': currentRoute === 'admin'
|
|
|
|
}"
|
2021-05-14 21:15:20 +02:00
|
|
|
[routerLink]="['/admin']"
|
2021-04-13 21:53:58 +02:00
|
|
|
>Admin Control</a
|
|
|
|
>
|
|
|
|
<a
|
|
|
|
class="d-none d-sm-block mx-1"
|
|
|
|
i18n
|
|
|
|
mat-flat-button
|
2021-06-05 17:16:07 +02:00
|
|
|
[ngClass]="{
|
|
|
|
'font-weight-bold': currentRoute === 'resources',
|
|
|
|
'text-decoration-underline': currentRoute === 'resources'
|
|
|
|
}"
|
2021-05-14 21:15:20 +02:00
|
|
|
[routerLink]="['/resources']"
|
2021-04-13 21:53:58 +02:00
|
|
|
>Resources</a
|
|
|
|
>
|
2021-05-14 21:15:20 +02:00
|
|
|
<a
|
|
|
|
*ngIf="hasPermissionForSubscription"
|
|
|
|
class="d-none d-sm-block mx-1"
|
|
|
|
i18n
|
|
|
|
mat-flat-button
|
2021-06-05 17:16:07 +02:00
|
|
|
[ngClass]="{
|
|
|
|
'font-weight-bold': currentRoute === 'pricing',
|
|
|
|
'text-decoration-underline': currentRoute === 'pricing'
|
|
|
|
}"
|
2021-05-14 21:15:20 +02:00
|
|
|
[routerLink]="['/pricing']"
|
|
|
|
>Pricing</a
|
|
|
|
>
|
2021-04-13 21:53:58 +02:00
|
|
|
<a
|
|
|
|
class="d-none d-sm-block mx-1"
|
|
|
|
i18n
|
|
|
|
mat-flat-button
|
2021-06-05 17:16:07 +02:00
|
|
|
[ngClass]="{
|
|
|
|
'font-weight-bold': currentRoute === 'about',
|
|
|
|
'text-decoration-underline': currentRoute === 'about'
|
|
|
|
}"
|
2021-05-14 21:15:20 +02:00
|
|
|
[routerLink]="['/about']"
|
2021-04-13 21:53:58 +02:00
|
|
|
>About</a
|
|
|
|
>
|
|
|
|
<button
|
|
|
|
class="no-min-width px-1"
|
|
|
|
mat-flat-button
|
|
|
|
[matMenuTriggerFor]="accountMenu"
|
2021-07-26 21:06:10 +02:00
|
|
|
(menuClosed)="onMenuClosed()"
|
|
|
|
(menuOpened)="onMenuOpened()"
|
2021-04-13 21:53:58 +02:00
|
|
|
>
|
|
|
|
<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"
|
2021-07-26 21:06:10 +02:00
|
|
|
[name]="isMenuOpen ? 'close-outline' : 'menu-outline'"
|
2021-04-13 21:53:58 +02:00
|
|
|
></ion-icon>
|
|
|
|
</button>
|
|
|
|
<mat-menu #accountMenu="matMenu" xPosition="before">
|
|
|
|
<ng-container *ngIf="user?.access?.length > 0">
|
|
|
|
<button
|
|
|
|
class="align-items-center d-flex"
|
|
|
|
mat-menu-item
|
|
|
|
(click)="impersonateAccount(null)"
|
|
|
|
>
|
|
|
|
<ion-icon
|
|
|
|
*ngIf="user?.access?.length > 0"
|
|
|
|
class="mr-2"
|
|
|
|
[name]="
|
|
|
|
impersonationId
|
|
|
|
? 'radio-button-off-outline'
|
|
|
|
: 'radio-button-on-outline'
|
|
|
|
"
|
|
|
|
></ion-icon>
|
|
|
|
<span *ngIf="user?.alias">{{ user.alias }}</span>
|
|
|
|
<span *ngIf="!user?.alias" i18n><span></span>Me</span>
|
|
|
|
</button>
|
|
|
|
<button
|
|
|
|
*ngFor="let accessItem of user?.access"
|
|
|
|
class="align-items-center d-flex"
|
|
|
|
disabled="false"
|
|
|
|
mat-menu-item
|
|
|
|
(click)="impersonateAccount(accessItem.id)"
|
|
|
|
>
|
|
|
|
<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>
|
|
|
|
</button>
|
|
|
|
<hr class="m-0" />
|
|
|
|
</ng-container>
|
2021-08-14 11:09:53 +02:00
|
|
|
<a
|
|
|
|
class="d-block d-sm-none"
|
|
|
|
i18n
|
|
|
|
mat-menu-item
|
|
|
|
[ngClass]="{
|
|
|
|
'font-weight-bold': currentRoute === 'home' || currentRoute === 'zen'
|
|
|
|
}"
|
|
|
|
[routerLink]="['/']"
|
|
|
|
>Overview</a
|
|
|
|
>
|
2021-04-13 21:53:58 +02:00
|
|
|
<a
|
|
|
|
class="d-block d-sm-none"
|
|
|
|
i18n
|
|
|
|
mat-menu-item
|
2021-05-24 16:25:59 +02:00
|
|
|
[ngClass]="{
|
2021-08-07 07:12:40 +02:00
|
|
|
'font-weight-bold': currentRoute === 'portfolio'
|
2021-05-24 16:25:59 +02:00
|
|
|
}"
|
2021-08-07 07:12:40 +02:00
|
|
|
[routerLink]="['/portfolio']"
|
|
|
|
>Portfolio</a
|
2021-04-13 21:53:58 +02:00
|
|
|
>
|
2021-05-01 12:30:52 +02:00
|
|
|
<a
|
|
|
|
class="d-block d-sm-none"
|
|
|
|
i18n
|
|
|
|
mat-menu-item
|
2021-05-15 10:05:03 +02:00
|
|
|
[ngClass]="{ 'font-weight-bold': currentRoute === 'accounts' }"
|
2021-05-14 21:15:20 +02:00
|
|
|
[routerLink]="['/accounts']"
|
2021-05-01 12:30:52 +02:00
|
|
|
>Accounts</a
|
|
|
|
>
|
2021-04-13 21:53:58 +02:00
|
|
|
<a
|
|
|
|
class="align-items-center d-flex"
|
|
|
|
i18n
|
|
|
|
mat-menu-item
|
2021-05-15 10:05:03 +02:00
|
|
|
[ngClass]="{ 'font-weight-bold': currentRoute === 'account' }"
|
2021-05-14 21:15:20 +02:00
|
|
|
[routerLink]="['/account']"
|
2021-05-16 21:22:03 +02:00
|
|
|
>My Ghostfolio</a
|
2021-04-18 19:01:31 +02:00
|
|
|
>
|
2021-04-13 21:53:58 +02:00
|
|
|
<a
|
2021-04-25 17:29:04 +02:00
|
|
|
*ngIf="hasPermissionToAccessAdminControl"
|
2021-04-13 21:53:58 +02:00
|
|
|
class="d-block d-sm-none"
|
|
|
|
i18n
|
|
|
|
mat-menu-item
|
2021-05-15 10:05:03 +02:00
|
|
|
[ngClass]="{ 'font-weight-bold': currentRoute === 'admin' }"
|
2021-05-14 21:15:20 +02:00
|
|
|
[routerLink]="['/admin']"
|
2021-04-13 21:53:58 +02:00
|
|
|
>Admin Control</a
|
|
|
|
>
|
|
|
|
<hr class="m-0" />
|
|
|
|
<a
|
|
|
|
class="d-block d-sm-none"
|
|
|
|
i18n
|
|
|
|
mat-menu-item
|
2021-05-11 17:49:35 +02:00
|
|
|
[ngClass]="{
|
2021-05-15 10:05:03 +02:00
|
|
|
'font-weight-bold': currentRoute === 'resources'
|
2021-05-11 17:49:35 +02:00
|
|
|
}"
|
2021-05-14 21:15:20 +02:00
|
|
|
[routerLink]="['/resources']"
|
2021-04-13 21:53:58 +02:00
|
|
|
>Resources</a
|
|
|
|
>
|
2021-05-14 21:15:20 +02:00
|
|
|
<a
|
|
|
|
*ngIf="hasPermissionForSubscription"
|
|
|
|
class="d-block d-sm-none"
|
|
|
|
i18n
|
|
|
|
mat-menu-item
|
2021-05-15 10:05:03 +02:00
|
|
|
[ngClass]="{ 'font-weight-bold': currentRoute === 'pricing' }"
|
2021-05-14 21:15:20 +02:00
|
|
|
[routerLink]="['/pricing']"
|
|
|
|
>Pricing</a
|
|
|
|
>
|
2021-04-13 21:53:58 +02:00
|
|
|
<a
|
|
|
|
class="d-block d-sm-none"
|
|
|
|
i18n
|
|
|
|
mat-menu-item
|
2021-05-15 10:05:03 +02:00
|
|
|
[ngClass]="{ 'font-weight-bold': currentRoute === 'about' }"
|
2021-05-14 21:15:20 +02:00
|
|
|
[routerLink]="['/about']"
|
2021-04-13 21:53:58 +02:00
|
|
|
>About Ghostfolio</a
|
|
|
|
>
|
|
|
|
<hr class="d-block d-sm-none m-0" />
|
|
|
|
<button mat-menu-item (click)="onSignOut()">Logout</button>
|
|
|
|
</mat-menu>
|
|
|
|
</ng-container>
|
|
|
|
<ng-container *ngIf="user === null">
|
|
|
|
<a
|
2021-10-30 10:46:54 +02:00
|
|
|
class="align-items-center d-flex h-100 mx-2 no-min-width px-2 rounded-0"
|
2021-04-13 21:53:58 +02:00
|
|
|
mat-button
|
2021-05-14 21:15:20 +02:00
|
|
|
[routerLink]="['/']"
|
2021-04-13 21:53:58 +02:00
|
|
|
>
|
2021-11-02 21:49:57 +01:00
|
|
|
<gf-logo
|
|
|
|
[hideName]="
|
|
|
|
!currentRoute ||
|
|
|
|
currentRoute === 'register' ||
|
|
|
|
currentRoute === 'start'
|
|
|
|
"
|
|
|
|
></gf-logo>
|
2021-04-13 21:53:58 +02:00
|
|
|
</a>
|
|
|
|
<span class="spacer"></span>
|
2021-05-15 08:36:13 +02:00
|
|
|
<a
|
2021-06-05 17:16:07 +02:00
|
|
|
class="d-none d-sm-block mx-1"
|
2021-05-15 08:36:13 +02:00
|
|
|
i18n
|
|
|
|
mat-flat-button
|
2021-06-05 17:16:07 +02:00
|
|
|
[ngClass]="{
|
|
|
|
'font-weight-bold': currentRoute === 'about',
|
|
|
|
'text-decoration-underline': currentRoute === 'about'
|
|
|
|
}"
|
|
|
|
[routerLink]="['/about']"
|
|
|
|
>About</a
|
2021-05-15 08:36:13 +02:00
|
|
|
>
|
2021-04-13 21:53:58 +02:00
|
|
|
<a
|
2021-06-05 17:16:07 +02:00
|
|
|
*ngIf="hasPermissionForSubscription"
|
2021-04-13 21:53:58 +02:00
|
|
|
i18n
|
|
|
|
mat-flat-button
|
2021-06-05 17:16:07 +02:00
|
|
|
[ngClass]="{
|
|
|
|
'font-weight-bold': currentRoute === 'pricing',
|
|
|
|
'text-decoration-underline': currentRoute === 'pricing'
|
|
|
|
}"
|
|
|
|
[routerLink]="['/pricing']"
|
|
|
|
>Pricing</a
|
2021-04-13 21:53:58 +02:00
|
|
|
>
|
2021-04-18 19:01:31 +02:00
|
|
|
<a
|
2021-06-05 17:16:07 +02:00
|
|
|
class="d-none d-sm-block mx-1 no-min-width px-1"
|
2021-04-18 19:01:31 +02:00
|
|
|
href="https://github.com/ghostfolio/ghostfolio"
|
|
|
|
mat-flat-button
|
2021-06-05 17:16:07 +02:00
|
|
|
><ion-icon name="logo-github"></ion-icon
|
|
|
|
></a>
|
|
|
|
<button class="mx-1" i18n mat-flat-button (click)="openLoginDialog()">
|
|
|
|
Sign In
|
|
|
|
</button>
|
|
|
|
<a
|
|
|
|
class="d-none d-sm-block"
|
|
|
|
color="primary"
|
|
|
|
i18n
|
|
|
|
mat-flat-button
|
|
|
|
[routerLink]="['/register']"
|
|
|
|
>Get Started
|
|
|
|
</a>
|
2021-04-13 21:53:58 +02:00
|
|
|
</ng-container>
|
|
|
|
</mat-toolbar>
|