mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-09 02:16:35 +00:00
Fix some issues and feedback with About and system health (#12537)
This commit is contained in:
parent
080cad0ccd
commit
239e71b414
@ -12,6 +12,8 @@ export class HaClickableListItem extends ListItemBase {
|
|||||||
// property used only in css
|
// property used only in css
|
||||||
@property({ type: Boolean, reflect: true }) public rtl = false;
|
@property({ type: Boolean, reflect: true }) public rtl = false;
|
||||||
|
|
||||||
|
@property({ type: Boolean, reflect: true }) public openNewTab = false;
|
||||||
|
|
||||||
@query("a") private _anchor!: HTMLAnchorElement;
|
@query("a") private _anchor!: HTMLAnchorElement;
|
||||||
|
|
||||||
public render() {
|
public render() {
|
||||||
@ -20,7 +22,12 @@ export class HaClickableListItem extends ListItemBase {
|
|||||||
|
|
||||||
return html`${this.disableHref
|
return html`${this.disableHref
|
||||||
? html`<a aria-role="option">${r}</a>`
|
? html`<a aria-role="option">${r}</a>`
|
||||||
: html`<a aria-role="option" href=${href}>${r}</a>`}`;
|
: html`<a
|
||||||
|
aria-role="option"
|
||||||
|
target=${this.openNewTab ? "_blank" : ""}
|
||||||
|
href=${href}
|
||||||
|
>${r}</a
|
||||||
|
>`}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
firstUpdated() {
|
firstUpdated() {
|
||||||
|
@ -61,6 +61,7 @@ class HaConfigSystemNavigation extends LitElement {
|
|||||||
.pages=${pages}
|
.pages=${pages}
|
||||||
></ha-navigation-list>
|
></ha-navigation-list>
|
||||||
</ha-card>
|
</ha-card>
|
||||||
|
<div class="yaml-config">Looking for YAML Configuration? It has moved to <a href="/developer-tools/yaml">Developer Tools</a></a></div>
|
||||||
</ha-config-section>
|
</ha-config-section>
|
||||||
</hass-subpage>
|
</hass-subpage>
|
||||||
`;
|
`;
|
||||||
@ -136,6 +137,11 @@ class HaConfigSystemNavigation extends LitElement {
|
|||||||
--navigation-list-item-title-font-size: 16px;
|
--navigation-list-item-title-font-size: 16px;
|
||||||
--navigation-list-item-padding: 4px;
|
--navigation-list-item-padding: 4px;
|
||||||
}
|
}
|
||||||
|
.yaml-config {
|
||||||
|
margin-bottom: max(env(safe-area-inset-bottom), 24px);
|
||||||
|
text-align: center;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
`,
|
`,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,6 @@ import "../../../layouts/hass-subpage";
|
|||||||
import { haStyle } from "../../../resources/styles";
|
import { haStyle } from "../../../resources/styles";
|
||||||
import { HomeAssistant, Route } from "../../../types";
|
import { HomeAssistant, Route } from "../../../types";
|
||||||
import { documentationUrl } from "../../../util/documentation-url";
|
import { documentationUrl } from "../../../util/documentation-url";
|
||||||
import "./integrations-card";
|
|
||||||
|
|
||||||
const JS_TYPE = __BUILD__;
|
const JS_TYPE = __BUILD__;
|
||||||
const JS_VERSION = __VERSION__;
|
const JS_VERSION = __VERSION__;
|
||||||
@ -21,13 +20,13 @@ const JS_VERSION = __VERSION__;
|
|||||||
class HaConfigInfo extends LitElement {
|
class HaConfigInfo extends LitElement {
|
||||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||||
|
|
||||||
@property() public narrow!: boolean;
|
@property({ type: Boolean }) public narrow!: boolean;
|
||||||
|
|
||||||
@property() public isWide!: boolean;
|
@property({ type: Boolean }) public isWide!: boolean;
|
||||||
|
|
||||||
@property() public showAdvanced!: boolean;
|
@property({ type: Boolean }) public showAdvanced!: boolean;
|
||||||
|
|
||||||
@property() public route!: Route;
|
@property({ attribute: false }) public route!: Route;
|
||||||
|
|
||||||
@state() private _hostInfo?: HassioHostInfo;
|
@state() private _hostInfo?: HassioHostInfo;
|
||||||
|
|
||||||
@ -61,18 +60,22 @@ class HaConfigInfo extends LitElement {
|
|||||||
</ha-logo-svg>
|
</ha-logo-svg>
|
||||||
</a>
|
</a>
|
||||||
<br />
|
<br />
|
||||||
<h2>Home Assistant Core ${hass.connection.haVersion}</h2>
|
<h3>Home Assistant Core ${hass.connection.haVersion}</h3>
|
||||||
${this._hassioInfo
|
${this._hassioInfo
|
||||||
? html`<h2>
|
? html`
|
||||||
|
<h3>
|
||||||
Home Assistant Supervisor ${this._hassioInfo.supervisor}
|
Home Assistant Supervisor ${this._hassioInfo.supervisor}
|
||||||
</h2>`
|
</h3>
|
||||||
|
`
|
||||||
: ""}
|
: ""}
|
||||||
${this._osInfo?.version
|
${this._osInfo?.version
|
||||||
? html`<h2>Home Assistant OS ${this._osInfo.version}</h2>`
|
? html`<h3>Home Assistant OS ${this._osInfo.version}</h3>`
|
||||||
: ""}
|
: ""}
|
||||||
${this._hostInfo
|
${this._hostInfo
|
||||||
? html`<h4>Kernel version ${this._hostInfo.kernel}</h4>
|
? html`
|
||||||
<h4>Agent version ${this._hostInfo.agent_version}</h4>`
|
<h4>Kernel version ${this._hostInfo.kernel}</h4>
|
||||||
|
<h4>Agent version ${this._hostInfo.agent_version}</h4>
|
||||||
|
`
|
||||||
: ""}
|
: ""}
|
||||||
<p>
|
<p>
|
||||||
${this.hass.localize(
|
${this.hass.localize(
|
||||||
@ -211,18 +214,15 @@ class HaConfigInfo extends LitElement {
|
|||||||
.about a {
|
.about a {
|
||||||
color: var(--primary-color);
|
color: var(--primary-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
integrations-card {
|
|
||||||
display: block;
|
|
||||||
max-width: 600px;
|
|
||||||
margin: 0 auto;
|
|
||||||
padding-bottom: 16px;
|
|
||||||
}
|
|
||||||
ha-logo-svg {
|
ha-logo-svg {
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
height: 180px;
|
height: 180px;
|
||||||
width: 180px;
|
width: 180px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
h4 {
|
||||||
|
font-weight: 400;
|
||||||
|
}
|
||||||
`,
|
`,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ import { SubscribeMixin } from "../../../mixins/subscribe-mixin";
|
|||||||
import type { HomeAssistant } from "../../../types";
|
import type { HomeAssistant } from "../../../types";
|
||||||
import { documentationUrl } from "../../../util/documentation-url";
|
import { documentationUrl } from "../../../util/documentation-url";
|
||||||
import { showToast } from "../../../util/toast";
|
import { showToast } from "../../../util/toast";
|
||||||
import "../info/integrations-card";
|
import "./integrations-card";
|
||||||
|
|
||||||
const sortKeys = (a: string, b: string) => {
|
const sortKeys = (a: string, b: string) => {
|
||||||
if (a === "homeassistant") {
|
if (a === "homeassistant") {
|
||||||
|
@ -48,7 +48,7 @@ class IntegrationsCard extends LitElement {
|
|||||||
<ha-card
|
<ha-card
|
||||||
outlined
|
outlined
|
||||||
.header=${this.hass.localize(
|
.header=${this.hass.localize(
|
||||||
"ui.panel.config.system_health.long_loading_integrations"
|
"ui.panel.config.system_health.integration_start_time"
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<mwc-list>
|
<mwc-list>
|
||||||
@ -69,6 +69,7 @@ class IntegrationsCard extends LitElement {
|
|||||||
graphic="avatar"
|
graphic="avatar"
|
||||||
twoline
|
twoline
|
||||||
hasMeta
|
hasMeta
|
||||||
|
openNewTab
|
||||||
@click=${this._entryClicked}
|
@click=${this._entryClicked}
|
||||||
href=${docLink}
|
href=${docLink}
|
||||||
>
|
>
|
||||||
@ -129,7 +130,7 @@ class IntegrationsCard extends LitElement {
|
|||||||
static get styles(): CSSResultGroup {
|
static get styles(): CSSResultGroup {
|
||||||
return css`
|
return css`
|
||||||
ha-clickable-list-item {
|
ha-clickable-list-item {
|
||||||
--mdc-list-item-meta-size: 48px;
|
--mdc-list-item-meta-size: 64px;
|
||||||
--mdc-typography-caption-font-size: 12px;
|
--mdc-typography-caption-font-size: 12px;
|
||||||
}
|
}
|
||||||
img {
|
img {
|
||||||
@ -137,6 +138,11 @@ class IntegrationsCard extends LitElement {
|
|||||||
max-height: 40px;
|
max-height: 40px;
|
||||||
max-width: 40px;
|
max-width: 40px;
|
||||||
}
|
}
|
||||||
|
div[slot="meta"] {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1152,7 +1152,7 @@
|
|||||||
},
|
},
|
||||||
"about": {
|
"about": {
|
||||||
"main": "About",
|
"main": "About",
|
||||||
"secondary": "Version, loaded integrations and links to documentation"
|
"secondary": "Version information, credits and more"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"common": {
|
"common": {
|
||||||
@ -3167,7 +3167,7 @@
|
|||||||
"ram_usage": "Memory Usage",
|
"ram_usage": "Memory Usage",
|
||||||
"core_stats": "Core Stats",
|
"core_stats": "Core Stats",
|
||||||
"supervisor_stats": "Supervisor Stats",
|
"supervisor_stats": "Supervisor Stats",
|
||||||
"long_loading_integrations": "Long Loading Integrations"
|
"integration_start_time": "Integration Startup Time"
|
||||||
},
|
},
|
||||||
"system_dashboard": {
|
"system_dashboard": {
|
||||||
"confirm_restart_text": "Restarting Home Assistant will stop all your active dashboards, automations and scripts.",
|
"confirm_restart_text": "Restarting Home Assistant will stop all your active dashboards, automations and scripts.",
|
||||||
@ -4155,7 +4155,7 @@
|
|||||||
"adjust_sum": "Adjust sum"
|
"adjust_sum": "Adjust sum"
|
||||||
},
|
},
|
||||||
"yaml": {
|
"yaml": {
|
||||||
"title": "YAML Configuration",
|
"title": "YAML",
|
||||||
"section": {
|
"section": {
|
||||||
"validation": {
|
"validation": {
|
||||||
"heading": "Configuration validation",
|
"heading": "Configuration validation",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user