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