Prevent config menu jump when cloud info loads (#15638)

Prevent config menu jump
This commit is contained in:
Bram Kragten 2023-02-28 17:21:52 +01:00 committed by GitHub
parent ea95fb98aa
commit a5541996d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View File

@ -137,16 +137,17 @@ class HaConfigDashboard extends SubscribeMixin(LitElement) {
total: 0, total: 0,
}; };
private _pages = memoizeOne((clouStatus, isLoaded) => { private _pages = memoizeOne((cloudStatus, isCloudLoaded) => {
const pages: PageNavigation[] = []; const pages: PageNavigation[] = [];
if (clouStatus && isLoaded) { if (isCloudLoaded) {
pages.push({ pages.push({
component: "cloud", component: "cloud",
path: "/config/cloud", path: "/config/cloud",
name: "Home Assistant Cloud", name: "Home Assistant Cloud",
info: this.cloudStatus, info: cloudStatus,
iconPath: mdiCloudLock, iconPath: mdiCloudLock,
iconColor: "#3B808E", iconColor: "#3B808E",
translationKey: "cloud",
}); });
} }
return [...pages, ...configSections.dashboard]; return [...pages, ...configSections.dashboard];

View File

@ -1395,6 +1395,9 @@
"about": { "about": {
"main": "About", "main": "About",
"secondary": "Version information, credits and more" "secondary": "Version information, credits and more"
},
"cloud": {
"secondary": "Loading..."
} }
}, },
"common": { "common": {