From 7cfeaf618c170a50a312f27cee82752aef735267 Mon Sep 17 00:00:00 2001 From: chuzhongzai Date: Thu, 29 Jun 2023 14:17:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=A2=84=E8=A7=88=E5=88=86?= =?UTF-8?q?=E9=A1=B5=EF=BC=8C=E5=8F=AF=E4=BB=A5=E8=AE=BE=E7=BD=AE=E6=AF=8F?= =?UTF-8?q?=E9=A1=B5=E6=9C=89=E5=A4=9A=E5=B0=91=E5=BC=A0=E5=9B=BE=E7=89=87?= =?UTF-8?q?=EF=BC=9B=E5=B0=86=E9=A2=84=E8=A7=88=E6=8A=BD=E5=8F=96=E4=B8=BA?= =?UTF-8?q?=E5=8D=95=E7=8B=AC=E4=B8=80=E4=B8=AA=E7=BB=84=E4=BB=B6=EF=BC=9B?= =?UTF-8?q?=EF=BC=88=E5=90=8C=E6=AD=A5=E6=9B=B4=E6=96=B0=EF=BC=89=E5=90=91?= =?UTF-8?q?index.html=E6=B7=BB=E5=8A=A0meta=E4=BD=BF=E5=BE=97=E5=8F=AF?= =?UTF-8?q?=E4=BB=A5=E6=B7=BB=E5=8A=A0=E5=88=B0ios=E4=B8=BB=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 1 + src/components/DashBoard.vue | 43 ++++++++++++------ src/components/OnlineReader.vue | 79 +++++++++++++++++++++++++++++++++ src/components/Side.vue | 12 +---- src/store/index.js | 1 + 5 files changed, 112 insertions(+), 24 deletions(-) create mode 100644 src/components/OnlineReader.vue diff --git a/index.html b/index.html index daf3a5b..5a8ce8a 100644 --- a/index.html +++ b/index.html @@ -5,6 +5,7 @@ Vite + Vue +
diff --git a/src/components/DashBoard.vue b/src/components/DashBoard.vue index cc38d70..1cb07d1 100644 --- a/src/components/DashBoard.vue +++ b/src/components/DashBoard.vue @@ -33,7 +33,7 @@ 里站搜索 修改授权码 删除本地授权码 - 夜间模式配置
+ 配置
夜间模式 夜间模式
@@ -135,17 +135,25 @@ - - 夜间模式跟随系统 -
- 自定义起始时间(精确到分) -
- - ~ - - + +
+ 夜间模式
+ 夜间模式跟随系统 +
+ 自定义起始时间(精确到分) +
+ + ~ + + +
+
+ 在线预览
+ 在线预览分页页数: + +
@@ -200,12 +208,13 @@ let tempAuthCode = ref("") let isQuerying = ref(false) let isViewingTag = ref(false) -let isConfigDarkMode = ref(false) +let isConfig = ref(false) let isDark = ref(false) let keyword = ref("furry yaoi") let galleries = ref([]) let queryPage = ref({}) let darkConfig = ref({}) +let lengthPerPage = ref(0) //查询相关 let type = ref("link") @@ -496,6 +505,10 @@ function showThumbnail(gallery){ onMounted(() => { const auth = localStorage.getItem("auth") adjustForStyle() + store.state.lengthPerPage = localStorage.getItem("lengthPerPage") + store.state.lengthPerPage = store.state.lengthPerPage === null ? 30: Number(store.state.lengthPerPage) + lengthPerPage.value = store.state.lengthPerPage + if(auth !== null){ store.dispatch("validate", auth) } @@ -576,7 +589,7 @@ function light(){ document.querySelector(".DashBoard").style.setProperty("background-color", "ghostwhite") document.querySelector(".app").style.setProperty("background-color", "#c6e2ff") } -function saveDarkConfig(){ +function saveConfig(){ if(darkConfig.value.customTime) { if(darkConfig.value.startTime === undefined || darkConfig.value.endTime === undefined){ ElMessage("请正确选择起始时间") @@ -584,8 +597,10 @@ function saveDarkConfig(){ } } + store.state.lengthPerPage = Number(lengthPerPage.value) + localStorage.setItem("lengthPerPage", lengthPerPage.value) localStorage.setItem("darkConfig", JSON.stringify(darkConfig.value)) - isConfigDarkMode.value = false + isConfig.value = false adjustForStyle() } diff --git a/src/components/OnlineReader.vue b/src/components/OnlineReader.vue new file mode 100644 index 0000000..4ee543c --- /dev/null +++ b/src/components/OnlineReader.vue @@ -0,0 +1,79 @@ + + + + + \ No newline at end of file diff --git a/src/components/Side.vue b/src/components/Side.vue index fd43c4b..fa12dfd 100644 --- a/src/components/Side.vue +++ b/src/components/Side.vue @@ -104,12 +104,7 @@
- - - - - +