diff --git a/packages/client/src/components/MkNoteDetailed.vue b/packages/client/src/components/MkNoteDetailed.vue index f9f0e60a3..4860927e7 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); + const keymap = { r: () => reply(true), "e|a|plus": () => react(true), @@ -509,14 +524,19 @@ onUnmounted(() => { } } - > :deep(.chips) { - padding: 6px 32px 12px; + > :deep(.chips), { + padding-block: 6px 12px; + padding-left: 32px; } - > :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 +632,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/MkReactedUsers.vue b/packages/client/src/components/MkReactedUsers.vue new file mode 100644 index 000000000..e685c85db --- /dev/null +++ b/packages/client/src/components/MkReactedUsers.vue @@ -0,0 +1,108 @@ + + + + + {{ i18n.ts.nothing }} + + + + + + {{ + note.reactions[reaction] + }} + + + + + + + + + + + + + diff --git a/packages/client/src/components/MkReactedUsersDialog.vue b/packages/client/src/components/MkReactedUsersDialog.vue deleted file mode 100644 index 784d306b6..000000000 --- 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 2eb3e6ac1..d69679009 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 d8e47ff43..6eeecf4a6 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,