mirror of
https://iceshrimp.dev/iceshrimp/iceshrimp
synced 2024-11-28 06:48:12 +09:00
Only show mfm warning the first time + fix sparkle
This commit is contained in:
parent
5be27bf293
commit
023ce7bb96
@ -187,11 +187,15 @@ let disableMfm = $ref(hasMfm && defaultStore.state.animatedMfm);
|
||||
|
||||
async function toggleMfm() {
|
||||
if (disableMfm) {
|
||||
const { canceled } = await os.confirm({
|
||||
type: "warning",
|
||||
text: i18n.ts._mfm.warn,
|
||||
});
|
||||
if (canceled) return;
|
||||
if (!defaultStore.state.animatedMfmWarnShown) {
|
||||
const { canceled } = await os.confirm({
|
||||
type: "warning",
|
||||
text: i18n.ts._mfm.warn,
|
||||
});
|
||||
if (canceled) return;
|
||||
|
||||
defaultStore.set("animatedMfmWarnShown", true);
|
||||
}
|
||||
|
||||
disableMfm = false;
|
||||
} else {
|
||||
|
@ -151,7 +151,7 @@ export default defineComponent({
|
||||
break;
|
||||
}
|
||||
case "sparkle": {
|
||||
if (!(defaultStore.state.animatedMfm || reducedMotion())) {
|
||||
if (reducedMotion()) {
|
||||
return genEl(token.children);
|
||||
}
|
||||
return h(MkSparkle, {}, genEl(token.children));
|
||||
|
@ -158,6 +158,10 @@ export const defaultStore = markRaw(
|
||||
where: "device",
|
||||
default: true,
|
||||
},
|
||||
animatedMfmWarnShown: {
|
||||
where: "device",
|
||||
default: false,
|
||||
},
|
||||
loadRawImages: {
|
||||
where: "device",
|
||||
default: false,
|
||||
|
Loading…
Reference in New Issue
Block a user