diff options
Diffstat (limited to 'src/client')
| -rw-r--r-- | src/client/app/animation.styl | 5 | ||||
| -rw-r--r-- | src/client/app/common/views/components/mfm.ts | 11 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/client/app/animation.styl b/src/client/app/animation.styl index a629165207..9cbd3ec6c8 100644 --- a/src/client/app/animation.styl +++ b/src/client/app/animation.styl @@ -26,3 +26,8 @@ transform: translateY(0); } } + +@keyframes spin { + 0% { transform: rotate(0deg); } + 100% { transform: rotate(360deg); } +} diff --git a/src/client/app/common/views/components/mfm.ts b/src/client/app/common/views/components/mfm.ts index 8ffa566666..f6f95deb24 100644 --- a/src/client/app/common/views/components/mfm.ts +++ b/src/client/app/common/views/components/mfm.ts @@ -124,6 +124,17 @@ export default Vue.component('misskey-flavored-markdown', { }, genEl(token.children)); } + case 'spin': { + 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: spin 1.5s linear infinite;' + }, + }, genEl(token.children)); + } + case 'url': { return [createElement(MkUrl, { key: Math.random(), |