This commit is contained in:
syuilo 2024-08-26 15:32:39 +09:00
parent 048aa6f306
commit e90bdae545
2 changed files with 4 additions and 6 deletions

View File

@ -44,7 +44,6 @@ SPDX-License-Identifier: AGPL-3.0-only
<EmAvatar :class="$style.avatar" :user="appearNote.user"/> <EmAvatar :class="$style.avatar" :user="appearNote.user"/>
<div :class="$style.main"> <div :class="$style.main">
<EmNoteHeader :note="appearNote" :mini="true"/> <EmNoteHeader :note="appearNote" :mini="true"/>
<EmInstanceTicker v-if="appearNote.user.instance" :instance="appearNote.user.instance"/>
<div style="container-type: inline-size;"> <div style="container-type: inline-size;">
<p v-if="appearNote.cw != null" :class="$style.cw"> <p v-if="appearNote.cw != null" :class="$style.cw">
<Mfm v-if="appearNote.cw != ''" style="margin-right: 8px;" :text="appearNote.cw" :author="appearNote.user" :nyaize="'respect'"/> <Mfm v-if="appearNote.cw != ''" style="margin-right: 8px;" :text="appearNote.cw" :author="appearNote.user" :nyaize="'respect'"/>
@ -125,7 +124,6 @@ import EmReactionsViewer from '@/components/EmReactionsViewer.vue';
import EmMediaList from '@/components/EmMediaList.vue'; import EmMediaList from '@/components/EmMediaList.vue';
import EmCwButton from '@/components/EmCwButton.vue'; import EmCwButton from '@/components/EmCwButton.vue';
import EmPoll from '@/components/EmPoll.vue'; import EmPoll from '@/components/EmPoll.vue';
import EmInstanceTicker from '@/components/EmInstanceTicker.vue';
import { pleaseLogin, type OpenOnRemoteOptions } from '@/scripts/please-login.js'; import { pleaseLogin, type OpenOnRemoteOptions } from '@/scripts/please-login.js';
import { userPage } from '@/utils.js'; import { userPage } from '@/utils.js';
import { extractUrlFromMfm } from '@/scripts/extract-url-from-mfm.js'; import { extractUrlFromMfm } from '@/scripts/extract-url-from-mfm.js';
@ -135,7 +133,10 @@ import { getNoteSummary } from '@/scripts/get-note-summary.js';
import { shouldCollapsed } from '@/scripts/collapsed.js'; import { shouldCollapsed } from '@/scripts/collapsed.js';
import { host } from '@/config.js'; import { host } from '@/config.js';
import { url } from '@/config.js'; import { url } from '@/config.js';
import { getAppearNote } from '@/scripts/get-appear-note.js';
function getAppearNote(note: Misskey.entities.Note) {
return Misskey.note.isPureRenote(note) ? note.renote : note;
}
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
note: Misskey.entities.Note; note: Misskey.entities.Note;

View File

@ -54,7 +54,6 @@ SPDX-License-Identifier: AGPL-3.0-only
</a> </a>
</div> </div>
</div> </div>
<EmInstanceTicker v-if="showTicker" :instance="appearNote.user.instance"/>
</div> </div>
</header> </header>
<div :class="[$style.noteContent, { [$style.contentCollapsed]: collapsed }]"> <div :class="[$style.noteContent, { [$style.contentCollapsed]: collapsed }]">
@ -135,7 +134,6 @@ import EmNoteSimple from '@/components/EmNoteSimple.vue';
import EmReactionsViewer from '@/components/EmReactionsViewer.vue'; import EmReactionsViewer from '@/components/EmReactionsViewer.vue';
import EmCwButton from '@/components/EmCwButton.vue'; import EmCwButton from '@/components/EmCwButton.vue';
import EmPoll from '@/components/EmPoll.vue'; import EmPoll from '@/components/EmPoll.vue';
import EmInstanceTicker from '@/components/EmInstanceTicker.vue';
import EmA from '@/components/EmA.vue'; import EmA from '@/components/EmA.vue';
import EmAvatar from '@/components/EmAvatar.vue'; import EmAvatar from '@/components/EmAvatar.vue';
import EmTime from '@/components/EmTime.vue'; import EmTime from '@/components/EmTime.vue';
@ -169,7 +167,6 @@ const isDeleted = ref(false);
const parsed = appearNote.value.text ? mfm.parse(appearNote.value.text) : null; const parsed = appearNote.value.text ? mfm.parse(appearNote.value.text) : null;
const isLong = shouldCollapsed(appearNote.value, []); const isLong = shouldCollapsed(appearNote.value, []);
const collapsed = ref(appearNote.value.cw == null && isLong); const collapsed = ref(appearNote.value.cw == null && isLong);
const showTicker = appearNote.value.user.instance != null;
</script> </script>
<style lang="scss" module> <style lang="scss" module>