Skip to content

Commit 5df1359

Browse files
committed
add force refresh button
1 parent 876b420 commit 5df1359

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/views/Settings.vue

+19
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,16 @@
233233
<video-list-filters />
234234
</v-card-text>
235235
</v-sheet>
236+
<v-col class="flex flex-col" style="display: flex">
237+
<v-btn
238+
color="red"
239+
class="mt-2 mb-2"
240+
style="margin: auto"
241+
@click="forceUninstall"
242+
>
243+
Force Refresh App
244+
</v-btn>
245+
</v-col>
236246
</v-col>
237247
</v-row>
238248
</v-container>
@@ -407,6 +417,15 @@ export default {
407417
});
408418
},
409419
methods: {
420+
forceUninstall() {
421+
navigator.serviceWorker.getRegistration().then((reg) => {
422+
if (reg) {
423+
reg.unregister().then(() => { window.location.reload(); });
424+
} else {
425+
window.location.reload();
426+
}
427+
});
428+
},
410429
goToSettings() {
411430
this.$emit("close");
412431
this.$router.push({ path: "/settings" });

0 commit comments

Comments
 (0)