1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-10-30 06:41:46 +09:00

fix(frontend): 특정 조건에서 노트 동작 버튼을 비활성화 해도 버튼이 사라지지 않음

- 노트에 답글을 작성할 수 없을 때
  - 노트를 리노트할 수 없을 때
This commit is contained in:
NoriDev 2024-10-10 14:52:05 +09:00
parent 297c0c5bdf
commit 3a6c4868e8
4 changed files with 81 additions and 66 deletions

View File

@ -48,6 +48,9 @@ Misskey의 전체 변경 사항을 확인하려면, [CHANGELOG.md#2024xx](CHANGE
- Fix: 로그인 하지 않은 사용자가 노트 내용에 포함된 이모지를 누르면 이모지 복사 및 리액션 메뉴에 접근할 수 있음
- Fix: 모바일 환경에서 노트 작성 폼의 미리보기 디자인이 잘못 표시될 수 있음
- Fix: 리버시에서 커스텀 이모지를 리액션으로 보낼 수 없음
- Fix: 특정 조건에서 노트 동작 버튼을 비활성화 해도 버튼이 사라지지 않음
- 노트에 답글을 작성할 수 없을 때
- 노트를 리노트할 수 없을 때
---

View File

@ -149,15 +149,18 @@ SPDX-License-Identifier: AGPL-3.0-only
</template>
</MkReactionsViewer>
<footer :class="$style.footer">
<button v-if="!note.isHidden && defaultStore.state.showReplyButtonInNoteFooter" v-vibrate="defaultStore.state.vibrateSystem ? 5 : []" v-tooltip="i18n.ts.reply" :class="$style.footerButton" class="_button" @click.stop="reply()">
<template v-if="defaultStore.state.showReplyButtonInNoteFooter">
<button v-if="!note.isHidden" v-vibrate="defaultStore.state.vibrateSystem ? 5 : []" v-tooltip="i18n.ts.reply" :class="$style.footerButton" class="_button" @click.stop="reply()">
<i class="ti ti-arrow-back-up"></i>
<p v-if="appearNote.repliesCount > 0" :class="$style.footerButtonCount">{{ number(appearNote.repliesCount) }}</p>
</button>
<button v-else-if="note.isHidden" :class="$style.footerButton" class="_button" disabled>
<i class="ti ti-ban"></i>
</button>
</template>
<template v-if="defaultStore.state.showRenoteButtonInNoteFooter">
<button
v-if="canRenote && defaultStore.state.showRenoteButtonInNoteFooter"
v-if="canRenote"
ref="renoteButton"
v-vibrate="defaultStore.state.vibrateSystem ? [30, 30, 60] : []"
v-tooltip="i18n.ts.renote"
@ -171,6 +174,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<button v-else-if="!canRenote" :class="$style.footerButton" class="_button" disabled>
<i class="ti ti-ban"></i>
</button>
</template>
<button v-if="appearNote.reactionAcceptance !== 'likeOnly' && appearNote.myReaction == null && defaultStore.state.showLikeButtonInNoteFooter" ref="heartReactButton" v-vibrate="defaultStore.state.vibrateSystem ? [30, 50, 50] : []" v-tooltip="i18n.ts.like" :class="$style.footerButton" class="_button" @click.stop="heartReact()">
<i class="ti ti-heart"></i>
</button>

View File

@ -164,15 +164,18 @@ SPDX-License-Identifier: AGPL-3.0-only
</MkA>
</div>
<MkReactionsViewer v-if="appearNote.reactionAcceptance !== 'likeOnly'" ref="reactionsViewer" :note="appearNote"/>
<button v-if="!note.isHidden && defaultStore.state.showReplyButtonInNoteFooter" v-vibrate="defaultStore.state.vibrateSystem ? 5 : []" v-tooltip="i18n.ts.reply" class="_button" :class="$style.noteFooterButton" @click="reply()">
<template v-if="defaultStore.state.showReplyButtonInNoteFooter">
<button v-if="!note.isHidden" v-vibrate="defaultStore.state.vibrateSystem ? 5 : []" v-tooltip="i18n.ts.reply" class="_button" :class="$style.noteFooterButton" @click="reply()">
<i class="ti ti-arrow-back-up"></i>
<p v-if="appearNote.repliesCount > 0" :class="$style.noteFooterButtonCount">{{ number(appearNote.repliesCount) }}</p>
</button>
<button v-else-if="note.isHidden" class="_button" :class="$style.noteFooterButton" disabled>
<i class="ti ti-ban"></i>
</button>
</template>
<template v-if="defaultStore.state.showRenoteButtonInNoteFooter">
<button
v-if="canRenote && defaultStore.state.showRenoteButtonInNoteFooter"
v-if="canRenote"
ref="renoteButton"
v-vibrate="defaultStore.state.vibrateSystem ? [30, 30, 60] : []"
v-tooltip="i18n.ts.renote"
@ -186,6 +189,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<button v-else-if="!canRenote" class="_button" :class="$style.noteFooterButton" disabled>
<i class="ti ti-ban"></i>
</button>
</template>
<button v-if="appearNote.reactionAcceptance !== 'likeOnly' && appearNote.myReaction == null && defaultStore.state.showLikeButtonInNoteFooter" ref="heartReactButton" v-vibrate="defaultStore.state.vibrateSystem ? [30, 50, 50] : []" v-tooltip="i18n.ts.like" :class="$style.noteFooterButton" class="_button" @click="heartReact()">
<i class="ti ti-heart"></i>
</button>

View File

@ -74,15 +74,18 @@ SPDX-License-Identifier: AGPL-3.0-only
</template>
</MkReactionsViewer>
<footer :class="$style.footer">
<button v-if="!note.isHidden && defaultStore.state.showReplyButtonInNoteFooter" v-vibrate="defaultStore.state.vibrateSystem ? 5 : []" v-tooltip="i18n.ts.reply" :class="$style.footerButton" class="_button" @click.stop="reply()">
<template v-if="defaultStore.state.showReplyButtonInNoteFooter">
<button v-if="!note.isHidden" v-vibrate="defaultStore.state.vibrateSystem ? 5 : []" v-tooltip="i18n.ts.reply" :class="$style.footerButton" class="_button" @click.stop="reply()">
<i class="ti ti-arrow-back-up"></i>
<p v-if="note.repliesCount > 0" :class="$style.footerButtonCount">{{ note.repliesCount }}</p>
</button>
<button v-else-if="note.isHidden" :class="$style.footerButton" class="_button" disabled>
<i class="ti ti-ban"></i>
</button>
</template>
<template v-if="defaultStore.state.showRenoteButtonInNoteFooter">
<button
v-if="canRenote && defaultStore.state.showRenoteButtonInNoteFooter"
v-if="canRenote"
ref="renoteButton"
v-vibrate="defaultStore.state.vibrateSystem ? [30, 50, 60] : []"
v-tooltip="i18n.ts.renote"
@ -96,6 +99,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<button v-else-if="!canRenote" :class="$style.footerButton" class="_button" disabled>
<i class="ti ti-ban"></i>
</button>
</template>
<button v-if="note.reactionAcceptance !== 'likeOnly' && note.myReaction == null && defaultStore.state.showLikeButtonInNoteFooter" ref="heartReactButton" v-vibrate="defaultStore.state.vibrateSystem ? [30, 50, 50] : []" v-tooltip="i18n.ts.like" :class="$style.footerButton" class="_button" @click.stop="heartReact()">
<i class="ti ti-heart"></i>
</button>