merge: add fade and followmouse to list of animated mfm tags (!551)
View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/551 Approved-by: dakkar <dakkar@thenautilus.net> Approved-by: Marie <marie@kaifa.ch>
This commit is contained in:
commit
3545d4f67b
|
@ -235,8 +235,7 @@ export default function (props: MfmProps, { emit }: { emit: SetupContext<MfmEven
|
||||||
return h(MkSparkle, {}, genEl(token.children, scale));
|
return h(MkSparkle, {}, genEl(token.children, scale));
|
||||||
}
|
}
|
||||||
case 'fade': {
|
case 'fade': {
|
||||||
// Dont run with reduced motion on
|
if (!useAnim) {
|
||||||
if (!defaultStore.state.animation) {
|
|
||||||
style = '';
|
style = '';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,7 @@ export function checkAnimationFromMfm(nodes: mfm.MfmNode[]): boolean {
|
||||||
node.props.name === 'bounce' ||
|
node.props.name === 'bounce' ||
|
||||||
node.props.name === 'rainbow' ||
|
node.props.name === 'rainbow' ||
|
||||||
node.props.name === 'sparkle' ||
|
node.props.name === 'sparkle' ||
|
||||||
|
node.props.name === 'fade' ||
|
||||||
node.props.name === 'followmouse') {
|
node.props.name === 'followmouse') {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue