mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Ignore previous versions in add-on changelog (#9474)
This commit is contained in:
parent
08de941c90
commit
0a83a704f1
@ -892,10 +892,19 @@ class HassioAddonInfo extends LitElement {
|
|||||||
|
|
||||||
private async _openChangelog(): Promise<void> {
|
private async _openChangelog(): Promise<void> {
|
||||||
try {
|
try {
|
||||||
const content = await fetchHassioAddonChangelog(
|
let content = await fetchHassioAddonChangelog(this.hass, this.addon.slug);
|
||||||
this.hass,
|
if (
|
||||||
this.addon.slug
|
content.includes(`# ${this.addon.version}`) &&
|
||||||
);
|
content.includes(`# ${this.addon.version_latest}`)
|
||||||
|
) {
|
||||||
|
const newcontent = content.split(`# ${this.addon.version}`)[0];
|
||||||
|
if (newcontent.includes(`# ${this.addon.version_latest}`)) {
|
||||||
|
// Only change the content if the new version still exist
|
||||||
|
// if the changelog does not have the newests version on top
|
||||||
|
// this will not be true, and we don't modify the content
|
||||||
|
content = newcontent;
|
||||||
|
}
|
||||||
|
}
|
||||||
showHassioMarkdownDialog(this, {
|
showHassioMarkdownDialog(this, {
|
||||||
title: this.supervisor.localize("addon.dashboard.changelog"),
|
title: this.supervisor.localize("addon.dashboard.changelog"),
|
||||||
content,
|
content,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user