add hidden shortcut to clear localStorage

-
click the "general" button in the settings page 3 times
-
This commit is contained in:
geoffrey45
2022-09-11 04:04:42 +03:00
parent 96019a4c81
commit a6819a01d6
6 changed files with 27 additions and 12 deletions
+19 -1
View File
@@ -1,7 +1,11 @@
<template>
<div class="settingsnav">
<div class="buttongroup rounded-sm bg-primary">
<button v-for="(group, index) in settingGroups" :key="index">
<button
v-for="(group, index) in settingGroups"
:key="index"
@click="increment"
>
{{ group.title }}
</button>
</div>
@@ -10,6 +14,20 @@
<script setup lang="ts">
import settingGroups from "@/settings";
import { ref } from "vue";
import { useRouter } from "vue-router";
const router = useRouter();
const clicks = ref(0);
const increment = () => {
clicks.value++;
if (clicks.value === 3) {
localStorage.clear();
router.go(0);
}
};
</script>
<style lang="scss">