diff options
| author | かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com> | 2025-02-26 15:51:28 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-26 06:51:28 +0000 |
| commit | 28b40691d5e26571d0cd52a98c60195534cc4407 (patch) | |
| tree | f418f5bd850dafd21352dd2e6cd6c13056a043d6 /packages/frontend/src | |
| parent | New Crowdin updates (#15421) (diff) | |
| download | misskey-28b40691d5e26571d0cd52a98c60195534cc4407.tar.gz misskey-28b40691d5e26571d0cd52a98c60195534cc4407.tar.bz2 misskey-28b40691d5e26571d0cd52a98c60195534cc4407.zip | |
fix(frontend): リノート経由でノートの詳細情報を見るとき、クリップ一覧がappearNoteのものになるように (#15417)
* fix(frontend): リノート経由でノートの詳細情報を見るとき、クリップ一覧がappearNoteのものになるように
* Update Changelog
---------
Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
Diffstat (limited to 'packages/frontend/src')
| -rw-r--r-- | packages/frontend/src/components/MkNoteDetailed.vue | 2 | ||||
| -rw-r--r-- | packages/frontend/src/components/MkRemoteCaution.vue | 4 | ||||
| -rw-r--r-- | packages/frontend/src/pages/note.vue | 8 |
3 files changed, 8 insertions, 6 deletions
diff --git a/packages/frontend/src/components/MkNoteDetailed.vue b/packages/frontend/src/components/MkNoteDetailed.vue index 835a663868..d5bd4ad133 100644 --- a/packages/frontend/src/components/MkNoteDetailed.vue +++ b/packages/frontend/src/components/MkNoteDetailed.vue @@ -257,7 +257,7 @@ import type { Keymap } from '@/scripts/hotkey.js'; const props = withDefaults(defineProps<{ note: Misskey.entities.Note; - initialTab: string; + initialTab?: string; }>(), { initialTab: 'replies', }); diff --git a/packages/frontend/src/components/MkRemoteCaution.vue b/packages/frontend/src/components/MkRemoteCaution.vue index a56a4b1671..2d3b7d107d 100644 --- a/packages/frontend/src/components/MkRemoteCaution.vue +++ b/packages/frontend/src/components/MkRemoteCaution.vue @@ -4,14 +4,14 @@ SPDX-License-Identifier: AGPL-3.0-only --> <template> -<div :class="$style.root"><i class="ti ti-alert-triangle" style="margin-right: 8px;"></i>{{ i18n.ts.remoteUserCaution }}<a :class="$style.link" :href="href" rel="nofollow noopener" target="_blank">{{ i18n.ts.showOnRemote }}</a></div> +<div :class="$style.root"><i class="ti ti-alert-triangle" style="margin-right: 8px;"></i>{{ i18n.ts.remoteUserCaution }}<a v-if="href" :class="$style.link" :href="href" rel="nofollow noopener" target="_blank">{{ i18n.ts.showOnRemote }}</a></div> </template> <script lang="ts" setup> import { i18n } from '@/i18n.js'; defineProps<{ - href: string; + href?: string; }>(); </script> diff --git a/packages/frontend/src/pages/note.vue b/packages/frontend/src/pages/note.vue index e6b4a0b222..0791c1343b 100644 --- a/packages/frontend/src/pages/note.vue +++ b/packages/frontend/src/pages/note.vue @@ -63,6 +63,7 @@ import { dateString } from '@/filters/date.js'; import MkClipPreview from '@/components/MkClipPreview.vue'; import { defaultStore } from '@/store.js'; import { pleaseLogin } from '@/scripts/please-login.js'; +import { getAppearNote } from '@/scripts/get-appear-note.js'; import { serverContext, assertServerContext } from '@/server-context.js'; import { $i } from '@/account.js'; @@ -132,10 +133,11 @@ function fetchNote() { noteId: props.noteId, }).then(res => { note.value = res; + const appearNote = getAppearNote(res); // 古いノートは被クリップ数をカウントしていないので、2023-10-01以前のものは強制的にnotes/clipsを叩く - if (note.value.clippedCount > 0 || new Date(note.value.createdAt).getTime() < new Date('2023-10-01').getTime()) { + if ((appearNote.clippedCount ?? 0) > 0 || new Date(appearNote.createdAt).getTime() < new Date('2023-10-01').getTime()) { misskeyApi('notes/clips', { - noteId: note.value.id, + noteId: appearNote.id, }).then((_clips) => { clips.value = _clips; }); @@ -170,7 +172,7 @@ definePageMetadata(() => ({ avatar: note.value.user, path: `/notes/${note.value.id}`, share: { - title: i18n.tsx.noteOf({ user: note.value.user.name }), + title: i18n.tsx.noteOf({ user: note.value.user.name ?? note.value.user.username }), text: note.value.text, }, } : {}, |