1
0
mirror of https://github.com/hotomoe/hotomoe synced 2024-12-12 05:38:12 +09:00

Enhance(frontend): もっと!ボタンでリアクション一覧が開けるように (misskey-dev#12935) (MisskeyIO#524)

Co-authored-by: 1Step621 <onestep621@gmail.com>
This commit is contained in:
まっちゃとーにゅ 2024-03-15 14:17:42 +09:00 committed by GitHub
parent 6bd7e85976
commit b33cc203ac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 34 additions and 10 deletions

View File

@ -46,6 +46,7 @@
### Client
- Enhance: ノート作成画面のファイル添付メニューの区切り線の位置を調整
- Enhance: ノートについているリアクションの「もっと!」から、リアクションの一覧を表示できるように
- Fix: syuilo/misskeyの時代からあるインスタンスが改変されたバージョンであると誤認識される問題
- Fix: MFMのオートコンプリートが出るべき状況で出ないことがある問題を修正
- Fix: チャートのラベルが消えている問題を修正

View File

@ -95,7 +95,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>
<MkButton class="_button" link :to="`/notes/${appearNote.id}/reactions`" :class="[$style.reactionOmitted, { [$style.small]: defaultStore.state.reactionsDisplaySize === 'small', [$style.large]: defaultStore.state.reactionsDisplaySize === 'large' }]">{{ i18n.ts.more }}</MkButton>
</template>
</MkReactionsViewer>
<footer :class="$style.footer">
@ -162,6 +162,7 @@ import MkReactionsViewer from '@/components/MkReactionsViewer.vue';
import MkMediaList from '@/components/MkMediaList.vue';
import MkCwButton from '@/components/MkCwButton.vue';
import MkPoll from '@/components/MkPoll.vue';
import MkButton from './MkButton.vue';
import MkUsersTooltip from '@/components/MkUsersTooltip.vue';
import MkUrlPreview from '@/components/MkUrlPreview.vue';
import MkInstanceTicker from '@/components/MkInstanceTicker.vue';
@ -977,12 +978,28 @@ function emitUpdReaction(emoji: string, delta: number) {
text-align: center;
opacity: 0.7;
}
.reactionOmitted {
display: inline-block;
height: 32px;
display: inline-flex;
min-width: 0;
height: 42px;
margin: 2px;
padding: 0 6px;
opacity: .8;
border-radius: 6px;
align-items: center;
justify-content: center;
cursor: pointer;
border: dashed 1px var(--divider);
&.small {
height: 32px;
font-size: 1em;
border-radius: 4px;
}
&.large {
height: 52px;
font-size: 2em;
border-radius: 8px;
}
}
</style>

View File

@ -230,9 +230,12 @@ import MkPagination, { type Paging } from '@/components/MkPagination.vue';
import MkReactionIcon from '@/components/MkReactionIcon.vue';
import MkButton from '@/components/MkButton.vue';
const props = defineProps<{
const props = withDefaults(defineProps<{
note: Misskey.entities.Note;
}>();
initialTab: string;
}>(), {
initialTab: 'replies',
});
const inChannel = inject('inChannel', null);
@ -301,7 +304,7 @@ provide('react', (reaction: string) => {
});
});
const tab = ref('replies');
const tab = ref(props.initialTab);
const reactionTabType = ref<string | null>(null);
const renotesPagination = computed<Paging>(() => ({

View File

@ -100,6 +100,8 @@ watch([() => props.note.reactions, () => props.maxNumber], ([newSource, maxNumbe
}
.root {
display: flex;
flex-wrap: wrap;
margin: 4px -2px 0 -2px;
&:empty {

View File

@ -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>();

View File

@ -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',