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" lightThemes: "Light themes"
darkThemes: "Dark themes" darkThemes: "Dark themes"
syncDeviceDarkMode: "Sync Dark Mode with your device settings" syncDeviceDarkMode: "Sync Dark Mode with your device settings"
rickRollDetect: "Rick Roll Detection"
drive: "Drive" drive: "Drive"
fileName: "Filename" fileName: "Filename"
selectFile: "Select a file" selectFile: "Select a file"

View file

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