Adding clear cache button to settings
This commit is contained in:
parent
60b238d42e
commit
c52e08afa9
@ -30,6 +30,7 @@ self.addEventListener('message', (event) => {
|
||||
if (event.data === "clear_cache") {
|
||||
log("Clearing cache");
|
||||
caches.delete(CACHE);
|
||||
event.waitUntil(precache());
|
||||
}
|
||||
|
||||
if (event.data === "update_index") {
|
||||
|
@ -65,7 +65,7 @@ export class Footer extends Component<{}, { synced: boolean, syncing: boolean }>
|
||||
Welcome <b>{Notes.name}</b>
|
||||
</span>
|
||||
<span style="color: lightgrey;">
|
||||
v1.3
|
||||
v1.4
|
||||
</span>
|
||||
</footer>
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ export default class SettingsPage extends Page<{ state: any }, { vault: string }
|
||||
</header>
|
||||
<div class="container">
|
||||
<button class="btn" onClick={() => Theme.toggle()}>Toggle Dark Mode</button>
|
||||
<button class="btn" onClick={() => window.navigator.serviceWorker.controller.postMessage("clear_cache")}>Clear cache</button>
|
||||
</div>
|
||||
</div >;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user