Skip to content

Commit

Permalink
Make clear cache message clickable (#384)
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeeus authored Feb 14, 2021
1 parent 6db6cfc commit 92c0d70
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/components/hacs-section-navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class HacsSectionNavigation extends LitElement {
@property({ type: Boolean, attribute: "no-next" }) public noNext: boolean = false;

protected render(): TemplateResult {
console.log(this.pages);
return html`
<ha-card>
${this.header ? html`<div class="card-header">${this.header}</div>` : ""}
Expand All @@ -33,7 +34,9 @@ class HacsSectionNavigation extends LitElement {
<hacs-link .url=${page.path}>
<paper-icon-item
@tap=${() => {
this._openDialog(page);
page.name === "Unexpected frontend version"
? this._clearCache()
: this._openDialog(page);
}}
>
<ha-svg-icon
Expand Down Expand Up @@ -70,6 +73,10 @@ class HacsSectionNavigation extends LitElement {
);
}

private _clearCache() {
window.parent.location.href = window.location.href;
}

static get styles(): CSSResult {
return css`
hacs-link {
Expand Down

0 comments on commit 92c0d70

Please sign in to comment.