mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Fix hassio unavailable dashboard & update card
This commit is contained in:
parent
671e564037
commit
5dbd5c7395
@ -17,7 +17,7 @@ class HassioCardContent extends LitElement {
|
|||||||
@property() public hass!: HomeAssistant;
|
@property() public hass!: HomeAssistant;
|
||||||
@property() public title!: string;
|
@property() public title!: string;
|
||||||
@property() public description?: string;
|
@property() public description?: string;
|
||||||
@property({ type: Boolean }) public available: boolean = true;
|
@property({ type: Boolean }) public available?: boolean;
|
||||||
@property() public datetime?: string;
|
@property() public datetime?: string;
|
||||||
@property() public iconTitle?: string;
|
@property() public iconTitle?: string;
|
||||||
@property() public iconClass?: string;
|
@property() public iconClass?: string;
|
||||||
@ -33,7 +33,9 @@ class HassioCardContent extends LitElement {
|
|||||||
<div>
|
<div>
|
||||||
<div class="title">${this.title}</div>
|
<div class="title">${this.title}</div>
|
||||||
<div class="addition">
|
<div class="addition">
|
||||||
${this.description} ${this.available ? undefined : " (Not available"}
|
${this.description}
|
||||||
|
${/* treat as available when undefined */
|
||||||
|
this.available === false ? " (Not available)" : ""}
|
||||||
${this.datetime
|
${this.datetime
|
||||||
? html`
|
? html`
|
||||||
<ha-relative-time
|
<ha-relative-time
|
||||||
|
@ -26,26 +26,13 @@ class HassioHassUpdate extends PolymerElement {
|
|||||||
<template is="dom-if" if="[[computeUpdateAvailable(hassInfo)]]">
|
<template is="dom-if" if="[[computeUpdateAvailable(hassInfo)]]">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="card-group">
|
<div class="card-group">
|
||||||
<div class="title">Update available! 🎉</div>
|
<paper-card heading="Update available! 🎉">
|
||||||
<paper-card>
|
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
<hassio-card-content
|
Home Assistant [[hassInfo.last_version]] is available and you
|
||||||
hass="[[hass]]"
|
are currently running Home Assistant [[hassInfo.version]].
|
||||||
title="Home Assistant [[hassInfo.last_version]] is available"
|
|
||||||
description="You are currently running version [[hassInfo.version]]"
|
|
||||||
icon="hassio:home-assistant"
|
|
||||||
icon-class="hassupdate"
|
|
||||||
></hassio-card-content>
|
|
||||||
<template is="dom-if" if="[[error]]">
|
<template is="dom-if" if="[[error]]">
|
||||||
<div class="error">Error: [[error]]</div>
|
<div class="error">Error: [[error]]</div>
|
||||||
</template>
|
</template>
|
||||||
<p>
|
|
||||||
<a
|
|
||||||
href="https://www.home-assistant.io/latest-release-notes/"
|
|
||||||
target="_blank"
|
|
||||||
>Read the release notes</a
|
|
||||||
>
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="card-actions">
|
<div class="card-actions">
|
||||||
<ha-call-api-button
|
<ha-call-api-button
|
||||||
@ -54,7 +41,7 @@ class HassioHassUpdate extends PolymerElement {
|
|||||||
>Update</ha-call-api-button
|
>Update</ha-call-api-button
|
||||||
>
|
>
|
||||||
<a
|
<a
|
||||||
href="https://github.com/home-assistant/home-assistant/releases"
|
href="https://www.home-assistant.io/latest-release-notes/"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
><mwc-button>Release notes</mwc-button></a
|
><mwc-button>Release notes</mwc-button></a
|
||||||
>
|
>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user