New option: Pause MFM until status hover
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful

This commit is contained in:
eris 2022-08-06 20:02:05 +00:00
parent e47d3a6d13
commit 75e18ecfcf
7 changed files with 26 additions and 1 deletions

View file

@ -103,6 +103,18 @@
<BooleanSetting path="renderMisskeyMarkdown">
{{ $t('settings.render_mfm') }}
</BooleanSetting>
<ul
class="setting-list suboptions"
>
<li>
<BooleanSetting
path="mfmOnHover"
:disabled="!renderMisskeyMarkdown"
>
{{ $t('settings.render_mfm_on_hover') }}
</BooleanSetting>
</li>
</ul>
</li>
<li>
<BooleanSetting

View file

@ -204,3 +204,4 @@
}
}
}

View file

@ -100,6 +100,9 @@ const StatusContent = {
maxThumbnails () {
return this.mergedConfig.maxThumbnails
},
mfmOnHover () {
return this.mergedConfig.mfmOnHover
},
...mapGetters(['mergedConfig']),
...mapState({
currentUser: state => state.users.currentUser

View file

@ -1,7 +1,7 @@
<template>
<div
class="StatusContent"
:class="{ '-compact': compact }"
:class="{ '-compact': compact, 'mfm-hover': mfmOnHover }"
>
<slot name="header" />
<StatusBody
@ -75,5 +75,11 @@
height: 50px;
}
}
&.mfm-hover:not(:hover) {
.mfm {
animation: none;
}
}
}
</style>

View file

@ -577,6 +577,7 @@
"remove_alias": "Remove this alias",
"remove_backup": "Remove",
"render_mfm": "Render Misskey Markdown",
"render_mfm_on_hover": "Pause MFM animations until status hover",
"replies_in_timeline": "Replies in timeline",
"reply_visibility_all": "Show all replies",
"reply_visibility_following": "Only show replies directed at me or users I'm following",

View file

@ -96,6 +96,7 @@ export const defaultState = {
sensitiveByDefault: undefined, // instance default
sensitiveIfSubject: undefined,
renderMisskeyMarkdown: undefined,
mfmOnHover: undefined, // instance default
conversationDisplay: undefined, // instance default
conversationTreeAdvanced: undefined, // instance default
conversationOtherRepliesButton: undefined, // instance default

View file

@ -57,6 +57,7 @@ const defaultState = {
sensitiveByDefault: false,
sensitiveIfSubject: true,
renderMisskeyMarkdown: false,
mfmOnHover: false,
conversationDisplay: 'linear',
conversationTreeAdvanced: false,
conversationOtherRepliesButton: 'below',