summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author1Step621 <86859447+1STEP621@users.noreply.github.com>2024-03-30 20:30:22 +0900
committerGitHub <noreply@github.com>2024-03-30 20:30:22 +0900
commitd4ca973e3408a7d28788efe57bcd882c0ce9eedc (patch)
tree6350043f4d6e7d94ed6e164096319c70236e88c9
parentfix/enhance(frontend): 映像・音声周りの改修 (#13206) (diff)
downloadsharkey-d4ca973e3408a7d28788efe57bcd882c0ce9eedc.tar.gz
sharkey-d4ca973e3408a7d28788efe57bcd882c0ce9eedc.tar.bz2
sharkey-d4ca973e3408a7d28788efe57bcd882c0ce9eedc.zip
Enhance(frontend): もっと!ボタンでリアクション一覧が開けるように (#12935)
* もっと!ボタンでリアクション一覧が開けるように * update CHANGELOG.md && デバッグ用に最大リアクション表示数を1にしてたのを一応戻した * fix * デザイン調整 * maxNumberもどす * fix CHANGELOG * fix * move changelog * :art: --------- Co-authored-by: かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com> Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
-rw-r--r--CHANGELOG.md1
-rw-r--r--packages/frontend/src/components/MkNote.vue7
-rw-r--r--packages/frontend/src/components/MkNoteDetailed.vue9
-rw-r--r--packages/frontend/src/components/MkReactionsViewer.vue3
-rw-r--r--packages/frontend/src/pages/note.vue3
-rw-r--r--packages/frontend/src/router/definition.ts2
6 files changed, 16 insertions, 9 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ebf9320129..390639bd69 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -22,6 +22,7 @@
- Enhance: 映像・音声の再生にブラウザのネイティブプレイヤーを使用できるように
- Enhance: 映像・音声の再生メニューに「再生速度」「ループ再生」「ピクチャインピクチャ」を追加
- Enhance: 映像・音声の再生にキーボードショートカットが使えるように
+- Enhance: ノートについているリアクションの「もっと!」から、リアクションの一覧を表示できるように
- Fix: 一部のページ内リンクが正しく動作しない問題を修正
- Fix: 周年の実績が閏年を考慮しない問題を修正
- Fix: ローカルURLのプレビューポップアップが左上に表示される
diff --git a/packages/frontend/src/components/MkNote.vue b/packages/frontend/src/components/MkNote.vue
index 4add3aa6dd..f5536e79bf 100644
--- a/packages/frontend/src/components/MkNote.vue
+++ b/packages/frontend/src/components/MkNote.vue
@@ -97,7 +97,7 @@ SPDX-License-Identifier: AGPL-3.0-only
</div>
<MkReactionsViewer v-if="appearNote.reactionAcceptance !== 'likeOnly'" :note="appearNote" :maxNumber="16" @mockUpdateMyReaction="emitUpdReaction">
<template #more>
- <div :class="$style.reactionOmitted">{{ i18n.ts.more }}</div>
+ <MkA :to="`/notes/${appearNote.id}/reactions`" :class="[$style.reactionOmitted]">{{ i18n.ts.more }}</MkA>
</template>
</MkReactionsViewer>
<footer :class="$style.footer">
@@ -1020,9 +1020,8 @@ function emitUpdReaction(emoji: string, delta: number) {
.reactionOmitted {
display: inline-block;
- height: 32px;
- margin: 2px;
- padding: 0 6px;
+ margin-left: 8px;
opacity: .8;
+ font-size: 95%;
}
</style>
diff --git a/packages/frontend/src/components/MkNoteDetailed.vue b/packages/frontend/src/components/MkNoteDetailed.vue
index ebccd60986..eec1aad53c 100644
--- a/packages/frontend/src/components/MkNoteDetailed.vue
+++ b/packages/frontend/src/components/MkNoteDetailed.vue
@@ -234,9 +234,12 @@ import MkReactionIcon from '@/components/MkReactionIcon.vue';
import MkButton from '@/components/MkButton.vue';
import { isEnabledUrlPreview } from '@/instance.js';
-const props = defineProps<{
+const props = withDefaults(defineProps<{
note: Misskey.entities.Note;
-}>();
+ initialTab: string;
+}>(), {
+ initialTab: 'replies',
+});
const inChannel = inject('inChannel', null);
@@ -304,7 +307,7 @@ provide('react', (reaction: string) => {
});
});
-const tab = ref('replies');
+const tab = ref(props.initialTab);
const reactionTabType = ref<string | null>(null);
const renotesPagination = computed<Paging>(() => ({
diff --git a/packages/frontend/src/components/MkReactionsViewer.vue b/packages/frontend/src/components/MkReactionsViewer.vue
index 1bd37d842b..63b202f9f3 100644
--- a/packages/frontend/src/components/MkReactionsViewer.vue
+++ b/packages/frontend/src/components/MkReactionsViewer.vue
@@ -100,6 +100,9 @@ watch([() => props.note.reactions, () => props.maxNumber], ([newSource, maxNumbe
}
.root {
+ display: flex;
+ flex-wrap: wrap;
+ align-items: center;
margin: 4px -2px 0 -2px;
&:empty {
diff --git a/packages/frontend/src/pages/note.vue b/packages/frontend/src/pages/note.vue
index 4c985b96e6..e14651742a 100644
--- a/packages/frontend/src/pages/note.vue
+++ b/packages/frontend/src/pages/note.vue
@@ -21,7 +21,7 @@ SPDX-License-Identifier: AGPL-3.0-only
</div>
<div class="_margin _gaps_s">
<MkRemoteCaution v-if="note.user.host != null" :href="note.url ?? note.uri"/>
- <MkNoteDetailed :key="note.id" v-model:note="note" :class="$style.note"/>
+ <MkNoteDetailed :key="note.id" v-model:note="note" :initialTab="initialTab" :class="$style.note"/>
</div>
<div v-if="clips && clips.length > 0" class="_margin">
<div style="font-weight: bold; padding: 12px;">{{ i18n.ts.clip }}</div>
@@ -66,6 +66,7 @@ import { defaultStore } from '@/store.js';
const props = defineProps<{
noteId: string;
+ initialTab?: string;
}>();
const note = ref<null | Misskey.entities.Note>();
diff --git a/packages/frontend/src/router/definition.ts b/packages/frontend/src/router/definition.ts
index eaeeafd499..c9f03b738f 100644
--- a/packages/frontend/src/router/definition.ts
+++ b/packages/frontend/src/router/definition.ts
@@ -35,7 +35,7 @@ const routes: RouteDef[] = [{
component: page(() => import('@/pages/user/index.vue')),
}, {
name: 'note',
- path: '/notes/:noteId',
+ path: '/notes/:noteId/:initialTab?',
component: page(() => import('@/pages/note.vue')),
}, {
name: 'list',