This commit is contained in:
nelle 2024-07-11 03:35:48 -06:00
parent 40d4b7dc80
commit f9fafaab55
2 changed files with 15 additions and 0 deletions

View file

@ -322,6 +322,7 @@ dark: "Dark"
lightThemes: "Light themes"
darkThemes: "Dark themes"
syncDeviceDarkMode: "Sync Dark Mode with your device settings"
rickRollDetect: "Rick Roll Detection"
drive: "Drive"
fileName: "Filename"
selectFile: "Select a file"

View file

@ -142,6 +142,11 @@
>
</FormSection>
<FormSwitch v-model="syncDeviceDarkMode">{{
i18n.ts.rickRollDetect
}}
</FormSwitch>
<FormButton
v-if="wallpaper == null"
class="_formBlock"
@ -237,6 +242,9 @@ const darkMode = computed(defaultStore.makeGetterSetter("darkMode"));
const syncDeviceDarkMode = computed(
ColdDeviceStorage.makeGetterSetter("syncDeviceDarkMode"),
);
const rickRollDetect = computed(
ColdDeviceStorage.makeGetterSetter("rickRollDetect"),
);
const wallpaper = ref(localStorage.getItem("wallpaper"));
const themesCount = installedThemes.value.length;
@ -246,6 +254,12 @@ watch(syncDeviceDarkMode, () => {
}
});
watch(rickRollDetect, () => {
if (rickRollDetect.value) {
defaultStore.set("darkMode", isDeviceDarkmode());
}
});
watch(wallpaper, () => {
if (wallpaper.value == null) {
localStorage.removeItem("wallpaper");