diff --git a/src/localize/languages/en.json b/src/localize/languages/en.json index fc21ece5..f10ddec8 100644 --- a/src/localize/languages/en.json +++ b/src/localize/languages/en.json @@ -26,6 +26,7 @@ "lovelace_elements": "Lovelace elements", "lovelace": "Lovelace", "manage": "manage", + "navigate": "navigate", "netdaemon_apps": "NetDaemon Apps", "netdaemon_plural": "NetDaemon Apps", "netdaemon": "NetDaemon", diff --git a/src/panels/hacs-entry-panel.ts b/src/panels/hacs-entry-panel.ts index dd1b6144..23dfd3f5 100644 --- a/src/panels/hacs-entry-panel.ts +++ b/src/panels/hacs-entry-panel.ts @@ -7,6 +7,7 @@ import "@polymer/paper-item/paper-item-body"; import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; import { customElement, property } from "lit/decorators"; import { isComponentLoaded } from "../../homeassistant-frontend/src/common/config/is_component_loaded"; +import { navigate } from "../../homeassistant-frontend/src/common/navigate"; import { computeRTL } from "../../homeassistant-frontend/src/common/util/compute_rtl"; import "../../homeassistant-frontend/src/components/ha-alert"; import "../../homeassistant-frontend/src/components/ha-card"; @@ -105,10 +106,13 @@ export class HacsEntryPanel extends LitElement { ? `${message.name} - ${message.secondary}` : message.name} .rtl=${computeRTL(this.hass)} - .actionText=${message.dialog + .actionText=${message.path + ? this.hacs.localize("common.navigate") + : message.dialog ? this.hacs.localize(`common.${message.dialog}`) : ""} - @alert-action-clicked=${() => this._openDialog(message)} + @alert-action-clicked=${() => + message.path ? navigate(message.path) : this._openDialog(message)} > ${message.info} diff --git a/src/tools/get-messages.ts b/src/tools/get-messages.ts index c66b43ee..1b556b1d 100644 --- a/src/tools/get-messages.ts +++ b/src/tools/get-messages.ts @@ -69,6 +69,7 @@ export const getMessages = memoizeOne((hacs: Hacs): Message[] => { if (repositoriesRestartPending.length > 0) { messages.push({ name: hacs.localize("entry.messages.restart.title"), + path: "/config/server_control", info: hacs.localize("entry.messages.restart.content", { number: repositoriesRestartPending.length, pluralWording: