Feature/migrate value component to control flow (#4592)
* Migrate to control flow * Update changelog
This commit is contained in:
parent
53a81b3c2b
commit
10580e22d1
@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
- Renamed `User` to `user` in the `Subscription` database schema
|
- Renamed `User` to `user` in the `Subscription` database schema
|
||||||
- Migrated the `@ghostfolio/ui/assistant` component to control flow
|
- Migrated the `@ghostfolio/ui/assistant` component to control flow
|
||||||
|
- Migrated the `@ghostfolio/ui/value` component to control flow
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
<div *ngIf="+value > 0" class="mr-1 text-success">+</div>
|
<div *ngIf="+value > 0" class="mr-1 text-success">+</div>
|
||||||
<div *ngIf="+value < 0" class="mr-1 text-danger">-</div>
|
<div *ngIf="+value < 0" class="mr-1 text-danger">-</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
@if (isPercent) {
|
||||||
<div
|
<div
|
||||||
*ngIf="isPercent"
|
|
||||||
class="mb-0 value"
|
class="mb-0 value"
|
||||||
[ngClass]="{
|
[ngClass]="{
|
||||||
'font-weight-bold h2': size === 'large',
|
'font-weight-bold h2': size === 'large',
|
||||||
@ -27,8 +27,8 @@
|
|||||||
{{ formattedValue }}%
|
{{ formattedValue }}%
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
} @else {
|
||||||
<div
|
<div
|
||||||
*ngIf="!isPercent"
|
|
||||||
class="mb-0 value"
|
class="mb-0 value"
|
||||||
[ngClass]="{
|
[ngClass]="{
|
||||||
'font-weight-bold h2': size === 'large',
|
'font-weight-bold h2': size === 'large',
|
||||||
@ -41,14 +41,17 @@
|
|||||||
{{ formattedValue }}
|
{{ formattedValue }}
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
<small *ngIf="unit && size === 'medium'" class="ml-1">
|
}
|
||||||
|
@if (unit) {
|
||||||
|
<small *ngIf="size === 'medium'" class="ml-1">
|
||||||
{{ unit }}
|
{{ unit }}
|
||||||
</small>
|
</small>
|
||||||
<div *ngIf="unit && size !== 'medium'" class="ml-1">
|
<div *ngIf="size !== 'medium'" class="ml-1">
|
||||||
{{ unit }}
|
{{ unit }}
|
||||||
</div>
|
</div>
|
||||||
|
}
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container *ngIf="isString">
|
@if (isString) {
|
||||||
<div
|
<div
|
||||||
class="mb-0 text-truncate value"
|
class="mb-0 text-truncate value"
|
||||||
[ngClass]="{
|
[ngClass]="{
|
||||||
@ -58,12 +61,12 @@
|
|||||||
>
|
>
|
||||||
{{ formattedValue }}
|
{{ formattedValue }}
|
||||||
</div>
|
</div>
|
||||||
</ng-container>
|
}
|
||||||
</div>
|
</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
|
@if (value === undefined) {
|
||||||
<ngx-skeleton-loader
|
<ngx-skeleton-loader
|
||||||
*ngIf="value === undefined"
|
|
||||||
animation="pulse"
|
animation="pulse"
|
||||||
[theme]="{
|
[theme]="{
|
||||||
height:
|
height:
|
||||||
@ -71,6 +74,7 @@
|
|||||||
width: '5rem'
|
width: '5rem'
|
||||||
}"
|
}"
|
||||||
/>
|
/>
|
||||||
|
}
|
||||||
|
|
||||||
<ng-container>
|
<ng-container>
|
||||||
<div *ngIf="size === 'large'" class="text-truncate">
|
<div *ngIf="size === 'large'" class="text-truncate">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user