Add jump syntax (#4007)

* Add jump syntax

* Fix typo: spin -> jump

* Fix typo
This commit is contained in:
Aya Morisawa
2019-01-27 19:12:45 +09:00
committed by syuilo
parent 5fac7c1718
commit 62d41023e1
5 changed files with 50 additions and 0 deletions

View File

@ -135,6 +135,17 @@ export default Vue.component('misskey-flavored-markdown', {
}, genEl(token.children));
}
case 'jump': {
motionCount++;
const isLong = sumTextsLength(token.children) > 5 || countNodesF(token.children) > 3;
const isMany = motionCount > 3;
return (createElement as any)('span', {
attrs: {
style: (this.$store.state.settings.disableAnimatedMfm || isLong || isMany) ? 'display: inline-block;' : 'display: inline-block; animation: jump 0.75s linear infinite;'
},
}, genEl(token.children));
}
case 'flip': {
return (createElement as any)('span', {
attrs: {