diff --git a/packages/client/src/components/MkNoteDetailed.vue b/packages/client/src/components/MkNoteDetailed.vue index f9f0e60a30..e97141903b 100644 --- a/packages/client/src/components/MkNoteDetailed.vue +++ b/packages/client/src/components/MkNoteDetailed.vue @@ -55,6 +55,13 @@ {{ i18n.ts._notification._types.quote }} + + + + {{ reactionsCount }} + + {{ i18n.ts.reaction }} + @@ -128,6 +135,11 @@ + + @@ -165,6 +177,7 @@ import XStarButton from "@/components/MkStarButton.vue"; import XRenoteButton from "@/components/MkRenoteButton.vue"; import MkPagination from "@/components/MkPagination.vue"; import MkUserCardMini from "@/components/MkUserCardMini.vue"; +import MkReactedUsers from "@/components/MkReactedUsers.vue"; import { pleaseLogin } from "@/scripts/please-login"; import { getWordSoftMute } from "@/scripts/check-word-mute"; import { userPage } from "@/filters/user"; @@ -240,6 +253,8 @@ let clips = $ref(); let renotes = $ref(); let isScrolling; +const reactionsCount = Object.values(props.note.reactions).reduce((x,y) => x + y, 0); + const keymap = { r: () => reply(true), "e|a|plus": () => react(true), @@ -509,14 +524,22 @@ onUnmounted(() => { } } - > :deep(.chips) { - padding: 6px 32px 12px; + > :deep(.chips), { + padding-block: 6px 12px; + padding-left: 32px; + &:last-child { + margin-bottom: 12px; + } } - > :deep(.user-card-mini) { + > :deep(.user-card-mini), + > :deep(.reacted-users > *) { padding-inline: 32px; border-top: 1px solid var(--divider); border-radius: 0; } + > :deep(.reacted-users > div) { + padding-block: 12px; + } > .reply { border-top: solid 0.5px var(--divider); @@ -612,10 +635,13 @@ onUnmounted(() => { } } > .clips, - > .chips, - > :deep(.user-card-mini) { + > :deep(.user-card-mini), + > :deep(.reacted-users > *) { padding-inline: 16px !important; } + > .chips { + padding-left: 16px !important; + } } &.max-width_300px { diff --git a/packages/client/src/components/MkNoteSub.vue b/packages/client/src/components/MkNoteSub.vue index 2b8d6e8df9..1a50e6f5f3 100644 --- a/packages/client/src/components/MkNoteSub.vue +++ b/packages/client/src/components/MkNoteSub.vue @@ -137,7 +137,7 @@ class="reply" :class="{ single: replies.length == 1 }" :conversation="conversation" - :depth="replies.lenght == 1 ? depth : depth + 1" + :depth="replies.length == 1 ? depth : depth + 1" :replyLevel="replyLevel + 1" :parentId="appearNote.replyId" :detailedView="detailedView" diff --git a/packages/client/src/components/MkReactedUsers.vue b/packages/client/src/components/MkReactedUsers.vue new file mode 100644 index 0000000000..8a8bf842f9 --- /dev/null +++ b/packages/client/src/components/MkReactedUsers.vue @@ -0,0 +1,97 @@ + + + + + + {{ + note.reactions[reaction] + }} + + + + + + + + + + + + diff --git a/packages/client/src/components/MkReactedUsersDialog.vue b/packages/client/src/components/MkReactedUsersDialog.vue deleted file mode 100644 index 784d306b63..0000000000 --- a/packages/client/src/components/MkReactedUsersDialog.vue +++ /dev/null @@ -1,128 +0,0 @@ - - - {{ i18n.ts.reaction }} - - - - - - {{ i18n.ts.nothing }} - - - - - - {{ - note.reactions[reaction] - }} - - - - - - - - - - - - - - - - - diff --git a/packages/client/src/components/MkTab.vue b/packages/client/src/components/MkTab.vue index 2eb3e6ac12..d696790095 100644 --- a/packages/client/src/components/MkTab.vue +++ b/packages/client/src/components/MkTab.vue @@ -89,6 +89,12 @@ export default defineComponent({ padding: 12px 32px; font-size: 0.85em; overflow-x: auto; + mask: linear-gradient(to right, black calc(100% - 90px), transparent); + -webkit-mask: linear-gradient(to right, black calc(100% - 90px), transparent); + padding-right: 90px !important; + &::-webkit-scrollbar { + display: none; + } > button { display: flex; gap: 6px; @@ -102,6 +108,9 @@ export default defineComponent({ > i { margin-top: -0.1em; } + > .count { + margin-right: -.2em; + } } } diff --git a/packages/client/src/scripts/get-note-menu.ts b/packages/client/src/scripts/get-note-menu.ts index d8e47ff437..6eeecf4a66 100644 --- a/packages/client/src/scripts/get-note-menu.ts +++ b/packages/client/src/scripts/get-note-menu.ts @@ -230,19 +230,6 @@ export function getNoteMenu(props: { }); } - function showReactions(): void { - os.popup( - defineAsyncComponent( - () => import("@/components/MkReactedUsersDialog.vue"), - ), - { - noteId: appearNote.id, - }, - {}, - "closed", - ); - } - async function translate(): Promise { if (props.translation.value != null) return; props.translating.value = true; @@ -282,11 +269,6 @@ export function getNoteMenu(props: { action: edit, } : undefined, - { - icon: "ph-smiley ph-bold ph-lg", - text: i18n.ts.reaction, - action: showReactions, - }, { icon: "ph-clipboard-text ph-bold ph-lg", text: i18n.ts.copyContent,