allow MFM authoring

This commit is contained in:
FloatingGhost 2022-06-14 15:57:02 +01:00
parent 8f1aaf617a
commit ed42c476fb
14 changed files with 464 additions and 15 deletions

View file

@ -1,5 +1,6 @@
import fileType from 'src/services/file_type/file_type.service'
import RichContent from 'src/components/rich_content/rich_content.jsx'
import MFMContent from 'src/components/mfm_content/mfm_content.jsx'
import { mapGetters } from 'vuex'
import { library } from '@fortawesome/fontawesome-svg-core'
import {
@ -35,9 +36,11 @@ const StatusContent = {
'toggleShowingLongSubject'
],
data () {
const { renderMisskeyMarkdown } = this.$store.getters.mergedConfig
return {
postLength: this.status.text.length,
parseReadyDone: false
parseReadyDone: false,
renderMisskeyMarkdown
}
},
computed: {
@ -81,7 +84,8 @@ const StatusContent = {
...mapGetters(['mergedConfig'])
},
components: {
RichContent
RichContent,
MFMContent
},
mounted () {
this.status.attentions && this.status.attentions.forEach(attn => {

View file

@ -62,6 +62,7 @@
display: flex;
flex-direction: column;
flex-wrap: nowrap;
overflow: hidden;
&.-tall-status {
position: relative;

View file

@ -41,18 +41,26 @@
>
{{ $t("general.show_more") }}
</button>
<RichContent
<div
v-if="!hideSubjectStatus && !(singleLine && status.summary_raw_html)"
:class="{ '-single-line': singleLine }"
class="text media-body"
:html="status.raw_html"
:emoji="status.emojis"
:handle-links="true"
:greentext="mergedConfig.greentext"
:attentions="status.attentions"
@parseReady="onParseReady"
/>
>
<MFMContent
v-if="renderMisskeyMarkdown && status.mfm_content"
class="RichContent text media-body"
:status="status"
/>
<RichContent
v-else
:class="{ '-single-line': singleLine }"
class="text media-body"
:html="status.raw_html"
:emoji="status.emojis"
:handle-links="true"
:greentext="mergedConfig.greentext"
:attentions="status.attentions"
@parseReady="onParseReady"
/>
</div>
<button
v-show="hideSubjectStatus"
class="button-unstyled -link cw-status-hider"