Add more to subnotecontent if detailed
This commit is contained in:
parent
da648e1517
commit
650a62953d
|
@ -13,7 +13,7 @@
|
||||||
<XCwButton v-model="showContent" :note="note"/>
|
<XCwButton v-model="showContent" :note="note"/>
|
||||||
</p>
|
</p>
|
||||||
<div v-show="note.cw == null || showContent" class="content" @click="router.push(notePage(note))">
|
<div v-show="note.cw == null || showContent" class="content" @click="router.push(notePage(note))">
|
||||||
<MkSubNoteContent class="text" :note="note"/>
|
<MkSubNoteContent class="text" :note="note" :detailed="true"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<MkNoteFooter :note="note" :conversation="conversation"></MkNoteFooter>
|
<MkNoteFooter :note="note" :conversation="conversation"></MkNoteFooter>
|
||||||
|
|
|
@ -5,7 +5,12 @@
|
||||||
<MkA v-if="note.replyId" class="reply" :to="`/notes/${note.replyId}`"><i class="ph-arrow-bend-up-left-bold ph-lg"></i></MkA>
|
<MkA v-if="note.replyId" class="reply" :to="`/notes/${note.replyId}`"><i class="ph-arrow-bend-up-left-bold ph-lg"></i></MkA>
|
||||||
<Mfm v-if="note.text" :text="note.text" :author="note.user" :i="$i" :custom-emojis="note.emojis"/>
|
<Mfm v-if="note.text" :text="note.text" :author="note.user" :i="$i" :custom-emojis="note.emojis"/>
|
||||||
<MkA v-if="note.renoteId" class="rp" :to="`/notes/${note.renoteId}`">{{ i18n.ts.quoteAttached }}: ...</MkA>
|
<MkA v-if="note.renoteId" class="rp" :to="`/notes/${note.renoteId}`">{{ i18n.ts.quoteAttached }}: ...</MkA>
|
||||||
<MkUrlPreview v-for="url in urls" :key="url" :url="url" :compact="true" :detail="false" class="url-preview"/>
|
<template v-if="detailed">
|
||||||
|
<!-- <div v-if="note.renoteId" class="renote">
|
||||||
|
<XNoteSimple :note="note.renote"/>
|
||||||
|
</div> -->
|
||||||
|
<MkUrlPreview v-for="url in urls" :key="url" :url="url" :compact="true" :detail="false" class="url-preview"/>
|
||||||
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="note.files.length > 0">
|
<div v-if="note.files.length > 0">
|
||||||
<XMediaList :media-list="note.files"/>
|
<XMediaList :media-list="note.files"/>
|
||||||
|
@ -27,6 +32,7 @@
|
||||||
import { } from 'vue';
|
import { } from 'vue';
|
||||||
import * as misskey from 'calckey-js';
|
import * as misskey from 'calckey-js';
|
||||||
import * as mfm from 'mfm-js';
|
import * as mfm from 'mfm-js';
|
||||||
|
import XNoteSimple from '@/components/MkNoteSimple.vue';
|
||||||
import XMediaList from '@/components/MkMediaList.vue';
|
import XMediaList from '@/components/MkMediaList.vue';
|
||||||
import XPoll from '@/components/MkPoll.vue';
|
import XPoll from '@/components/MkPoll.vue';
|
||||||
import MkUrlPreview from '@/components/MkUrlPreview.vue';
|
import MkUrlPreview from '@/components/MkUrlPreview.vue';
|
||||||
|
@ -35,9 +41,9 @@ import { i18n } from '@/i18n';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
note: misskey.entities.Note;
|
note: misskey.entities.Note;
|
||||||
|
detailed?: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
|
||||||
const isLong = (
|
const isLong = (
|
||||||
props.note.cw == null && props.note.text != null && (
|
props.note.cw == null && props.note.text != null && (
|
||||||
(props.note.text.split('\n').length > 9) ||
|
(props.note.text.split('\n').length > 9) ||
|
||||||
|
@ -46,7 +52,6 @@ const isLong = (
|
||||||
);
|
);
|
||||||
const collapsed = $ref(props.note.cw == null && isLong);
|
const collapsed = $ref(props.note.cw == null && isLong);
|
||||||
const urls = props.note.text ? extractUrlFromMfm(mfm.parse(props.note.text)) : null;
|
const urls = props.note.text ? extractUrlFromMfm(mfm.parse(props.note.text)) : null;
|
||||||
console.log(props.note.text);
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue