Browse Source

Migrate to control flow (#2991)

* Migrate to control flow
pull/2993/head
Thomas Kaul 1 year ago
committed by GitHub
parent
commit
d5d40c0ea1
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 3
      libs/ui/src/lib/account-balances/account-balances.component.html
  2. 17
      libs/ui/src/lib/activities-filter/activities-filter.component.html
  3. 69
      libs/ui/src/lib/activities-table/activities-table.component.html
  4. 22
      libs/ui/src/lib/activity-type/activity-type.component.html
  5. 14
      libs/ui/src/lib/benchmark/benchmark.component.html
  6. 6
      libs/ui/src/lib/carousel/carousel.component.html
  7. 8
      libs/ui/src/lib/currency-selector/currency-selector.component.html
  8. 3
      libs/ui/src/lib/fire-calculator/fire-calculator.component.html
  9. 25
      libs/ui/src/lib/holdings-table/holdings-table.component.html
  10. 3
      libs/ui/src/lib/line-chart/line-chart.component.html
  11. 6
      libs/ui/src/lib/logo/logo.component.html
  12. 4
      libs/ui/src/lib/membership-card/membership-card.component.html
  13. 3
      libs/ui/src/lib/portfolio-proportion-chart/portfolio-proportion-chart.component.html
  14. 22
      libs/ui/src/lib/symbol-autocomplete/symbol-autocomplete.component.html

3
libs/ui/src/lib/account-balances/account-balances.component.html

@ -34,8 +34,8 @@
<ng-container matColumnDef="actions" stickyEnd> <ng-container matColumnDef="actions" stickyEnd>
<th *matHeaderCellDef class="px-1 text-center" mat-header-cell></th> <th *matHeaderCellDef class="px-1 text-center" mat-header-cell></th>
<td *matCellDef="let element" class="px-1 text-center" mat-cell> <td *matCellDef="let element" class="px-1 text-center" mat-cell>
@if (showActions) {
<button <button
*ngIf="showActions"
class="mx-1 no-min-width px-2" class="mx-1 no-min-width px-2"
mat-button mat-button
[matMenuTriggerFor]="accountBalanceMenu" [matMenuTriggerFor]="accountBalanceMenu"
@ -43,6 +43,7 @@
> >
<ion-icon name="ellipsis-horizontal" /> <ion-icon name="ellipsis-horizontal" />
</button> </button>
}
<mat-menu #accountBalanceMenu="matMenu" xPosition="before"> <mat-menu #accountBalanceMenu="matMenu" xPosition="before">
<button mat-menu-item (click)="onDeleteAccountBalance(element.id)"> <button mat-menu-item (click)="onDeleteAccountBalance(element.id)">
<span class="align-items-center d-flex"> <span class="align-items-center d-flex">

17
libs/ui/src/lib/activities-filter/activities-filter.component.html

@ -3,8 +3,8 @@
<ion-icon name="search-outline" /> <ion-icon name="search-outline" />
</button> </button>
<mat-chip-grid #chipList aria-label="Search keywords"> <mat-chip-grid #chipList aria-label="Search keywords">
@for (filter of selectedFilters; track filter) {
<mat-chip-row <mat-chip-row
*ngFor="let filter of selectedFilters"
class="mx-1 my-0 px-2 py-0" class="mx-1 my-0 px-2 py-0"
matChipRemove matChipRemove
[removable]="true" [removable]="true"
@ -15,6 +15,7 @@
<ion-icon name="close-outline" /> <ion-icon name="close-outline" />
</button> </button>
</mat-chip-row> </mat-chip-row>
}
<input <input
#searchInput #searchInput
name="close-outline" name="close-outline"
@ -30,17 +31,15 @@
#autocomplete="matAutocomplete" #autocomplete="matAutocomplete"
(optionSelected)="onSelectFilter($event)" (optionSelected)="onSelectFilter($event)"
> >
<mat-optgroup @for (filterGroup of filterGroups$ | async; track filterGroup) {
*ngFor="let filterGroup of filterGroups$ | async" <mat-optgroup [label]="filterGroup.name">
[label]="filterGroup.name" @for (filter of filterGroup.filters; track filter) {
> <mat-option [value]="filter.id">
<mat-option
*ngFor="let filter of filterGroup.filters"
[value]="filter.id"
>
{{ filter.label | gfSymbol }} {{ filter.label | gfSymbol }}
</mat-option> </mat-option>
}
</mat-optgroup> </mat-optgroup>
}
</mat-autocomplete> </mat-autocomplete>
<button <button

69
libs/ui/src/lib/activities-table/activities-table.component.html

@ -1,4 +1,5 @@
<div *ngIf="hasPermissionToCreateActivity" class="d-flex justify-content-end"> @if (hasPermissionToCreateActivity) {
<div class="d-flex justify-content-end">
<button <button
class="align-items-center d-flex" class="align-items-center d-flex"
mat-stroked-button mat-stroked-button
@ -7,8 +8,8 @@
<ion-icon class="mr-2" name="cloud-upload-outline" /> <ion-icon class="mr-2" name="cloud-upload-outline" />
<ng-container i18n>Import Activities</ng-container>... <ng-container i18n>Import Activities</ng-container>...
</button> </button>
@if (hasPermissionToExportActivities) {
<button <button
*ngIf="hasPermissionToExportActivities"
class="mx-1 no-min-width px-2" class="mx-1 no-min-width px-2"
mat-stroked-button mat-stroked-button
[matMenuTriggerFor]="activitiesMenu" [matMenuTriggerFor]="activitiesMenu"
@ -16,6 +17,7 @@
> >
<ion-icon name="ellipsis-vertical" /> <ion-icon name="ellipsis-vertical" />
</button> </button>
}
<mat-menu #activitiesMenu="matMenu" xPosition="before"> <mat-menu #activitiesMenu="matMenu" xPosition="before">
<button <button
mat-menu-item mat-menu-item
@ -27,8 +29,8 @@
<ng-container i18n>Import Dividends</ng-container>... <ng-container i18n>Import Dividends</ng-container>...
</span> </span>
</button> </button>
@if (hasPermissionToExportActivities) {
<button <button
*ngIf="hasPermissionToExportActivities"
class="align-items-center d-flex" class="align-items-center d-flex"
mat-menu-item mat-menu-item
[disabled]="dataSource?.data.length === 0" [disabled]="dataSource?.data.length === 0"
@ -39,8 +41,9 @@
<span i18n>Export Activities</span> <span i18n>Export Activities</span>
</span> </span>
</button> </button>
}
@if (hasPermissionToExportActivities) {
<button <button
*ngIf="hasPermissionToExportActivities"
class="align-items-center d-flex" class="align-items-center d-flex"
mat-menu-item mat-menu-item
[disabled]="!hasDrafts" [disabled]="!hasDrafts"
@ -51,6 +54,7 @@
<span i18n>Export Drafts as ICS</span> <span i18n>Export Drafts as ICS</span>
</span> </span>
</button> </button>
}
<button <button
class="align-items-center d-flex" class="align-items-center d-flex"
mat-menu-item mat-menu-item
@ -63,6 +67,7 @@
</button> </button>
</mat-menu> </mat-menu>
</div> </div>
}
<div class="activities"> <div class="activities">
<table <table
@ -102,14 +107,15 @@
<ng-container i18n></ng-container> <ng-container i18n></ng-container>
</th> </th>
<td *matCellDef="let element" class="px-1" mat-cell> <td *matCellDef="let element" class="px-1" mat-cell>
@if (element.error) {
<div <div
*ngIf="element.error"
class="d-flex" class="d-flex"
matTooltipPosition="above" matTooltipPosition="above"
[matTooltip]="element.error.message" [matTooltip]="element.error.message"
> >
<ion-icon class="text-danger" name="alert-circle-outline" /> <ion-icon class="text-danger" name="alert-circle-outline" />
</div> </div>
}
</td> </td>
</ng-container> </ng-container>
@ -133,19 +139,18 @@
<div class="align-items-center d-flex line-height-1"> <div class="align-items-center d-flex line-height-1">
<div> <div>
<span class="text-truncate">{{ element.SymbolProfile?.name }}</span> <span class="text-truncate">{{ element.SymbolProfile?.name }}</span>
<span @if (element.isDraft) {
*ngIf="element.isDraft" <span class="badge badge-secondary ml-1" i18n>Draft</span>
class="badge badge-secondary ml-1" }
i18n
>Draft</span
>
</div> </div>
</div> </div>
<div *ngIf="!isUUID(element.SymbolProfile?.symbol)"> @if (!isUUID(element.SymbolProfile?.symbol)) {
<div>
<small class="text-muted">{{ <small class="text-muted">{{
element.SymbolProfile?.symbol | gfSymbol element.SymbolProfile?.symbol | gfSymbol
}}</small> }}</small>
</div> </div>
}
</td> </td>
</ng-container> </ng-container>
@ -302,12 +307,13 @@
</th> </th>
<td *matCellDef="let element" class="px-1" mat-cell> <td *matCellDef="let element" class="px-1" mat-cell>
<div class="d-flex"> <div class="d-flex">
@if (element.Account?.Platform?.url) {
<gf-symbol-icon <gf-symbol-icon
*ngIf="element.Account?.Platform?.url"
class="mr-1" class="mr-1"
[tooltip]="element.Account?.Platform?.name" [tooltip]="element.Account?.Platform?.name"
[url]="element.Account?.Platform?.url" [url]="element.Account?.Platform?.url"
/> />
}
<span class="d-none d-lg-block">{{ element.Account?.name }}</span> <span class="d-none d-lg-block">{{ element.Account?.name }}</span>
</div> </div>
</td> </td>
@ -324,8 +330,8 @@
class="d-none d-lg-table-cell px-1" class="d-none d-lg-table-cell px-1"
mat-cell mat-cell
> >
@if (element.comment) {
<button <button
*ngIf="element.comment"
class="mx-1 no-min-width px-2" class="mx-1 no-min-width px-2"
mat-button mat-button
title="Note" title="Note"
@ -333,15 +339,16 @@
> >
<ion-icon name="document-text-outline" /> <ion-icon name="document-text-outline" />
</button> </button>
}
</td> </td>
</ng-container> </ng-container>
<ng-container matColumnDef="actions" stickyEnd> <ng-container matColumnDef="actions" stickyEnd>
<th *matHeaderCellDef class="px-1 text-center" mat-header-cell> <th *matHeaderCellDef class="px-1 text-center" mat-header-cell>
<button @if (
*ngIf="
!hasPermissionToCreateActivity && hasPermissionToExportActivities !hasPermissionToCreateActivity && hasPermissionToExportActivities
" ) {
<button
class="mx-1 no-min-width px-2" class="mx-1 no-min-width px-2"
mat-button mat-button
[matMenuTriggerFor]="activitiesMenu" [matMenuTriggerFor]="activitiesMenu"
@ -349,9 +356,10 @@
> >
<ion-icon name="ellipsis-vertical" /> <ion-icon name="ellipsis-vertical" />
</button> </button>
}
<mat-menu #activitiesMenu="matMenu" xPosition="before"> <mat-menu #activitiesMenu="matMenu" xPosition="before">
@if (hasPermissionToCreateActivity) {
<button <button
*ngIf="hasPermissionToCreateActivity"
class="align-items-center d-flex" class="align-items-center d-flex"
mat-menu-item mat-menu-item
(click)="onImport()" (click)="onImport()"
@ -361,8 +369,9 @@
<ng-container i18n>Import Activities</ng-container>... <ng-container i18n>Import Activities</ng-container>...
</span> </span>
</button> </button>
}
@if (hasPermissionToCreateActivity) {
<button <button
*ngIf="hasPermissionToCreateActivity"
mat-menu-item mat-menu-item
[disabled]="dataSource?.data.length === 0" [disabled]="dataSource?.data.length === 0"
(click)="onImportDividends()" (click)="onImportDividends()"
@ -372,8 +381,9 @@
<ng-container i18n>Import Dividends</ng-container>... <ng-container i18n>Import Dividends</ng-container>...
</span> </span>
</button> </button>
}
@if (hasPermissionToExportActivities) {
<button <button
*ngIf="hasPermissionToExportActivities"
class="align-items-center d-flex" class="align-items-center d-flex"
mat-menu-item mat-menu-item
[disabled]="dataSource?.data.length === 0" [disabled]="dataSource?.data.length === 0"
@ -384,8 +394,9 @@
<span i18n>Export Activities</span> <span i18n>Export Activities</span>
</span> </span>
</button> </button>
}
@if (hasPermissionToExportActivities) {
<button <button
*ngIf="hasPermissionToExportActivities"
class="align-items-center d-flex" class="align-items-center d-flex"
mat-menu-item mat-menu-item
[disabled]="!hasDrafts" [disabled]="!hasDrafts"
@ -396,11 +407,12 @@
<span i18n>Export Drafts as ICS</span> <span i18n>Export Drafts as ICS</span>
</span> </span>
</button> </button>
}
</mat-menu> </mat-menu>
</th> </th>
<td *matCellDef="let element" class="px-1 text-center" mat-cell> <td *matCellDef="let element" class="px-1 text-center" mat-cell>
@if (showActions) {
<button <button
*ngIf="showActions"
class="mx-1 no-min-width px-2" class="mx-1 no-min-width px-2"
mat-button mat-button
[matMenuTriggerFor]="activityMenu" [matMenuTriggerFor]="activityMenu"
@ -408,6 +420,7 @@
> >
<ion-icon name="ellipsis-horizontal" /> <ion-icon name="ellipsis-horizontal" />
</button> </button>
}
<mat-menu #activityMenu="matMenu" xPosition="before"> <mat-menu #activityMenu="matMenu" xPosition="before">
<button mat-menu-item (click)="onUpdateActivity(element)"> <button mat-menu-item (click)="onUpdateActivity(element)">
<span class="align-items-center d-flex"> <span class="align-items-center d-flex">
@ -459,8 +472,8 @@
</table> </table>
</div> </div>
@if (isLoading) {
<ngx-skeleton-loader <ngx-skeleton-loader
*ngIf="isLoading"
animation="pulse" animation="pulse"
class="px-4 py-3" class="px-4 py-3"
[theme]="{ [theme]="{
@ -468,6 +481,7 @@
width: '100%' width: '100%'
}" }"
/> />
}
<mat-paginator <mat-paginator
[length]="totalItems" [length]="totalItems"
@ -480,11 +494,10 @@
(page)="onChangePage($event)" (page)="onChangePage($event)"
/> />
<div @if (
*ngIf="
dataSource?.data.length === 0 && hasPermissionToCreateActivity && !isLoading dataSource?.data.length === 0 && hasPermissionToCreateActivity && !isLoading
" ) {
class="p-3 text-center" <div class="p-3 text-center">
>
<gf-no-transactions-info-indicator [hasBorder]="false" /> <gf-no-transactions-info-indicator [hasBorder]="false" />
</div> </div>
}

22
libs/ui/src/lib/activity-type/activity-type.component.html

@ -10,14 +10,18 @@
sell: activityType === 'SELL' sell: activityType === 'SELL'
}" }"
> >
<ion-icon *ngIf="activityType === 'BUY'" name="arrow-up-circle-outline" /> @if (activityType === 'BUY') {
<ion-icon <ion-icon name="arrow-up-circle-outline" />
*ngIf="activityType === 'DIVIDEND' || activityType === 'INTEREST'" } @else if (activityType === 'DIVIDEND' || activityType === 'INTEREST') {
name="add-circle-outline" <ion-icon name="add-circle-outline" />
/> } @else if (activityType === 'FEE') {
<ion-icon *ngIf="activityType === 'FEE'" name="hammer-outline" /> <ion-icon name="hammer-outline" />
<ion-icon *ngIf="activityType === 'ITEM'" name="cube-outline" /> } @else if (activityType === 'ITEM') {
<ion-icon *ngIf="activityType === 'LIABILITY'" name="flame-outline" /> <ion-icon name="cube-outline" />
<ion-icon *ngIf="activityType === 'SELL'" name="arrow-down-circle-outline" /> } @else if (activityType === 'LIABILITY') {
<ion-icon name="flame-outline" />
} @else if (activityType === 'SELL') {
<ion-icon name="arrow-down-circle-outline" />
}
<span class="d-none d-lg-block mx-1">{{ activityTypeLabel }}</span> <span class="d-none d-lg-block mx-1">{{ activityTypeLabel }}</span>
</div> </div>

14
libs/ui/src/lib/benchmark/benchmark.component.html

@ -16,8 +16,8 @@
</th> </th>
<td *matCellDef="let element" class="d-none d-lg-table-cell px-2" mat-cell> <td *matCellDef="let element" class="d-none d-lg-table-cell px-2" mat-cell>
<div class="d-flex justify-content-end"> <div class="d-flex justify-content-end">
@if (element?.trend50d !== 'UNKNOWN') {
<gf-trend-indicator <gf-trend-indicator
*ngIf="element?.trend50d !== 'UNKNOWN'"
[value]=" [value]="
element?.trend50d === 'UP' element?.trend50d === 'UP'
? 0.001 ? 0.001
@ -26,6 +26,7 @@
: 0 : 0
" "
/> />
}
</div> </div>
</td> </td>
</ng-container> </ng-container>
@ -40,8 +41,8 @@
</th> </th>
<td *matCellDef="let element" class="d-none d-lg-table-cell px-2" mat-cell> <td *matCellDef="let element" class="d-none d-lg-table-cell px-2" mat-cell>
<div class="d-flex justify-content-end"> <div class="d-flex justify-content-end">
@if (element?.trend200d !== 'UNKNOWN') {
<gf-trend-indicator <gf-trend-indicator
*ngIf="element?.trend200d !== 'UNKNOWN'"
[value]=" [value]="
element?.trend200d === 'UP' element?.trend200d === 'UP'
? 0.001 ? 0.001
@ -50,6 +51,7 @@
: 0 : 0
" "
/> />
}
</div> </div>
</td> </td>
</ng-container> </ng-container>
@ -99,13 +101,11 @@
<ng-container matColumnDef="marketCondition"> <ng-container matColumnDef="marketCondition">
<th *matHeaderCellDef mat-header-cell></th> <th *matHeaderCellDef mat-header-cell></th>
<td *matCellDef="let element" class="px-0" mat-cell> <td *matCellDef="let element" class="px-0" mat-cell>
<div @if (element?.marketCondition) {
*ngIf="element?.marketCondition" <div class="text-center" [title]="element?.marketCondition">
class="text-center"
[title]="element?.marketCondition"
>
{{ resolveMarketCondition(element.marketCondition).emoji }} {{ resolveMarketCondition(element.marketCondition).emoji }}
</div> </div>
}
</td> </td>
</ng-container> </ng-container>

6
libs/ui/src/lib/carousel/carousel.component.html

@ -1,5 +1,5 @@
@if (this.showPrevArrow) {
<button <button
*ngIf="this.showPrevArrow"
aria-hidden="true" aria-hidden="true"
aria-label="previous" aria-label="previous"
class="carousel-nav carousel-nav-prev no-min-width position-absolute px-1" class="carousel-nav carousel-nav-prev no-min-width position-absolute px-1"
@ -9,6 +9,7 @@
> >
<ion-icon name="chevron-back-outline" /> <ion-icon name="chevron-back-outline" />
</button> </button>
}
<div <div
#contentWrapper #contentWrapper
@ -21,8 +22,8 @@
</div> </div>
</div> </div>
@if (this.showNextArrow) {
<button <button
*ngIf="this.showNextArrow"
aria-hidden="true" aria-hidden="true"
aria-label="next" aria-label="next"
class="carousel-nav carousel-nav-next no-min-width position-absolute px-1" class="carousel-nav carousel-nav-next no-min-width position-absolute px-1"
@ -32,3 +33,4 @@
> >
<ion-icon name="chevron-forward-outline" /> <ion-icon name="chevron-forward-outline" />
</button> </button>
}

8
libs/ui/src/lib/currency-selector/currency-selector.component.html

@ -11,11 +11,9 @@
[displayWith]="displayFn" [displayWith]="displayFn"
(optionSelected)="onUpdateCurrency($event)" (optionSelected)="onUpdateCurrency($event)"
> >
<mat-option @for (currencyItem of filteredCurrencies; track currencyItem) {
*ngFor="let currencyItem of filteredCurrencies" <mat-option class="line-height-1" [value]="currencyItem">
class="line-height-1"
[value]="currencyItem"
>
{{ currencyItem.label }} {{ currencyItem.label }}
</mat-option> </mat-option>
}
</mat-autocomplete> </mat-autocomplete>

3
libs/ui/src/lib/fire-calculator/fire-calculator.component.html

@ -70,14 +70,15 @@
</div> </div>
<div class="col-md-9 text-center"> <div class="col-md-9 text-center">
<div class="chart-container mb-4"> <div class="chart-container mb-4">
@if (isLoading) {
<ngx-skeleton-loader <ngx-skeleton-loader
*ngIf="isLoading"
animation="pulse" animation="pulse"
[theme]="{ [theme]="{
height: '100%', height: '100%',
width: '100%' width: '100%'
}" }"
/> />
}
<canvas <canvas
#chartCanvas #chartCanvas
class="h-100" class="h-100"

25
libs/ui/src/lib/holdings-table/holdings-table.component.html

@ -30,9 +30,9 @@
<td *matCellDef="let element" class="line-height-1 px-1" mat-cell> <td *matCellDef="let element" class="line-height-1 px-1" mat-cell>
<div class="text-truncate"> <div class="text-truncate">
{{ element.name }} {{ element.name }}
<span *ngIf="element.name === element.symbol" @if (element.name === element.symbol) {
>({{ element.assetSubClassLabel }})</span <span>({{ element.assetSubClassLabel }})</span>
> }
</div> </div>
<div> <div>
<small class="text-muted">{{ element.symbol }}</small> <small class="text-muted">{{ element.symbol }}</small>
@ -154,8 +154,8 @@
<mat-paginator class="d-none" [pageSize]="pageSize" /> <mat-paginator class="d-none" [pageSize]="pageSize" />
@if (isLoading) {
<ngx-skeleton-loader <ngx-skeleton-loader
*ngIf="isLoading"
animation="pulse" animation="pulse"
class="px-4 py-3" class="px-4 py-3"
[theme]="{ [theme]="{
@ -163,21 +163,20 @@
width: '100%' width: '100%'
}" }"
/> />
}
<div @if (dataSource.data.length > pageSize && !isLoading) {
*ngIf="dataSource.data.length > pageSize && !isLoading" <div class="my-3 text-center">
class="my-3 text-center"
>
<button mat-stroked-button (click)="onShowAllPositions()"> <button mat-stroked-button (click)="onShowAllPositions()">
<ng-container i18n>Show all</ng-container> <ng-container i18n>Show all</ng-container>
</button> </button>
</div> </div>
}
<div @if (
*ngIf="
dataSource.data.length === 0 && hasPermissionToCreateActivity && !isLoading dataSource.data.length === 0 && hasPermissionToCreateActivity && !isLoading
" ) {
class="p-3 text-center" <div class="p-3 text-center">
>
<gf-no-transactions-info-indicator [hasBorder]="false" /> <gf-no-transactions-info-indicator [hasBorder]="false" />
</div> </div>
}

3
libs/ui/src/lib/line-chart/line-chart.component.html

@ -1,11 +1,12 @@
@if (isLoading && showLoader) {
<ngx-skeleton-loader <ngx-skeleton-loader
*ngIf="isLoading && showLoader"
animation="pulse" animation="pulse"
[theme]="{ [theme]="{
height: '100%', height: '100%',
width: '100%' width: '100%'
}" }"
/> />
}
<canvas <canvas
#chartCanvas #chartCanvas
[ngStyle]="{ display: isLoading ? 'none' : 'block' }" [ngStyle]="{ display: isLoading ? 'none' : 'block' }"

6
libs/ui/src/lib/logo/logo.component.html

@ -1,4 +1,6 @@
<span class="align-items-center d-flex" <span class="align-items-center d-flex"
><span class="d-inline-block logo" [ngClass]="{ 'mr-1': showLabel }"></span> ><span class="d-inline-block logo" [ngClass]="{ 'mr-1': showLabel }"></span>
<span *ngIf="showLabel" class="label">{{ label ?? 'Ghostfolio' }}</span></span @if (showLabel) {
> <span class="label">{{ label ?? 'Ghostfolio' }}</span>
}
</span>

4
libs/ui/src/lib/membership-card/membership-card.component.html

@ -18,12 +18,14 @@
<div class="heading text-muted" i18n>Membership</div> <div class="heading text-muted" i18n>Membership</div>
<div class="text-truncate value">{{ name }}</div> <div class="text-truncate value">{{ name }}</div>
</div> </div>
<div *ngIf="expiresAt"> @if (expiresAt) {
<div>
<div class="heading text-muted" i18n>Valid until</div> <div class="heading text-muted" i18n>Valid until</div>
<div class="text-truncate value"> <div class="text-truncate value">
{{ expiresAt }} {{ expiresAt }}
</div> </div>
</div> </div>
}
</div> </div>
</a> </a>
</div> </div>

3
libs/ui/src/lib/portfolio-proportion-chart/portfolio-proportion-chart.component.html

@ -1,11 +1,12 @@
@if (isLoading) {
<ngx-skeleton-loader <ngx-skeleton-loader
*ngIf="isLoading"
animation="pulse" animation="pulse"
class="h-100" class="h-100"
[theme]="{ [theme]="{
height: '100%' height: '100%'
}" }"
/> />
}
<canvas <canvas
#chartCanvas #chartCanvas
[ngStyle]="{ display: isLoading ? 'none' : 'block' }" [ngStyle]="{ display: isLoading ? 'none' : 'block' }"

22
libs/ui/src/lib/symbol-autocomplete/symbol-autocomplete.component.html

@ -11,9 +11,9 @@
[displayWith]="displayFn" [displayWith]="displayFn"
(optionSelected)="onUpdateSymbol($event)" (optionSelected)="onUpdateSymbol($event)"
> >
<ng-container *ngIf="!isLoading"> @if (!isLoading) {
@for (lookupItem of filteredLookupItems; track lookupItem) {
<mat-option <mat-option
*ngFor="let lookupItem of filteredLookupItems"
class="line-height-1" class="line-height-1"
[disabled]="lookupItem.dataProviderInfo.isPremium" [disabled]="lookupItem.dataProviderInfo.isPremium"
[value]="lookupItem" [value]="lookupItem"
@ -25,12 +25,16 @@
} }
</span> </span>
<small class="text-muted" <small class="text-muted"
>{{ lookupItem.symbol | gfSymbol }} · {{ lookupItem.currency >{{ lookupItem.symbol | gfSymbol }} · {{ lookupItem.currency }}
}}<ng-container *ngIf="lookupItem.assetSubClass"> @if (lookupItem.assetSubClass) {
· {{ lookupItem.assetSubClassString }}</ng-container · {{ lookupItem.assetSubClassString }}
></small }
> </small>
</mat-option> </mat-option>
</ng-container> }
}
</mat-autocomplete> </mat-autocomplete>
<mat-spinner *ngIf="isLoading" class="position-absolute" [diameter]="20" />
@if (isLoading) {
<mat-spinner class="position-absolute" [diameter]="20" />
}

Loading…
Cancel
Save