From 1762d1a7a49232bb3d886055632fa9bef58e0d2c Mon Sep 17 00:00:00 2001 From: Will Freeman Date: Mon, 21 Jul 2025 13:15:23 -0600 Subject: [PATCH] show a snackbar when user is on the maps page and switches to dark mode --- webapp/src/App.vue | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/webapp/src/App.vue b/webapp/src/App.vue index 87a2d09..1eb10e9 100644 --- a/webapp/src/App.vue +++ b/webapp/src/App.vue @@ -5,6 +5,7 @@ import { useTheme } from 'vuetify'; const theme = useTheme(); const router = useRouter(); +const snackbar = ref({ show: false, text: '' }); const isDark = computed(() => theme.name.value === 'dark'); const isFullscreen = computed(() => router.currentRoute.value?.query.fullscreen === 'true'); @@ -12,6 +13,13 @@ function toggleTheme() { const newTheme = theme.global.name.value === 'dark' ? 'light' : 'dark'; theme.global.name.value = newTheme; localStorage.setItem('theme', newTheme); + + if (newTheme === 'dark' && router.currentRoute.value.path === '/map') { + snackbar.value = { + show: true, + text: "Dark maps aren't available yet :(" + }; + } } onMounted(() => { @@ -127,6 +135,24 @@ watch(() => theme.global.name.value, (newTheme) => { + + + mdi-theme-light-dark + {{ snackbar.text }} + +