From 1df1776423e7bc48a4c184b851981d6361c463ea Mon Sep 17 00:00:00 2001
From: 135e2 <135e2@135e2.tk>
Date: Tue, 9 Aug 2022 01:02:13 +0800
Subject: feat(SettingsPage): implement debug options
---
src/components/EditPage.vue | 3 ---
src/components/SettingsPage.vue | 21 +++++++++++++++++++++
2 files changed, 21 insertions(+), 3 deletions(-)
(limited to 'src/components')
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 @@
+
+
+
+ Show LocalStorage Content
+ Clear LocalStorage
+ Clear Output
+
+
+
Card
@@ -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`;
+ },
},
};
--
cgit v1.2.3