add reset functionality in settings
This commit is contained in:
parent
1fa04fa4d9
commit
ff01fc8503
5 changed files with 49 additions and 14 deletions
|
@ -117,6 +117,12 @@ export class EveSettings extends LitElement {
|
|||
document.body.classList.toggle('dark', this.darkMode);
|
||||
}
|
||||
|
||||
private reset() {
|
||||
if (!confirm('Are you sure you want to reset the app?')) return;
|
||||
localStorage.clear();
|
||||
window.location.reload();
|
||||
}
|
||||
|
||||
override render() {
|
||||
if (this.error) return html`<arx-error-view .error=${this.error}></arx-error-view>`;
|
||||
|
||||
|
@ -196,6 +202,15 @@ export class EveSettings extends LitElement {
|
|||
<arx-relay-logs .logs=${this.relayStatus.logs}></arx-relay-logs>
|
||||
</arx-fieldset>
|
||||
</arx-card>
|
||||
<arx-card >
|
||||
<arx-fieldset legend="Reset">
|
||||
<p>
|
||||
This will delete all the data stored on this device, and you will be sent back to the setup
|
||||
screen.
|
||||
</p>
|
||||
<arx-button @click=${this.reset} label="Reset" variant="accent" fullWidth></arx-button>
|
||||
</arx-fieldset>
|
||||
</arx-card>
|
||||
`;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue