diff --git a/CHANGELOG.md b/CHANGELOG.md
index 48e8104d4..b6a97b660 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -14,6 +14,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Improved the style of the assistant
+- Migrated the `@ghostfolio/ui/assistant` component to control flow
+- Migrated the `@ghostfolio/ui/value` component to control flow
- Migrated the `HtmlTemplateMiddleware` to use `@Injectable()`
- Renamed `User` to `user` in the database schema
- Improved the language localization for Catalan (`ca`)
diff --git a/libs/ui/src/lib/assistant/assistant.html b/libs/ui/src/lib/assistant/assistant.html
index 723f1bd5f..938f69851 100644
--- a/libs/ui/src/lib/assistant/assistant.html
+++ b/libs/ui/src/lib/assistant/assistant.html
@@ -40,23 +40,20 @@
*ngIf="searchFormControl.value"
class="overflow-auto py-2 result-container"
>
-
-
- Quick Links
-
- @for (
- searchResultItem of searchResults?.quickLinks;
- track searchResultItem
- ) {
-
- }
-
+ @if (searchResults?.quickLinks?.length !== 0 || isLoading.quickLinks) {
+
+
+ Quick Links
+
+ @for (
+ searchResultItem of searchResults?.quickLinks;
+ track searchResultItem
+ ) {
+
+ }
@if (isLoading.quickLinks) {
}
-
-
+
+ }
Holdings
@for (
@@ -80,7 +77,7 @@
(clicked)="onCloseAssistant()"
/>
}
-
+ @if (searchResults?.holdings?.length === 0) {
@if (isLoading.holdings) {
No entries...
}
-
+ }
@@ -108,7 +105,7 @@
(clicked)="onCloseAssistant()"
/>
}
-
+ @if (searchResults?.assetProfiles?.length === 0) {
@if (isLoading.assetProfiles) {
No entries...
}
-
+ }
@@ -149,12 +146,14 @@
@for (account of accounts; track account.id) {
- {{ account.name }}
+ @if (account.Platform?.url) {
+
+ }
+ {{ account.name }}
}
diff --git a/libs/ui/src/lib/value/value.component.html b/libs/ui/src/lib/value/value.component.html
index e252ef8a2..62e4efb6f 100644
--- a/libs/ui/src/lib/value/value.component.html
+++ b/libs/ui/src/lib/value/value.component.html
@@ -1,6 +1,8 @@
-
-
-
+@if (icon) {
+
+
+
+}
@@ -10,8 +12,12 @@
>
- 0" class="mr-1 text-success">+
- -
+ @if (+value > 0) {
+ +
+ }
+ @if (+value < 0) {
+ -
+ }
@if (isPercent) {
}
@if (unit) {
-
- {{ unit }}
-
-
- {{ unit }}
-
+ @if (size === 'medium') {
+
+ {{ unit }}
+
+ } @else {
+
+ {{ unit }}
+
+ }
}
@if (isString) {
@@ -81,7 +90,9 @@
-
{{ subLabel }}
+ @if (subLabel) {
+
{{ subLabel }}
+ }