mirror of https://github.com/ghostfolio/ghostfolio
committed by
Thomas
5 changed files with 60 additions and 64 deletions
@ -1,15 +1,12 @@ |
|||
import { NgModule } from '@angular/core'; |
|||
import { CommonModule } from '@angular/common'; |
|||
import { NgModule } from '@angular/core'; |
|||
|
|||
import { ValueComponent } from './value/value.component'; |
|||
// import { GfValueModule } from './value/value.module';
|
|||
|
|||
@NgModule({ |
|||
imports: [CommonModule/*, GfValueModule*/], |
|||
declarations: [ |
|||
ValueComponent |
|||
], |
|||
exports: [ |
|||
ValueComponent |
|||
] |
|||
imports: [CommonModule /*, GfValueModule*/], |
|||
declarations: [ValueComponent], |
|||
exports: [ValueComponent] |
|||
}) |
|||
export class UiModule {} |
|||
|
@ -1,46 +1,45 @@ |
|||
<ng-container *ngIf="value || value === 0 || value === null"> |
|||
<div |
|||
class="d-flex" |
|||
[ngClass]="position === 'end' ? 'justify-content-end' : ''" |
|||
> |
|||
<ng-container *ngIf="isNumber || value === null"> |
|||
<div *ngIf="colorizeSign && value > 0" class="mr-1 text-success">+</div> |
|||
<div *ngIf="colorizeSign && value < 0" class="mr-1 text-danger">-</div> |
|||
<div *ngIf="isPercent" [ngClass]="size === 'medium' ? 'h4 mb-0' : ''"> |
|||
{{ formattedValue }}% |
|||
</div> |
|||
<div *ngIf="!isPercent" [ngClass]="size === 'medium' ? 'h4 mb-0' : ''"> |
|||
<ng-container *ngIf="value === null"> |
|||
<span class="text-monospace text-muted">***</span> |
|||
</ng-container> |
|||
<ng-container *ngIf="value !== null"> |
|||
{{ formattedValue }} |
|||
</ng-container> |
|||
</div> |
|||
<small *ngIf="currency && size === 'medium'" class="ml-1"> |
|||
{{ currency }} |
|||
</small> |
|||
<div *ngIf="currency && size !== 'medium'" class="ml-1"> |
|||
{{ currency }} |
|||
</div> |
|||
</ng-container> |
|||
<ng-container *ngIf="isDate"> |
|||
<div [ngClass]="size === 'medium' ? 'h4 mb-0' : ''"> |
|||
{{ formattedDate }} |
|||
</div> |
|||
</ng-container> |
|||
</div> |
|||
<small *ngIf="label"> |
|||
{{ label }} |
|||
</small> |
|||
</ng-container> |
|||
|
|||
<ngx-skeleton-loader |
|||
*ngIf="value === undefined" |
|||
animation="pulse" |
|||
[theme]="{ |
|||
height: '1.5rem', |
|||
width: '5rem' |
|||
}" |
|||
></ngx-skeleton-loader> |
|||
|
|||
<div |
|||
class="d-flex" |
|||
[ngClass]="position === 'end' ? 'justify-content-end' : ''" |
|||
> |
|||
<ng-container *ngIf="isNumber || value === null"> |
|||
<div *ngIf="colorizeSign && value > 0" class="mr-1 text-success">+</div> |
|||
<div *ngIf="colorizeSign && value < 0" class="mr-1 text-danger">-</div> |
|||
<div *ngIf="isPercent" [ngClass]="size === 'medium' ? 'h4 mb-0' : ''"> |
|||
{{ formattedValue }}% |
|||
</div> |
|||
<div *ngIf="!isPercent" [ngClass]="size === 'medium' ? 'h4 mb-0' : ''"> |
|||
<ng-container *ngIf="value === null"> |
|||
<span class="text-monospace text-muted">***</span> |
|||
</ng-container> |
|||
<ng-container *ngIf="value !== null"> |
|||
{{ formattedValue }} |
|||
</ng-container> |
|||
</div> |
|||
<small *ngIf="currency && size === 'medium'" class="ml-1"> |
|||
{{ currency }} |
|||
</small> |
|||
<div *ngIf="currency && size !== 'medium'" class="ml-1"> |
|||
{{ currency }} |
|||
</div> |
|||
</ng-container> |
|||
<ng-container *ngIf="isDate"> |
|||
<div [ngClass]="size === 'medium' ? 'h4 mb-0' : ''"> |
|||
{{ formattedDate }} |
|||
</div> |
|||
</ng-container> |
|||
</div> |
|||
<small *ngIf="label"> |
|||
{{ label }} |
|||
</small> |
|||
</ng-container> |
|||
|
|||
<ngx-skeleton-loader |
|||
*ngIf="value === undefined" |
|||
animation="pulse" |
|||
[theme]="{ |
|||
height: '1.5rem', |
|||
width: '5rem' |
|||
}" |
|||
></ngx-skeleton-loader> |
|||
|
Loading…
Reference in new issue