diff --git a/CHANGELOG.md b/CHANGELOG.md index eea57a30f58d597b73657a2bf30e831e81ef3050..34a2f88a9c7facb1887f4e6ef929a367c0eae80d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,10 @@ - ãƒãƒ¼ã‚«ãƒªã‚¼ãƒ¼ã‚·ãƒ§ãƒ³ã®æ›´æ–° ### Client +- ノート詳細ページを改修 + - èªã¿è¾¼ã¿æ™‚ã®ãƒ‘フォーマンスãŒå‘上ã—ã¾ã—㟠+ - リノート一覧ã€ãƒªã‚¢ã‚¯ã‚·ãƒ§ãƒ³ä¸€è¦§ãŒã‚¿ãƒ–ã¨ã—ã¦è¿½åŠ ã•ã‚Œã¾ã—㟠+ - ノートã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‹ã‚‰ã¯å½“è©²é …ç›®ã¯æ¶ˆãˆã¾ã—㟠- プãƒãƒ•ã‚£ãƒ¼ãƒ«ã«ãã®äººãŒä½œã£ãŸPlayã®ä¸€è¦§å‡ºã›ã‚‹ã‚ˆã†ã« - メニューã®ã‚¹ã‚¤ãƒƒãƒã®å‹•ä½œã‚’改善 - 絵文å—ピッカーã®æ¤œç´¢ã®è¡¨ç¤ºä»¶æ•°ã‚’100件ã«å¢—åŠ @@ -48,7 +52,6 @@ - `$[rainbow ]`記法ãŒã€å‹•ãã®ã‚ã‚‹MFMãŒç„¡åŠ¹ã«ãªã£ã¦ã„ã¦ã‚‚使用ã§ãるよã†ã«ãªã‚Šã¾ã—㟠- Playã®æ“作を行ã†API Tokenã‚’APIコンソールã‹ã‚‰ç™ºè¡Œã§ãるよã†ã« - リアクションã®è¡¨ç¤ºã‚µã‚¤ã‚ºã‚’より大ããã§ãるよã†ã« -- ノート詳細ページèªã¿è¾¼ã¿æ™‚ã®ãƒ‘フォーマンスを改善 - タイムラインã§ãƒªã‚¹ãƒˆ/アンテナé¸æŠžæ™‚ã®ãƒ‘フォーマンスを改善 - 「Moderation noteã€ã€ã€ŒAdd moderation noteã€ã‚’ãƒãƒ¼ã‚«ãƒ©ã‚¤ã‚ºã§ãるよã†ã« - æ–°ã—ã„å®Ÿç¸¾ã‚’è¿½åŠ diff --git a/locales/index.d.ts b/locales/index.d.ts index 94d9657ac8765775d95e7681ced8b4d05b5c19bf..ac714258e2e9ba7f8beddb36fe9cab69bfeada2e 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -1110,6 +1110,10 @@ export interface Locale { "pastAnnouncements": string; "youHaveUnreadAnnouncements": string; "useSecurityKey": string; + "replies": string; + "renotes": string; + "loadReplies": string; + "loadConversation": string; "_announcement": { "forExistingUsers": string; "forExistingUsersDescription": string; diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 743814d33982da4fbe2928bb5a9518e642b35531..d97b09f63ce1d3277921ab54111232e763516455 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -15,7 +15,7 @@ gotIt: "ã‚ã‹ã£ãŸ" cancel: "ã‚ャンセル" noThankYou: "ã‚„ã‚ã¦ãŠã" enterUsername: "ユーザーåを入力" -renotedBy: "{user}ãŒRenote" +renotedBy: "{user}ãŒãƒªãƒŽãƒ¼ãƒˆ" noNotes: "ノートã¯ã‚ã‚Šã¾ã›ã‚“" noNotifications: "通知ã¯ã‚ã‚Šã¾ã›ã‚“" instance: "サーãƒãƒ¼" @@ -45,10 +45,10 @@ pin: "ピン留ã‚" unpin: "ピン留ã‚解除" copyContent: "内容をコピー" copyLink: "リンクをコピー" -copyLinkRenote: "Renoteã®ãƒªãƒ³ã‚¯ã‚’コピー" +copyLinkRenote: "リノートã®ãƒªãƒ³ã‚¯ã‚’コピー" delete: "削除" deleteAndEdit: "削除ã—ã¦ç·¨é›†" -deleteAndEditConfirm: "ã“ã®ãƒŽãƒ¼ãƒˆã‚’削除ã—ã¦ã‚‚ã†ä¸€åº¦ç·¨é›†ã—ã¾ã™ã‹ï¼Ÿã“ã®ãƒŽãƒ¼ãƒˆã¸ã®ãƒªã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã€Renoteã€è¿”ä¿¡ã‚‚å…¨ã¦å‰Šé™¤ã•ã‚Œã¾ã™ã€‚" +deleteAndEditConfirm: "ã“ã®ãƒŽãƒ¼ãƒˆã‚’削除ã—ã¦ã‚‚ã†ä¸€åº¦ç·¨é›†ã—ã¾ã™ã‹ï¼Ÿã“ã®ãƒŽãƒ¼ãƒˆã¸ã®ãƒªã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã€ãƒªãƒŽãƒ¼ãƒˆã€è¿”ä¿¡ã‚‚å…¨ã¦å‰Šé™¤ã•ã‚Œã¾ã™ã€‚" addToList: "リストã«è¿½åŠ " addToAntenna: "アンテナã«è¿½åŠ " sendMessage: "メッセージをé€ä¿¡" @@ -105,13 +105,13 @@ followRequests: "フォãƒãƒ¼ç”³è«‹" unfollow: "フォãƒãƒ¼è§£é™¤" followRequestPending: "フォãƒãƒ¼è¨±å¯å¾…ã¡" enterEmoji: "絵文å—を入力" -renote: "Renote" -unrenote: "Renote解除" -renoted: "Renoteã—ã¾ã—ãŸã€‚" -cantRenote: "ã“ã®æŠ•ç¨¿ã¯Renoteã§ãã¾ã›ã‚“。" -cantReRenote: "Renoteã‚’Renoteã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。" +renote: "リノート" +unrenote: "リノート解除" +renoted: "リノートã—ã¾ã—ãŸã€‚" +cantRenote: "ã“ã®æŠ•ç¨¿ã¯ãƒªãƒŽãƒ¼ãƒˆã§ãã¾ã›ã‚“。" +cantReRenote: "リノートをリノートã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。" quote: "引用" -inChannelRenote: "ãƒãƒ£ãƒ³ãƒãƒ«å†…Renote" +inChannelRenote: "ãƒãƒ£ãƒ³ãƒãƒ«å†…リノート" inChannelQuote: "ãƒãƒ£ãƒ³ãƒãƒ«å†…引用" pinnedNote: "ピン留ã‚ã•ã‚ŒãŸãƒŽãƒ¼ãƒˆ" pinned: "ピン留ã‚" @@ -657,7 +657,7 @@ behavior: "動作" sample: "サンプル" abuseReports: "é€šå ±" reportAbuse: "é€šå ±" -reportAbuseRenote: "Renoteã‚’é€šå ±" +reportAbuseRenote: "ãƒªãƒŽãƒ¼ãƒˆã‚’é€šå ±" reportAbuseOf: "{name}ã‚’é€šå ±ã™ã‚‹" fillAbuseReportDescription: "é€šå ±ç†ç”±ã®è©³ç´°ã‚’記入ã—ã¦ãã ã•ã„。対象ã®ãƒŽãƒ¼ãƒˆãŒã‚ã‚‹å ´åˆã¯ãã®URLも記入ã—ã¦ãã ã•ã„。" abuseReported: "内容ãŒé€ä¿¡ã•ã‚Œã¾ã—ãŸã€‚ã”å ±å‘Šã‚ã‚ŠãŒã¨ã†ã”ã–ã„ã¾ã—ãŸã€‚" @@ -691,9 +691,9 @@ manageAccessTokens: "アクセストークンã®ç®¡ç†" accountInfo: "ã‚¢ã‚«ã‚¦ãƒ³ãƒˆæƒ…å ±" notesCount: "ノートã®æ•°" repliesCount: "返信ã—ãŸæ•°" -renotesCount: "Renoteã—ãŸæ•°" +renotesCount: "リノートã—ãŸæ•°" repliedCount: "返信ã•ã‚ŒãŸæ•°" -renotedCount: "Renoteã•ã‚ŒãŸæ•°" +renotedCount: "リノートã•ã‚ŒãŸæ•°" followingCount: "フォãƒãƒ¼æ•°" followersCount: "フォãƒãƒ¯ãƒ¼æ•°" sentReactionsCount: "リアクションã—ãŸæ•°" @@ -989,7 +989,7 @@ thisPostMayBeAnnoying: "ã“ã®æŠ•ç¨¿ã¯è¿·æƒ‘ã«ãªã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ thisPostMayBeAnnoyingHome: "ホームã«æŠ•ç¨¿" thisPostMayBeAnnoyingCancel: "ã‚„ã‚ã‚‹" thisPostMayBeAnnoyingIgnore: "ã“ã®ã¾ã¾æŠ•ç¨¿" -collapseRenotes: "見ãŸã“ã¨ã®ã‚ã‚‹Renoteã‚’çœç•¥ã—ã¦è¡¨ç¤º" +collapseRenotes: "見ãŸã“ã¨ã®ã‚るリノートをçœç•¥ã—ã¦è¡¨ç¤º" internalServerError: "サーãƒãƒ¼å†…部エラー" internalServerErrorDescription: "サーãƒãƒ¼å†…部ã§äºˆæœŸã—ãªã„エラーãŒç™ºç”Ÿã—ã¾ã—ãŸã€‚" copyErrorInfo: "ã‚¨ãƒ©ãƒ¼æƒ…å ±ã‚’ã‚³ãƒ”ãƒ¼" @@ -1037,7 +1037,7 @@ forceShowAds: "常ã«åºƒå‘Šã‚’表示ã™ã‚‹" addMemo: "ãƒ¡ãƒ¢ã‚’è¿½åŠ " editMemo: "メモを編集" reactionsList: "リアクション一覧" -renotesList: "Renote一覧" +renotesList: "リノート一覧" notificationDisplay: "通知ã®è¡¨ç¤º" leftTop: "左上" rightTop: "å³ä¸Š" @@ -1107,6 +1107,10 @@ currentAnnouncements: "ç¾åœ¨ã®ãŠçŸ¥ã‚‰ã›" pastAnnouncements: "éŽåŽ»ã®ãŠçŸ¥ã‚‰ã›" youHaveUnreadAnnouncements: "未èªã®ãŠçŸ¥ã‚‰ã›ãŒã‚ã‚Šã¾ã™ã€‚" useSecurityKey: "ブラウザã¾ãŸã¯ãƒ‡ãƒã‚¤ã‚¹ã®æŒ‡ç¤ºã«å¾“ã£ã¦ã€ã‚»ã‚ュリティã‚ーã¾ãŸã¯ãƒ‘スã‚ーを使用ã—ã¦ãã ã•ã„。" +replies: "返信" +renotes: "リノート" +loadReplies: "返信を見る" +loadConversation: "会話を見る" _announcement: forExistingUsers: "æ—¢å˜ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ã¿" diff --git a/packages/frontend/src/components/MkNote.vue b/packages/frontend/src/components/MkNote.vue index bedacbce2a07ff20f9fc1066b6f440ee7fda497c..fdf22c599565c5a70a7755c292e4099cb7c76fe8 100644 --- a/packages/frontend/src/components/MkNote.vue +++ b/packages/frontend/src/components/MkNote.vue @@ -86,9 +86,7 @@ SPDX-License-Identifier: AGPL-3.0-only </div> <MkReactionsViewer :note="appearNote" :maxNumber="16"> <template #more> - <button class="_button" :class="$style.reactionDetailsButton" @click="showReactions"> - {{ i18n.ts.more }} - </button> + <div :class="$style.reactionOmitted">{{ i18n.ts.more }}</div> </template> </MkReactionsViewer> <footer :class="$style.footer"> @@ -457,7 +455,7 @@ function showRenoteMenu(viaKeyboard = false): void { } else { os.popupMenu([ getCopyNoteLinkMenu(note, i18n.ts.copyLinkRenote), - null, + null, getAbuseNoteMenu(note, i18n.ts.reportAbuseRenote), $i.isModerator || $i.isAdmin ? getUnrenote() : undefined, ], renoteTime.value, { @@ -488,12 +486,6 @@ function readPromo() { }); isDeleted.value = true; } - -function showReactions(): void { - os.popup(defineAsyncComponent(() => import('@/components/MkReactedUsersDialog.vue')), { - noteId: appearNote.id, - }, {}, 'closed'); -} </script> <style lang="scss" module> @@ -941,7 +933,7 @@ function showReactions(): void { opacity: 0.7; } -.reactionDetailsButton { +.reactionOmitted { display: inline-block; height: 32px; margin: 2px; @@ -950,9 +942,5 @@ function showReactions(): void { border-radius: 4px; background: transparent; opacity: .8; - - &:hover { - background: var(--X5); - } } </style> diff --git a/packages/frontend/src/components/MkNoteDetailed.vue b/packages/frontend/src/components/MkNoteDetailed.vue index f7578dd3902dc0c6cde568e08b12d5c3cdccb05b..086667127b0699bd1ab065383873a7a7d2b9f405 100644 --- a/packages/frontend/src/components/MkNoteDetailed.vue +++ b/packages/frontend/src/components/MkNoteDetailed.vue @@ -11,7 +11,12 @@ SPDX-License-Identifier: AGPL-3.0-only v-hotkey="keymap" :class="$style.root" > - <MkNoteSub v-for="note in conversation" :key="note.id" :class="$style.replyToMore" :note="note"/> + <div v-if="appearNote.reply.replyId"> + <div v-if="!conversationLoaded" style="padding: 16px"> + <MkButton style="margin: 0 auto;" primary rounded @click="loadConversation">{{ i18n.ts.loadConversation }}</MkButton> + </div> + <MkNoteSub v-for="note in conversation" :key="note.id" :class="$style.replyToMore" :note="note"/> + </div> <MkNoteSub v-if="appearNote.reply" :note="appearNote.reply" :class="$style.replyTo"/> <div v-if="isRenote" :class="$style.renote"> <MkAvatar :class="$style.renoteAvatar" :user="note.user" link preview/> @@ -125,7 +130,43 @@ SPDX-License-Identifier: AGPL-3.0-only </button> </footer> </article> - <MkNoteSub v-for="note in replies" :key="note.id" :note="note" :class="$style.reply" :detail="true"/> + <div :class="$style.tabs"> + <button class="_button" :class="[$style.tab, { [$style.tabActive]: tab === 'replies' }]" @click="tab = 'replies'"><i class="ti ti-arrow-back-up"></i> {{ i18n.ts.replies }}</button> + <button class="_button" :class="[$style.tab, { [$style.tabActive]: tab === 'renotes' }]" @click="tab = 'renotes'"><i class="ti ti-repeat"></i> {{ i18n.ts.renotes }}</button> + <button class="_button" :class="[$style.tab, { [$style.tabActive]: tab === 'reactions' }]" @click="tab = 'reactions'"><i class="ti ti-icons"></i> {{ i18n.ts.reactions }}</button> + </div> + <div> + <div v-if="tab === 'replies'" :class="$style.tab_replies"> + <div v-if="!repliesLoaded" style="padding: 16px"> + <MkButton style="margin: 0 auto;" primary rounded @click="loadReplies">{{ i18n.ts.loadReplies }}</MkButton> + </div> + <MkNoteSub v-for="note in replies" :key="note.id" :note="note" :class="$style.reply" :detail="true"/> + </div> + <div v-else-if="tab === 'renotes'" :class="$style.tab_renotes"> + <MkPagination :pagination="renotesPagination"> + <template #default="{ items }"> + <MkA v-for="item in items" :key="item.id" :to="userPage(item.user)"> + <MkUserCardMini :user="item.user" :withChart="false"/> + </MkA> + </template> + </MkPagination> + </div> + <div v-else-if="tab === 'reactions'" :class="$style.tab_reactions"> + <div :class="$style.reactionTabs"> + <button v-for="reaction in Object.keys(appearNote.reactions)" :key="reaction" :class="[$style.reactionTab, { [$style.reactionTabActive]: reactionTabType === reaction }]" class="_button" @click="reactionTabType = reaction"> + <MkReactionIcon :reaction="reaction"/> + <span style="margin-left: 4px;">{{ appearNote.reactions[reaction] }}</span> + </button> + </div> + <MkPagination :pagination="reactionsPagination"> + <template #default="{ items }"> + <MkA v-for="item in items" :key="item.id" :to="userPage(item.user)"> + <MkUserCardMini :user="item.user" :withChart="false"/> + </MkA> + </template> + </MkPagination> + </div> + </div> </div> <div v-else class="_panel" :class="$style.muted" @click="muted = false"> <I18n :src="i18n.ts.userSaysSomething" tag="small"> @@ -169,6 +210,10 @@ import { claimAchievement } from '@/scripts/achievements'; import { MenuItem } from '@/types/menu'; import MkRippleEffect from '@/components/MkRippleEffect.vue'; import { showMovedDialog } from '@/scripts/show-moved-dialog'; +import MkUserCardMini from '@/components/MkUserCardMini.vue'; +import MkPagination, { Paging } from '@/components/MkPagination.vue'; +import MkReactionIcon from '@/components/MkReactionIcon.vue'; +import MkButton from '@/components/MkButton.vue'; const props = defineProps<{ note: Misskey.entities.Note; @@ -224,6 +269,26 @@ const keymap = { 's': () => showContent.value !== showContent.value, }; +let tab = $ref('replies'); +let reactionTabType = $ref(null); + +const renotesPagination = $computed(() => ({ + endpoint: 'notes/renotes', + limit: 10, + params: { + noteId: appearNote.id, + }, +})); + +const reactionsPagination = $computed(() => ({ + endpoint: 'notes/reactions', + limit: 10, + params: { + noteId: appearNote.id, + type: reactionTabType, + }, +})); + useNoteCapture({ rootEl: el, note: $$(appearNote), @@ -426,14 +491,20 @@ function blur() { el.value.blur(); } -os.api('notes/children', { - noteId: appearNote.id, - limit: 30, -}).then(res => { - replies.value = res; -}); +const repliesLoaded = ref(false); +function loadReplies() { + repliesLoaded.value = true; + os.api('notes/children', { + noteId: appearNote.id, + limit: 30, + }).then(res => { + replies.value = res; + }); +} -if (appearNote.replyId) { +const conversationLoaded = ref(false); +function loadConversation() { + conversationLoaded.value = true; os.api('notes/conversation', { noteId: appearNote.replyId, }).then(res => { @@ -640,10 +711,52 @@ if (appearNote.replyId) { } } -.reply { +.reply:not(:first-child) { border-top: solid 0.5px var(--divider); } +.tabs { + border-top: solid 0.5px var(--divider); + border-bottom: solid 0.5px var(--divider); + display: flex; +} + +.tab { + flex: 1; + padding: 12px 8px; + border-top: solid 2px transparent; + border-bottom: solid 2px transparent; +} + +.tabActive { + border-bottom: solid 2px var(--accent); +} + +.tab_renotes { + padding: 16px; +} + +.tab_reactions { + padding: 16px; +} + +.reactionTabs { + display: flex; + gap: 8px; + flex-wrap: wrap; + margin-bottom: 8px; +} + +.reactionTab { + padding: 4px 6px; + border: solid 1px var(--divider); + border-radius: 6px; +} + +.reactionTabActive { + border-color: var(--accent); +} + @container (max-width: 500px) { .root { font-size: 0.9em; diff --git a/packages/frontend/src/components/MkReactedUsersDialog.vue b/packages/frontend/src/components/MkReactedUsersDialog.vue deleted file mode 100644 index b5f3a634a3974b0430f5a9c218881704a54a5b0f..0000000000000000000000000000000000000000 --- a/packages/frontend/src/components/MkReactedUsersDialog.vue +++ /dev/null @@ -1,104 +0,0 @@ -<!-- -SPDX-FileCopyrightText: syuilo and other misskey contributors -SPDX-License-Identifier: AGPL-3.0-only ---> - -<template> -<MkModalWindow - ref="dialog" - :width="400" - :height="450" - @close="dialog.close()" - @closed="emit('closed')" -> - <template #header>{{ i18n.ts.reactionsList }}</template> - - <MkSpacer :marginMin="20" :marginMax="28"> - <div v-if="note" class="_gaps"> - <div v-if="reactions.length === 0" class="_fullinfo"> - <img :src="infoImageUrl" class="_ghost"/> - <div>{{ i18n.ts.nothing }}</div> - </div> - <template v-else> - <div :class="$style.tabs"> - <button v-for="reaction in reactions" :key="reaction" :class="[$style.tab, { [$style.tabActive]: tab === reaction }]" class="_button" @click="tab = reaction"> - <MkReactionIcon :reaction="reaction"/> - <span style="margin-left: 4px;">{{ note.reactions[reaction] }}</span> - </button> - </div> - <MkA v-for="user in users" :key="user.id" :to="userPage(user)" @click="dialog.close()"> - <MkUserCardMini :user="user" :withChart="false"/> - </MkA> - </template> - </div> - <div v-else> - <MkLoading/> - </div> - </MkSpacer> -</MkModalWindow> -</template> - -<script lang="ts" setup> -import { onMounted, watch } from 'vue'; -import * as Misskey from 'misskey-js'; -import MkModalWindow from '@/components/MkModalWindow.vue'; -import MkReactionIcon from '@/components/MkReactionIcon.vue'; -import MkUserCardMini from '@/components/MkUserCardMini.vue'; -import { userPage } from '@/filters/user'; -import { i18n } from '@/i18n'; -import * as os from '@/os'; -import { infoImageUrl } from '@/instance'; - -const emit = defineEmits<{ - (ev: 'closed'): void, -}>(); - -const props = defineProps<{ - noteId: Misskey.entities.Note['id']; -}>(); - -const dialog = $shallowRef<InstanceType<typeof MkModalWindow>>(); - -let note = $ref<Misskey.entities.Note>(); -let tab = $ref<string>(); -let reactions = $ref<string[]>(); -let users = $ref(); - -watch($$(tab), async () => { - const res = await os.api('notes/reactions', { - noteId: props.noteId, - type: tab, - limit: 30, - }); - - users = res.map(x => x.user); -}); - -onMounted(() => { - os.api('notes/show', { - noteId: props.noteId, - }).then((res) => { - reactions = Object.keys(res.reactions); - tab = reactions[0]; - note = res; - }); -}); -</script> - -<style lang="scss" module> -.tabs { - display: flex; - gap: 8px; - flex-wrap: wrap; -} - -.tab { - padding: 4px 6px; - border: solid 1px var(--divider); - border-radius: 6px; -} - -.tabActive { - border-color: var(--accent); -} -</style> diff --git a/packages/frontend/src/components/MkRenotedUsersDialog.vue b/packages/frontend/src/components/MkRenotedUsersDialog.vue deleted file mode 100644 index 5e6784bb9cb5e1c5509f03cb60ea73463fc64633..0000000000000000000000000000000000000000 --- a/packages/frontend/src/components/MkRenotedUsersDialog.vue +++ /dev/null @@ -1,71 +0,0 @@ -<!-- -SPDX-FileCopyrightText: syuilo and other misskey contributors -SPDX-License-Identifier: AGPL-3.0-only ---> - -<template> -<MkModalWindow - ref="dialog" - :width="400" - :height="450" - @close="dialog.close()" - @closed="emit('closed')" -> - <template #header>{{ i18n.ts.renotesList }}</template> - - <MkSpacer :marginMin="20" :marginMax="28"> - <div v-if="renotes" class="_gaps"> - <div v-if="renotes.length === 0" class="_fullinfo"> - <img :src="infoImageUrl" class="_ghost"/> - <div>{{ i18n.ts.nothing }}</div> - </div> - <template v-else> - <MkA v-for="user in users" :key="user.id" :to="userPage(user)" @click="dialog.close()"> - <MkUserCardMini :user="user" :withChart="false"/> - </MkA> - </template> - </div> - <div v-else> - <MkLoading/> - </div> - </MkSpacer> -</MkModalWindow> -</template> - -<script lang="ts" setup> -import { onMounted } from 'vue'; -import * as Misskey from 'misskey-js'; -import MkModalWindow from '@/components/MkModalWindow.vue'; -import MkUserCardMini from '@/components/MkUserCardMini.vue'; -import { userPage } from '@/filters/user'; -import { i18n } from '@/i18n'; -import * as os from '@/os'; -import { infoImageUrl } from '@/instance'; - -const emit = defineEmits<{ - (ev: 'closed'): void, -}>(); - -const props = defineProps<{ - noteId: Misskey.entities.Note['id']; -}>(); - -const dialog = $shallowRef<InstanceType<typeof MkModalWindow>>(); - -let note = $ref<Misskey.entities.Note>(); -let renotes = $ref(); -let users = $ref(); - -onMounted(async () => { - const res = await os.api('notes/renotes', { - noteId: props.noteId, - limit: 30, - }); - - renotes = res; - users = res.map(x => x.user); -}); -</script> - -<style lang="scss" module> -</style> diff --git a/packages/frontend/src/scripts/get-note-menu.ts b/packages/frontend/src/scripts/get-note-menu.ts index 5bda993fff19e739952ecd1e0ad6b9d8c865bb8d..d9fae946d30bb83d6ea94edc1867a3580e1df598 100644 --- a/packages/frontend/src/scripts/get-note-menu.ts +++ b/packages/frontend/src/scripts/get-note-menu.ts @@ -238,18 +238,6 @@ export function getNoteMenu(props: { os.pageWindow(`/notes/${appearNote.id}`); } - function showReactions(): void { - os.popup(defineAsyncComponent(() => import('@/components/MkReactedUsersDialog.vue')), { - noteId: appearNote.id, - }, {}, 'closed'); - } - - function showRenotes(): void { - os.popup(defineAsyncComponent(() => import('@/components/MkRenotedUsersDialog.vue')), { - noteId: appearNote.id, - }, {}, 'closed'); - } - async function translate(): Promise<void> { if (props.translation.value != null) return; props.translating.value = true; @@ -279,14 +267,6 @@ export function getNoteMenu(props: { icon: 'ti ti-info-circle', text: i18n.ts.details, action: openDetail, - }, { - icon: 'ti ti-repeat', - text: i18n.ts.renotesList, - action: showRenotes, - }, { - icon: 'ti ti-icons', - text: i18n.ts.reactionsList, - action: showReactions, }, { icon: 'ti ti-copy', text: i18n.ts.copyContent,