mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-22 08:53:48 +01:00
Unify useBlurEffect and useBlurEffectForModal
This commit is contained in:
parent
2b72cb0b09
commit
6fc8415b00
@ -363,17 +363,6 @@ function checkForSplash() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
watch(
|
|
||||||
defaultStore.reactiveState.useBlurEffectForModal,
|
|
||||||
(v) => {
|
|
||||||
document.documentElement.style.setProperty(
|
|
||||||
"--modalBgFilter",
|
|
||||||
v ? "blur(4px)" : "none",
|
|
||||||
);
|
|
||||||
},
|
|
||||||
{ immediate: true },
|
|
||||||
);
|
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
defaultStore.reactiveState.useBlurEffect,
|
defaultStore.reactiveState.useBlurEffect,
|
||||||
(v) => {
|
(v) => {
|
||||||
@ -382,6 +371,12 @@ function checkForSplash() {
|
|||||||
} else {
|
} else {
|
||||||
document.documentElement.style.setProperty("--blur", "none");
|
document.documentElement.style.setProperty("--blur", "none");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
document.documentElement.style.setProperty(
|
||||||
|
"--modalBgFilter",
|
||||||
|
v ? "blur(4px)" : "none",
|
||||||
|
);
|
||||||
|
|
||||||
const theme = defaultStore.state.darkMode ? ColdDeviceStorage.get("darkTheme") : ColdDeviceStorage.get("lightTheme");
|
const theme = defaultStore.state.darkMode ? ColdDeviceStorage.get("darkTheme") : ColdDeviceStorage.get("lightTheme");
|
||||||
applyTheme(theme);
|
applyTheme(theme);
|
||||||
},
|
},
|
||||||
|
@ -159,9 +159,6 @@
|
|||||||
<FormSwitch v-model="useBlurEffect" class="_formBlock">{{
|
<FormSwitch v-model="useBlurEffect" class="_formBlock">{{
|
||||||
i18n.ts.useBlurEffect
|
i18n.ts.useBlurEffect
|
||||||
}}</FormSwitch>
|
}}</FormSwitch>
|
||||||
<FormSwitch v-model="useBlurEffectForModal" class="_formBlock">{{
|
|
||||||
i18n.ts.useBlurEffectForModal
|
|
||||||
}}</FormSwitch>
|
|
||||||
<FormSwitch
|
<FormSwitch
|
||||||
v-model="showGapBetweenNotesInTimeline"
|
v-model="showGapBetweenNotesInTimeline"
|
||||||
class="_formBlock"
|
class="_formBlock"
|
||||||
@ -303,9 +300,6 @@ const reduceAnimation = computed(
|
|||||||
(v) => !v,
|
(v) => !v,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
const useBlurEffectForModal = computed(
|
|
||||||
defaultStore.makeGetterSetter("useBlurEffectForModal"),
|
|
||||||
);
|
|
||||||
const useBlurEffect = computed(defaultStore.makeGetterSetter("useBlurEffect"));
|
const useBlurEffect = computed(defaultStore.makeGetterSetter("useBlurEffect"));
|
||||||
const showGapBetweenNotesInTimeline = computed(
|
const showGapBetweenNotesInTimeline = computed(
|
||||||
defaultStore.makeGetterSetter("showGapBetweenNotesInTimeline"),
|
defaultStore.makeGetterSetter("showGapBetweenNotesInTimeline"),
|
||||||
|
@ -92,7 +92,6 @@ const defaultStoreSaveKeys: (keyof (typeof defaultStore)["state"])[] = [
|
|||||||
"enterSendsMessage",
|
"enterSendsMessage",
|
||||||
"useOsNativeEmojis",
|
"useOsNativeEmojis",
|
||||||
"disableDrawer",
|
"disableDrawer",
|
||||||
"useBlurEffectForModal",
|
|
||||||
"useBlurEffect",
|
"useBlurEffect",
|
||||||
"showFixedPostForm",
|
"showFixedPostForm",
|
||||||
"enableInfiniteScroll",
|
"enableInfiniteScroll",
|
||||||
|
@ -202,10 +202,6 @@ export const defaultStore = markRaw(
|
|||||||
where: "device",
|
where: "device",
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
useBlurEffectForModal: {
|
|
||||||
where: "device",
|
|
||||||
default: true,
|
|
||||||
},
|
|
||||||
useBlurEffect: {
|
useBlurEffect: {
|
||||||
where: "device",
|
where: "device",
|
||||||
default: true,
|
default: true,
|
||||||
|
Loading…
Reference in New Issue
Block a user