mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 12:33:03 +00:00
add hidden shortcut to clear localStorage
- click the "general" button in the settings page 3 times -
This commit is contained in:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user