From 1aad1ef14127379b8d0a8d3d72acd7bddbe08496 Mon Sep 17 00:00:00 2001 From: Fine Date: Mon, 12 May 2025 10:36:20 +0800 Subject: [PATCH] add switch --- src/layout/components/NavBar.vue | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/layout/components/NavBar.vue b/src/layout/components/NavBar.vue index 322abcba..3b321246 100644 --- a/src/layout/components/NavBar.vue +++ b/src/layout/components/NavBar.vue @@ -48,6 +48,15 @@ limitations under the License. --> @input="changeTimeRange" /> UTC{{ appStore.utcHour >= 0 ? "+" : "" }}{{ `${appStore.utcHour}:${appStore.utcMin}` }} + + + const pageTitle = ref(""); const theme = ref(true); const themeSwitchRef = ref(); + const dataMode = ref(false); const savedTheme = window.localStorage.getItem("theme-is-dark"); if (savedTheme === "false") { @@ -126,6 +136,14 @@ limitations under the License. --> window.localStorage.setItem("theme-is-dark", String(theme.value)); } + function changeDataMode() { + if (dataMode.value) { + // const gap = appStore.duration.end.getTime() - appStore.duration.start.getTime(); + // const dates: Date[] = [new Date(new Date().getTime() - gap), new Date()]; + // appStore.setDuration(timeFormat(dates)); + } + } + function handleChangeTheme() { const x = themeSwitchRef.value?.offsetLeft ?? 0; const y = themeSwitchRef.value?.offsetTop ?? 0;