mirror of
https://github.com/versia-pub/frontend.git
synced 2026-03-13 03:29:16 +01:00
feat: ✨ Wire up new preferences and remove old settings
Some checks failed
Mirror to Codeberg / Mirror (push) Failing after 0s
Some checks failed
Mirror to Codeberg / Mirror (push) Failing after 0s
This commit is contained in:
parent
412e49dfe2
commit
3ce71dd4df
32 changed files with 213 additions and 340 deletions
|
|
@ -19,10 +19,8 @@ import MobileNavbar from "~/components/navigation/mobile-navbar.vue";
|
|||
import Preferences from "~/components/preferences2/index.vue";
|
||||
import AppSidebar from "~/components/sidebars/sidebar.vue";
|
||||
import { SidebarProvider } from "~/components/ui/sidebar";
|
||||
import { SettingIds } from "~/settings";
|
||||
|
||||
const colorMode = useColorMode();
|
||||
const themeSetting = useSetting(SettingIds.Theme);
|
||||
const { n, d } = useMagicKeys();
|
||||
const activeElement = useActiveElement();
|
||||
const notUsingInput = computed(
|
||||
|
|
@ -44,10 +42,10 @@ watch([n, notUsingInput, d], async () => {
|
|||
// Swap theme from dark to light or vice versa
|
||||
if (colorMode.value === "dark") {
|
||||
colorMode.preference = "light";
|
||||
themeSetting.value.value = "light";
|
||||
preferences.color_theme.value = "light";
|
||||
} else {
|
||||
colorMode.preference = "dark";
|
||||
themeSetting.value.value = "dark";
|
||||
preferences.color_theme.value = "dark";
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue