mirror of
https://github.com/home-assistant/frontend
synced 2024-09-12 05:34:56 +02:00
Fix core changelog URL (#10804)
This commit is contained in:
parent
c3e1a2edf0
commit
419879ee7a
@ -48,7 +48,6 @@ import "../../../src/layouts/hass-subpage";
|
|||||||
import "../../../src/layouts/hass-tabs-subpage";
|
import "../../../src/layouts/hass-tabs-subpage";
|
||||||
import { SUPERVISOR_UPDATE_NAMES } from "../../../src/panels/config/dashboard/ha-config-updates";
|
import { SUPERVISOR_UPDATE_NAMES } from "../../../src/panels/config/dashboard/ha-config-updates";
|
||||||
import { HomeAssistant, Route } from "../../../src/types";
|
import { HomeAssistant, Route } from "../../../src/types";
|
||||||
import { documentationUrl } from "../../../src/util/documentation-url";
|
|
||||||
import { addonArchIsSupported, extractChangelog } from "../util/addon";
|
import { addonArchIsSupported, extractChangelog } from "../util/addon";
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
@ -60,7 +59,6 @@ declare global {
|
|||||||
type updateType = "os" | "supervisor" | "core" | "addon";
|
type updateType = "os" | "supervisor" | "core" | "addon";
|
||||||
|
|
||||||
const changelogUrl = (
|
const changelogUrl = (
|
||||||
hass: HomeAssistant,
|
|
||||||
entry: updateType,
|
entry: updateType,
|
||||||
version: string
|
version: string
|
||||||
): string | undefined => {
|
): string | undefined => {
|
||||||
@ -68,17 +66,19 @@ const changelogUrl = (
|
|||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
if (entry === "core") {
|
if (entry === "core") {
|
||||||
return version?.includes("dev")
|
return version.includes("dev")
|
||||||
? "https://github.com/home-assistant/core/commits/dev"
|
? "https://github.com/home-assistant/core/commits/dev"
|
||||||
: documentationUrl(hass, "/latest-release-notes/");
|
: version.includes("b")
|
||||||
|
? "https://next.home-assistant.io/latest-release-notes/"
|
||||||
|
: "https://www.home-assistant.io/latest-release-notes/";
|
||||||
}
|
}
|
||||||
if (entry === "os") {
|
if (entry === "os") {
|
||||||
return version?.includes("dev")
|
return version.includes("dev")
|
||||||
? "https://github.com/home-assistant/operating-system/commits/dev"
|
? "https://github.com/home-assistant/operating-system/commits/dev"
|
||||||
: `https://github.com/home-assistant/operating-system/releases/tag/${version}`;
|
: `https://github.com/home-assistant/operating-system/releases/tag/${version}`;
|
||||||
}
|
}
|
||||||
if (entry === "supervisor") {
|
if (entry === "supervisor") {
|
||||||
return version?.includes("dev")
|
return version.includes("dev")
|
||||||
? "https://github.com/home-assistant/supervisor/commits/main"
|
? "https://github.com/home-assistant/supervisor/commits/main"
|
||||||
: `https://github.com/home-assistant/supervisor/releases/tag/${version}`;
|
: `https://github.com/home-assistant/supervisor/releases/tag/${version}`;
|
||||||
}
|
}
|
||||||
@ -120,7 +120,7 @@ class UpdateAvailableCard extends LitElement {
|
|||||||
return html``;
|
return html``;
|
||||||
}
|
}
|
||||||
|
|
||||||
const changelog = changelogUrl(this.hass, this._updateType, this._version);
|
const changelog = changelogUrl(this._updateType, this._version);
|
||||||
|
|
||||||
return html`
|
return html`
|
||||||
<ha-card
|
<ha-card
|
||||||
|
Loading…
Reference in New Issue
Block a user