From 990ad1bb67932cf2c270f675fc8c5805ea5bc988 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20S=C3=B8rensen?= Date: Mon, 29 Nov 2021 23:56:59 +0100 Subject: [PATCH] Dashboard tweaks (#10729) --- .../config/dashboard/ha-config-dashboard.ts | 28 ++----------------- .../config/dashboard/ha-config-updates.ts | 13 +++------ src/panels/config/ha-panel-config.ts | 2 +- src/translations/en.json | 2 +- 4 files changed, 9 insertions(+), 36 deletions(-) diff --git a/src/panels/config/dashboard/ha-config-dashboard.ts b/src/panels/config/dashboard/ha-config-dashboard.ts index 39fd28c5be..eebd88c05a 100644 --- a/src/panels/config/dashboard/ha-config-dashboard.ts +++ b/src/panels/config/dashboard/ha-config-dashboard.ts @@ -1,4 +1,3 @@ -import "./ha-config-updates"; import { mdiCloudLock } from "@mdi/js"; import "@polymer/app-layout/app-header/app-header"; import "@polymer/app-layout/app-toolbar/app-toolbar"; @@ -9,13 +8,14 @@ import "../../../components/ha-card"; import "../../../components/ha-icon-next"; import "../../../components/ha-menu-button"; import { CloudStatus } from "../../../data/cloud"; +import { SupervisorAvailableUpdates } from "../../../data/supervisor/supervisor"; import "../../../layouts/ha-app-layout"; import { haStyle } from "../../../resources/styles"; import { HomeAssistant } from "../../../types"; import "../ha-config-section"; import { configSections } from "../ha-panel-config"; import "./ha-config-navigation"; -import { SupervisorAvailableUpdates } from "../../../data/supervisor/supervisor"; +import "./ha-config-updates"; @customElement("ha-config-dashboard") class HaConfigDashboard extends LitElement { @@ -91,21 +91,7 @@ class HaConfigDashboard extends LitElement { .showAdvanced=${this.showAdvanced} .pages=${configSections.dashboard} > - - ${!this.showAdvanced - ? html` -
- ${this.hass.localize( - "ui.panel.config.advanced_mode.hint_enable" - )} - ${this.hass.localize( - "ui.panel.config.advanced_mode.link_profile_page" - )}. -
- ` - : ""}`} + `} `; @@ -139,14 +125,6 @@ class HaConfigDashboard extends LitElement { padding: 16px; padding-bottom: 0; } - .promo-advanced { - text-align: center; - color: var(--secondary-text-color); - margin-bottom: 24px; - } - .promo-advanced a { - color: var(--secondary-text-color); - } :host([narrow]) ha-card { background-color: var(--primary-background-color); box-shadow: unset; diff --git a/src/panels/config/dashboard/ha-config-updates.ts b/src/panels/config/dashboard/ha-config-updates.ts index e5cb58ebc9..e1c35f3418 100644 --- a/src/panels/config/dashboard/ha-config-updates.ts +++ b/src/panels/config/dashboard/ha-config-updates.ts @@ -76,11 +76,12 @@ class HaConfigUpdates extends LitElement { ` )} - ${!this._showAll && !this.narrow ? html`
` : ""} ${!this._showAll && this.supervisorUpdates.length >= 4 ? html` ` : ""} @@ -122,13 +123,7 @@ class HaConfigUpdates extends LitElement { button.show-all { color: var(--primary-color); text-decoration: none; - margin: 8px 16px; - } - .divider::before { - content: " "; - display: block; - height: 1px; - background-color: var(--divider-color); + margin: 16px; } `, ]; diff --git a/src/panels/config/ha-panel-config.ts b/src/panels/config/ha-panel-config.ts index 784e4d7a6b..f3dbc1e2a9 100644 --- a/src/panels/config/ha-panel-config.ts +++ b/src/panels/config/ha-panel-config.ts @@ -56,7 +56,7 @@ export const configSections: { [name: string]: PageNavigation[] } = { }, { path: "/config/automation", - name: "Automations", + name: "Automations & Scenes", description: "Automations, blueprints, scenes and scripts", iconPath: mdiRobot, iconColor: "#518C43", diff --git a/src/translations/en.json b/src/translations/en.json index f3bbe68476..91b813df21 100755 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -930,7 +930,7 @@ "title": "{count} {count, plural,\n one {update}\n other {updates}\n}", "unable_to_fetch": "Unable to fetch available updates", "version_available": "Version {version_available} is available", - "show_all_updates": "Show all updates", + "more_updates": "+ {count} Updates", "show": "show" }, "areas": {