mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-21 08:16:36 +00:00
Dashboard tweaks (#10729)
This commit is contained in:
parent
dbbf246060
commit
990ad1bb67
@ -1,4 +1,3 @@
|
|||||||
import "./ha-config-updates";
|
|
||||||
import { mdiCloudLock } from "@mdi/js";
|
import { mdiCloudLock } from "@mdi/js";
|
||||||
import "@polymer/app-layout/app-header/app-header";
|
import "@polymer/app-layout/app-header/app-header";
|
||||||
import "@polymer/app-layout/app-toolbar/app-toolbar";
|
import "@polymer/app-layout/app-toolbar/app-toolbar";
|
||||||
@ -9,13 +8,14 @@ import "../../../components/ha-card";
|
|||||||
import "../../../components/ha-icon-next";
|
import "../../../components/ha-icon-next";
|
||||||
import "../../../components/ha-menu-button";
|
import "../../../components/ha-menu-button";
|
||||||
import { CloudStatus } from "../../../data/cloud";
|
import { CloudStatus } from "../../../data/cloud";
|
||||||
|
import { SupervisorAvailableUpdates } from "../../../data/supervisor/supervisor";
|
||||||
import "../../../layouts/ha-app-layout";
|
import "../../../layouts/ha-app-layout";
|
||||||
import { haStyle } from "../../../resources/styles";
|
import { haStyle } from "../../../resources/styles";
|
||||||
import { HomeAssistant } from "../../../types";
|
import { HomeAssistant } from "../../../types";
|
||||||
import "../ha-config-section";
|
import "../ha-config-section";
|
||||||
import { configSections } from "../ha-panel-config";
|
import { configSections } from "../ha-panel-config";
|
||||||
import "./ha-config-navigation";
|
import "./ha-config-navigation";
|
||||||
import { SupervisorAvailableUpdates } from "../../../data/supervisor/supervisor";
|
import "./ha-config-updates";
|
||||||
|
|
||||||
@customElement("ha-config-dashboard")
|
@customElement("ha-config-dashboard")
|
||||||
class HaConfigDashboard extends LitElement {
|
class HaConfigDashboard extends LitElement {
|
||||||
@ -91,21 +91,7 @@ class HaConfigDashboard extends LitElement {
|
|||||||
.showAdvanced=${this.showAdvanced}
|
.showAdvanced=${this.showAdvanced}
|
||||||
.pages=${configSections.dashboard}
|
.pages=${configSections.dashboard}
|
||||||
></ha-config-navigation>
|
></ha-config-navigation>
|
||||||
</ha-card>
|
</ha-card>`}
|
||||||
${!this.showAdvanced
|
|
||||||
? html`
|
|
||||||
<div class="promo-advanced">
|
|
||||||
${this.hass.localize(
|
|
||||||
"ui.panel.config.advanced_mode.hint_enable"
|
|
||||||
)}
|
|
||||||
<a href="/profile"
|
|
||||||
>${this.hass.localize(
|
|
||||||
"ui.panel.config.advanced_mode.link_profile_page"
|
|
||||||
)}</a
|
|
||||||
>.
|
|
||||||
</div>
|
|
||||||
`
|
|
||||||
: ""}`}
|
|
||||||
</ha-config-section>
|
</ha-config-section>
|
||||||
</ha-app-layout>
|
</ha-app-layout>
|
||||||
`;
|
`;
|
||||||
@ -139,14 +125,6 @@ class HaConfigDashboard extends LitElement {
|
|||||||
padding: 16px;
|
padding: 16px;
|
||||||
padding-bottom: 0;
|
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 {
|
:host([narrow]) ha-card {
|
||||||
background-color: var(--primary-background-color);
|
background-color: var(--primary-background-color);
|
||||||
box-shadow: unset;
|
box-shadow: unset;
|
||||||
|
@ -76,11 +76,12 @@ class HaConfigUpdates extends LitElement {
|
|||||||
</paper-icon-item>
|
</paper-icon-item>
|
||||||
`
|
`
|
||||||
)}
|
)}
|
||||||
${!this._showAll && !this.narrow ? html`<div class="divider"></div>` : ""}
|
|
||||||
${!this._showAll && this.supervisorUpdates.length >= 4
|
${!this._showAll && this.supervisorUpdates.length >= 4
|
||||||
? html`
|
? html`
|
||||||
<button class="link show-all" @click=${this._showAllClicked}>
|
<button class="link show-all" @click=${this._showAllClicked}>
|
||||||
${this.hass.localize("ui.panel.config.updates.show_all_updates")}
|
${this.hass.localize("ui.panel.config.updates.more_updates", {
|
||||||
|
count: this.supervisorUpdates!.length - updates.length,
|
||||||
|
})}
|
||||||
</button>
|
</button>
|
||||||
`
|
`
|
||||||
: ""}
|
: ""}
|
||||||
@ -122,13 +123,7 @@ class HaConfigUpdates extends LitElement {
|
|||||||
button.show-all {
|
button.show-all {
|
||||||
color: var(--primary-color);
|
color: var(--primary-color);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
margin: 8px 16px;
|
margin: 16px;
|
||||||
}
|
|
||||||
.divider::before {
|
|
||||||
content: " ";
|
|
||||||
display: block;
|
|
||||||
height: 1px;
|
|
||||||
background-color: var(--divider-color);
|
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
];
|
];
|
||||||
|
@ -56,7 +56,7 @@ export const configSections: { [name: string]: PageNavigation[] } = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/config/automation",
|
path: "/config/automation",
|
||||||
name: "Automations",
|
name: "Automations & Scenes",
|
||||||
description: "Automations, blueprints, scenes and scripts",
|
description: "Automations, blueprints, scenes and scripts",
|
||||||
iconPath: mdiRobot,
|
iconPath: mdiRobot,
|
||||||
iconColor: "#518C43",
|
iconColor: "#518C43",
|
||||||
|
@ -930,7 +930,7 @@
|
|||||||
"title": "{count} {count, plural,\n one {update}\n other {updates}\n}",
|
"title": "{count} {count, plural,\n one {update}\n other {updates}\n}",
|
||||||
"unable_to_fetch": "Unable to fetch available updates",
|
"unable_to_fetch": "Unable to fetch available updates",
|
||||||
"version_available": "Version {version_available} is available",
|
"version_available": "Version {version_available} is available",
|
||||||
"show_all_updates": "Show all updates",
|
"more_updates": "+ {count} Updates",
|
||||||
"show": "show"
|
"show": "show"
|
||||||
},
|
},
|
||||||
"areas": {
|
"areas": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user