From e3a9d754dfad19da1f591e2e6ff29fd04414ed63 Mon Sep 17 00:00:00 2001 From: Aidan Timson Date: Thu, 28 Aug 2025 17:05:53 +0100 Subject: [PATCH] Change loading detailed storage to use `ha-alert` with spinner (#26749) * Change spinner overlay to use `ha-alert` with messaging * Use spinner for icon slot --- .../storage/ha-config-section-storage.ts | 27 ++++++++++--------- src/translations/en.json | 1 + 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/src/panels/config/storage/ha-config-section-storage.ts b/src/panels/config/storage/ha-config-section-storage.ts index 7357ef937b..5a7e094495 100644 --- a/src/panels/config/storage/ha-config-section-storage.ts +++ b/src/panels/config/storage/ha-config-section-storage.ts @@ -327,8 +327,7 @@ class HaConfigSectionStorage extends LitElement { >${roundWithOneDecimal(freeSpaceGB)} GB`, }); - const chart = html` - - `; - return storageInfo || storageInfo === null - ? chart - : html` -
- ${chart} -
- -
-
- `; + + ${!storageInfo || storageInfo === null + ? html` + + ${this.hass.localize( + "ui.panel.config.storage.loading_detailed" + )}` + : nothing}`; } ); @@ -522,6 +519,10 @@ class HaConfigSectionStorage extends LitElement { ha-icon-next { width: 24px; } + + ha-alert ha-spinner { + --ha-spinner-size: 24px; + } `; } diff --git a/src/translations/en.json b/src/translations/en.json index 2c9aa4646e..1b4b0267c6 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -6674,6 +6674,7 @@ "description": "{percent_used} used - {free_space} free", "used_space": "Storage", "detailed_description": "{used} of {total} used", + "loading_detailed": "Loading detailed storage information...", "segments": { "used": "Used space", "free": "Free space",