Link to beta release notes for beta release in hassio (#3243)

This commit is contained in:
Paulus Schoutsen 2019-06-04 08:47:40 -07:00 committed by GitHub
parent 2d056bad81
commit 21ed717287
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -41,10 +41,11 @@ class HassioHassUpdate extends PolymerElement {
>Update</ha-call-api-button
>
<a
href="https://www.home-assistant.io/latest-release-notes/"
href="[[computeReleaseNotesUrl(hassInfo.version)]]"
target="_blank"
><mwc-button>Release notes</mwc-button></a
>
<mwc-button>Release notes</mwc-button>
</a>
</div>
</paper-card>
</div>
@ -84,6 +85,12 @@ class HassioHassUpdate extends PolymerElement {
computeUpdateAvailable(hassInfo) {
return hassInfo.version !== hassInfo.last_version;
}
computeReleaseNotesUrl(version) {
return `https://${
version.includes("b") ? "rc" : "www"
}.home-assistant.io/latest-release-notes/`;
}
}
customElements.define("hassio-hass-update", HassioHassUpdate);