generated from Seekra/repository-template
Compare commits
4
Commits
main
..
6fa9206258
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6fa9206258
|
||
|
|
623b162cc6
|
||
|
|
098d54521d
|
||
|
|
c1986d9c2b
|
+1
-2
@@ -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(null);
|
const colorScheme = ref(getColorScheme());
|
||||||
provide('colorScheme', colorScheme);
|
provide('colorScheme', colorScheme);
|
||||||
watch(colorScheme, (newValue) => {
|
watch(colorScheme, (newValue) => {
|
||||||
updateColorScheme(newValue);
|
updateColorScheme(newValue);
|
||||||
@@ -46,7 +46,6 @@ 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,15 +40,5 @@ 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