mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-09 11:41:30 -07:00
init
This commit is contained in:
parent
40d4b7dc80
commit
f9fafaab55
2 changed files with 15 additions and 0 deletions
|
@ -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"
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue