mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-27 19:26:36 +00:00
fix back button in hassio addons (#14161)
This commit is contained in:
parent
9b6fca2c0e
commit
370864e0ed
@ -118,7 +118,7 @@ class HassioAddonRepositoryEl extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private _addonTapped(ev) {
|
private _addonTapped(ev) {
|
||||||
navigate(`/hassio/addon/${ev.currentTarget.addon.slug}`);
|
navigate(`/hassio/addon/${ev.currentTarget.addon.slug}?store=true`);
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles(): CSSResultGroup {
|
static get styles(): CSSResultGroup {
|
||||||
|
@ -53,7 +53,13 @@ class HassioAddonDashboard extends LitElement {
|
|||||||
|
|
||||||
@property({ type: Boolean }) public narrow!: boolean;
|
@property({ type: Boolean }) public narrow!: boolean;
|
||||||
|
|
||||||
@state() _error?: string;
|
@state() private _error?: string;
|
||||||
|
|
||||||
|
private _backPath = new URLSearchParams(window.parent.location.search).get(
|
||||||
|
"store"
|
||||||
|
)
|
||||||
|
? "/hassio/store"
|
||||||
|
: "/hassio/dashboard";
|
||||||
|
|
||||||
private _computeTail = memoizeOne((route: Route) => {
|
private _computeTail = memoizeOne((route: Route) => {
|
||||||
const dividerPos = route.path.indexOf("/", 1);
|
const dividerPos = route.path.indexOf("/", 1);
|
||||||
@ -119,6 +125,7 @@ class HassioAddonDashboard extends LitElement {
|
|||||||
.narrow=${this.narrow}
|
.narrow=${this.narrow}
|
||||||
.route=${route}
|
.route=${route}
|
||||||
.tabs=${addonTabs}
|
.tabs=${addonTabs}
|
||||||
|
.backPath=${this._backPath}
|
||||||
supervisor
|
supervisor
|
||||||
>
|
>
|
||||||
<span slot="header">${this.addon.name}</span>
|
<span slot="header">${this.addon.name}</span>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user