aboutsummaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
author135e2 <[email protected]>2022-08-09 01:02:13 +0800
committer135e2 <[email protected]>2022-08-09 01:02:13 +0800
commit1df1776423e7bc48a4c184b851981d6361c463ea (patch)
tree05a1ed44ee68c713bfa08f46aebe19b4ea184136 /src/components
parentffd55641317ebd6344e92eb8a3204981846b5e05 (diff)
downloadotonashi-1df1776423e7bc48a4c184b851981d6361c463ea.tar.gz
otonashi-1df1776423e7bc48a4c184b851981d6361c463ea.tar.bz2
otonashi-1df1776423e7bc48a4c184b851981d6361c463ea.zip
feat(SettingsPage): implement debug options
Diffstat (limited to 'src/components')
-rw-r--r--src/components/EditPage.vue3
-rw-r--r--src/components/SettingsPage.vue21
2 files changed, 21 insertions, 3 deletions
diff --git a/src/components/EditPage.vue b/src/components/EditPage.vue
index b4c351a..71d1e6b 100644
--- a/src/components/EditPage.vue
+++ b/src/components/EditPage.vue
@@ -169,9 +169,6 @@ export default {
writeToLS() {
localStorage.setItem("LSData", JSON.stringify(this.LSData));
},
- clearLS() {
- localStorage.clear();
- },
},
watch: {
diff --git a/src/components/SettingsPage.vue b/src/components/SettingsPage.vue
index b25a377..9bea340 100644
--- a/src/components/SettingsPage.vue
+++ b/src/components/SettingsPage.vue
@@ -41,6 +41,17 @@
</v-card-text>
</v-window-item>
<v-window-item :value="3">
+ <v-textarea height="300" no-resize readonly :value="debugLog">
+ </v-textarea>
+ <v-card-actions class="d-flex justify-space-around">
+ <v-btn variant="outlined" @click="showLSDebug"
+ >Show LocalStorage Content</v-btn
+ >
+ <v-btn variant="outlined" @click="clearLS">Clear LocalStorage</v-btn>
+ <v-btn variant="outlined" @click="debugLog = ''">Clear Output</v-btn>
+ </v-card-actions>
+ </v-window-item>
+ <v-window-item :value="4">
<v-card-text>
<span class="text-h2">Card</span>
</v-card-text>
@@ -62,6 +73,8 @@ export default {
return "MainPage Settings";
case 2:
return "Background Settings";
+ case 3:
+ return "Developer Settings";
default:
return "About Otonashi";
}
@@ -96,6 +109,7 @@ export default {
backgroundImageURL: "",
titleSize: 35,
contentSize: "text-h5",
+ debugLog: "",
location: 1,
}),
@@ -112,6 +126,13 @@ export default {
JSON.stringify(this.backgroundImageURL)
);
},
+ clearLS() {
+ localStorage.clear();
+ this.debugLog += "LocalStorage cleared.\n";
+ },
+ showLSDebug() {
+ this.debugLog += `LS in JSON format: ${JSON.stringify(localStorage)}\n`;
+ },
},
};
</script>