generated from Seekra/repository-template
Compare commits
11
Commits
6fa9206258
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dde56c42ae
|
||
|
|
15697144b1
|
||
|
|
396c025ec4
|
||
|
|
30f6b82416
|
||
|
|
7b09cd74cb
|
||
|
|
fab7d7e901
|
||
|
|
04c148a3b1
|
||
|
|
ff6ab7a78c
|
||
|
|
294fdab550
|
||
|
|
26eec92f42
|
||
|
|
a01abe67e1
|
+2
-1
@@ -26,7 +26,7 @@ import { useRoute } from 'vue-router';
|
|||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|
||||||
const { getColorScheme, updateColorScheme } = useColorScheme();
|
const { getColorScheme, updateColorScheme } = useColorScheme();
|
||||||
const colorScheme = ref(getColorScheme());
|
const colorScheme = ref(null);
|
||||||
provide('colorScheme', colorScheme);
|
provide('colorScheme', colorScheme);
|
||||||
watch(colorScheme, (newValue) => {
|
watch(colorScheme, (newValue) => {
|
||||||
updateColorScheme(newValue);
|
updateColorScheme(newValue);
|
||||||
@@ -46,6 +46,7 @@ watch(colorScheme, (newValue) => {
|
|||||||
document.body.classList.remove('color-scheme-auto');
|
document.body.classList.remove('color-scheme-auto');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
colorScheme.value = getColorScheme();
|
||||||
|
|
||||||
watchEffect(() => updatePageTitle(route));
|
watchEffect(() => updatePageTitle(route));
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -40,5 +40,15 @@ export const useSettings = function useSettings () {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
return { getSetting };
|
/**
|
||||||
|
* Sets the value of a specific setting.
|
||||||
|
* @param {string[]} key - The setting key.
|
||||||
|
* @param value - The new value for the setting.
|
||||||
|
*/
|
||||||
|
const setSetting = function setSetting (key, value) {
|
||||||
|
const settingsStore = useSettingsStore();
|
||||||
|
settingsStore.set(key.join('.'), value);
|
||||||
|
};
|
||||||
|
|
||||||
|
return { getSetting, setSetting };
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user