mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-25 03:17:38 -07:00
Unify useBlurEffect and useBlurEffectForModal
This commit is contained in:
parent
2b72cb0b09
commit
6fc8415b00
4 changed files with 6 additions and 22 deletions
|
@ -363,17 +363,6 @@ function checkForSplash() {
|
|||
}
|
||||
});
|
||||
|
||||
watch(
|
||||
defaultStore.reactiveState.useBlurEffectForModal,
|
||||
(v) => {
|
||||
document.documentElement.style.setProperty(
|
||||
"--modalBgFilter",
|
||||
v ? "blur(4px)" : "none",
|
||||
);
|
||||
},
|
||||
{ immediate: true },
|
||||
);
|
||||
|
||||
watch(
|
||||
defaultStore.reactiveState.useBlurEffect,
|
||||
(v) => {
|
||||
|
@ -382,6 +371,12 @@ function checkForSplash() {
|
|||
} else {
|
||||
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");
|
||||
applyTheme(theme);
|
||||
},
|
||||
|
|
|
@ -159,9 +159,6 @@
|
|||
<FormSwitch v-model="useBlurEffect" class="_formBlock">{{
|
||||
i18n.ts.useBlurEffect
|
||||
}}</FormSwitch>
|
||||
<FormSwitch v-model="useBlurEffectForModal" class="_formBlock">{{
|
||||
i18n.ts.useBlurEffectForModal
|
||||
}}</FormSwitch>
|
||||
<FormSwitch
|
||||
v-model="showGapBetweenNotesInTimeline"
|
||||
class="_formBlock"
|
||||
|
@ -303,9 +300,6 @@ const reduceAnimation = computed(
|
|||
(v) => !v,
|
||||
),
|
||||
);
|
||||
const useBlurEffectForModal = computed(
|
||||
defaultStore.makeGetterSetter("useBlurEffectForModal"),
|
||||
);
|
||||
const useBlurEffect = computed(defaultStore.makeGetterSetter("useBlurEffect"));
|
||||
const showGapBetweenNotesInTimeline = computed(
|
||||
defaultStore.makeGetterSetter("showGapBetweenNotesInTimeline"),
|
||||
|
|
|
@ -92,7 +92,6 @@ const defaultStoreSaveKeys: (keyof (typeof defaultStore)["state"])[] = [
|
|||
"enterSendsMessage",
|
||||
"useOsNativeEmojis",
|
||||
"disableDrawer",
|
||||
"useBlurEffectForModal",
|
||||
"useBlurEffect",
|
||||
"showFixedPostForm",
|
||||
"enableInfiniteScroll",
|
||||
|
|
|
@ -202,10 +202,6 @@ export const defaultStore = markRaw(
|
|||
where: "device",
|
||||
default: false,
|
||||
},
|
||||
useBlurEffectForModal: {
|
||||
where: "device",
|
||||
default: true,
|
||||
},
|
||||
useBlurEffect: {
|
||||
where: "device",
|
||||
default: true,
|
||||
|
|
Loading…
Reference in a new issue