1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-11-30 15:58:19 +09:00

feat: 답글 대상 노트의 반투명 옵션을 선택할 수 있음 (kokonect-link/cherrypick#495)

This commit is contained in:
NoriDev 2024-10-01 21:55:43 +09:00
parent e4b2da4fb8
commit 3155f3be56
10 changed files with 31 additions and 6 deletions

View File

@ -38,6 +38,7 @@ Misskey의 전체 변경 사항을 확인하려면, [CHANGELOG.md#2024xx](CHANGE
- Feat: 사용자 메뉴에서 원격 서버를 관리할 수 있음 (kokonect-link/cherrypick#502) - Feat: 사용자 메뉴에서 원격 서버를 관리할 수 있음 (kokonect-link/cherrypick#502)
- 서버 차단, 서버 사일런스, 서버 미디어 사일런스 - 서버 차단, 서버 사일런스, 서버 미디어 사일런스
- Feat: 노트 동작 버튼을 개인화할 수 있음 (kokonect-link/cherrypick#501) - Feat: 노트 동작 버튼을 개인화할 수 있음 (kokonect-link/cherrypick#501)
- Feat: 답글 대상 노트의 반투명 옵션을 선택할 수 있음 (kokonect-link/cherrypick#495)
- Enhance: CherryPick 업데이트 페이지를 제어판 목록에 추가함 - Enhance: CherryPick 업데이트 페이지를 제어판 목록에 추가함
- Enhance: Webhook 추가 버튼을 헤더로 이동해 디자인 개선 - Enhance: Webhook 추가 버튼을 헤더로 이동해 디자인 개선
- Enhance: 노트 번역 영역에서도 이모지를 눌러 이모지 메뉴를 열 수 있음 - Enhance: 노트 번역 영역에서도 이모지를 눌러 이모지 메뉴를 열 수 있음

View File

@ -1,5 +1,6 @@
--- ---
_lang_: "English" _lang_: "English"
showReplyTargetNoteInSemiTransparent: "Show reply target note in semi-transparent"
noteFooterButton: "Show action buttons in notes" noteFooterButton: "Show action buttons in notes"
collapseReplies: "Collapse notes written in reply" collapseReplies: "Collapse notes written in reply"
collapseRepliesDescription: "Collapse and displays notes written as replies.\nReacted notes are not affected." collapseRepliesDescription: "Collapse and displays notes written as replies.\nReacted notes are not affected."

4
locales/index.d.ts vendored
View File

@ -13,6 +13,10 @@ export interface Locale extends ILocale {
* *
*/ */
"_lang_": string; "_lang_": string;
/**
*
*/
"showReplyTargetNoteInSemiTransparent": string;
/** /**
* *
*/ */

View File

@ -1,5 +1,6 @@
_lang_: "日本語" _lang_: "日本語"
showReplyTargetNoteInSemiTransparent: "返信対象ノートを半透明に表示"
noteFooterButton: "ノートにアクションボタンを表示" noteFooterButton: "ノートにアクションボタンを表示"
collapseReplies: "返信のリノートのスマート省略" collapseReplies: "返信のリノートのスマート省略"
collapseRepliesDescription: "返信で作成されたノートをたたんで表示します。\nリアクションしたートは影響を受けません。" collapseRepliesDescription: "返信で作成されたノートをたたんで表示します。\nリアクションしたートは影響を受けません。"

View File

@ -1,5 +1,6 @@
--- ---
_lang_: "한국어" _lang_: "한국어"
showReplyTargetNoteInSemiTransparent: "답글 대상 노트를 반투명하게 표시"
noteFooterButton: "노트 동작 버튼" noteFooterButton: "노트 동작 버튼"
collapseReplies: "답글로 작성된 노트 간략화하기" collapseReplies: "답글로 작성된 노트 간략화하기"
collapseRepliesDescription: "답글로 작성된 노트를 접어서 표시해요.\n리액션한 노트는 영향을 받지 않아요." collapseRepliesDescription: "답글로 작성된 노트를 접어서 표시해요.\n리액션한 노트는 영향을 받지 않아요."

View File

@ -52,10 +52,10 @@ SPDX-License-Identifier: AGPL-3.0-only
</div> </div>
</div> </div>
<MkNoteSub v-if="appearNote.reply && !renoteCollapsed && !replyCollapsed && notification && defaultStore.state.showReplyInNotification" :note="appearNote.reply" :class="$style.replyTo"/> <MkNoteSub v-if="appearNote.reply && !renoteCollapsed && !replyCollapsed && notification && defaultStore.state.showReplyInNotification" :note="appearNote.reply" :class="$style.replyTo"/>
<MkNoteSub v-else-if="appearNote.reply && !renoteCollapsed && !replyCollapsed && !notification" :note="appearNote.reply" :class="$style.replyTo"/> <MkNoteSub v-else-if="appearNote.reply && !renoteCollapsed && !replyCollapsed && !notification" :note="appearNote.reply" :class="[$style.replyTo, { [$style.showReplyTargetNoteInSemiTransparent]: defaultStore.state.showReplyTargetNoteInSemiTransparent }]"/>
<div v-if="renoteCollapsed || replyCollapsed" :class="$style.collapsedRenoteTarget"> <div v-if="renoteCollapsed || replyCollapsed" :class="$style.collapsedRenoteTarget">
<MkAvatar v-if="!defaultStore.state.hideAvatarsInNote" :class="$style.collapsedRenoteTargetAvatar" :user="appearNote.user" link preview/> <MkAvatar v-if="!defaultStore.state.hideAvatarsInNote" :class="$style.collapsedRenoteTargetAvatar" :user="appearNote.user" link preview/>
<Mfm :text="getNoteSummary(appearNote)" :plain="true" :nowrap="true" :author="appearNote.user" :nyaize="'respect'" :class="$style.collapsedRenoteTargetText" @click="renoteCollapsed ? renoteCollapsed = false : replyCollapsed ? replyCollapsed = false : ''"/> <Mfm :text="getNoteSummary(appearNote)" :plain="true" :nowrap="true" :author="appearNote.user" :nyaize="'respect'" :class="[$style.collapsedRenoteTargetText, { [$style.showReplyTargetNoteInSemiTransparent]: defaultStore.state.showReplyTargetNoteInSemiTransparent }]" @click="renoteCollapsed ? renoteCollapsed = false : replyCollapsed ? replyCollapsed = false : ''"/>
</div> </div>
<article v-else :class="$style.article" :style="{ cursor: expandOnNoteClick ? 'pointer' : '', paddingTop: defaultStore.state.showSubNoteFooterButton && appearNote.reply && (!renoteCollapsed && !replyCollapsed) ? '14px' : '' }" @click.stop="noteClick" @dblclick.stop="noteDblClick" @contextmenu.stop="onContextmenu"> <article v-else :class="$style.article" :style="{ cursor: expandOnNoteClick ? 'pointer' : '', paddingTop: defaultStore.state.showSubNoteFooterButton && appearNote.reply && (!renoteCollapsed && !replyCollapsed) ? '14px' : '' }" @click.stop="noteClick" @dblclick.stop="noteDblClick" @contextmenu.stop="onContextmenu">
<div style="display: flex; padding-bottom: 10px;"> <div style="display: flex; padding-bottom: 10px;">
@ -925,8 +925,11 @@ function emitUpdReaction(emoji: string, delta: number) {
} }
.replyTo { .replyTo {
opacity: 0.7;
padding-bottom: 0; padding-bottom: 0;
&.showReplyTargetNoteInSemiTransparent {
opacity: 0.7;
}
} }
.renote { .renote {
@ -1010,12 +1013,15 @@ function emitUpdReaction(emoji: string, delta: number) {
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
font-size: 90%; font-size: 90%;
opacity: 0.7;
cursor: pointer; cursor: pointer;
&:hover { &:hover {
text-decoration: underline; text-decoration: underline;
} }
&.showReplyTargetNoteInSemiTransparent {
opacity: 0.7;
}
} }
.article { .article {

View File

@ -48,7 +48,7 @@ SPDX-License-Identifier: AGPL-3.0-only
</div> </div>
</div> </div>
<template v-if="appearNote.reply && appearNote.reply.replyId"><MkNoteSub v-for="note in conversation" :key="note.id" :class="$style.replyToMore" :note="note"/></template> <template v-if="appearNote.reply && appearNote.reply.replyId"><MkNoteSub v-for="note in conversation" :key="note.id" :class="$style.replyToMore" :note="note"/></template>
<MkNoteSub v-if="appearNote.reply" :note="appearNote.reply" :class="$style.replyTo"/> <MkNoteSub v-if="appearNote.reply" :note="appearNote.reply" :class="[$style.replyTo, { [$style.showReplyTargetNoteInSemiTransparent]: defaultStore.state.showReplyTargetNoteInSemiTransparent }]"/>
<article :class="$style.note" :style="{ paddingTop: defaultStore.state.showSubNoteFooterButton && appearNote.reply ? '14px' : '' }" @contextmenu.stop="onContextmenu"> <article :class="$style.note" :style="{ paddingTop: defaultStore.state.showSubNoteFooterButton && appearNote.reply ? '14px' : '' }" @contextmenu.stop="onContextmenu">
<header :class="$style.noteHeader"> <header :class="$style.noteHeader">
<MkAvatar v-if="!defaultStore.state.hideAvatarsInNote" :class="$style.noteHeaderAvatar" :user="appearNote.user" indicator link preview/> <MkAvatar v-if="!defaultStore.state.hideAvatarsInNote" :class="$style.noteHeaderAvatar" :user="appearNote.user" indicator link preview/>
@ -800,8 +800,11 @@ onMounted(() => {
} }
.replyTo { .replyTo {
opacity: 0.7;
padding-bottom: 0; padding-bottom: 0;
&.showReplyTargetNoteInSemiTransparent {
opacity: 0.7;
}
} }
.replyToMore { .replyToMore {

View File

@ -96,6 +96,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<MkSwitch v-model="showFixedPostFormInReplies">{{ i18n.ts.showFixedPostFormInReplies }}<template #caption>{{ i18n.ts.showFixedPostFormInRepliesDescription }}</template> <span class="_beta">CherryPick</span></MkSwitch> <MkSwitch v-model="showFixedPostFormInReplies">{{ i18n.ts.showFixedPostFormInReplies }}<template #caption>{{ i18n.ts.showFixedPostFormInRepliesDescription }}</template> <span class="_beta">CherryPick</span></MkSwitch>
<MkSwitch v-model="allMediaNoteCollapse">{{ i18n.ts.allMediaNoteCollapse }} <span class="_beta">CherryPick</span></MkSwitch> <MkSwitch v-model="allMediaNoteCollapse">{{ i18n.ts.allMediaNoteCollapse }} <span class="_beta">CherryPick</span></MkSwitch>
<MkSwitch v-model="alwaysShowCw">{{ i18n.ts.alwaysShowCw }} <span class="_beta">CherryPick</span></MkSwitch> <MkSwitch v-model="alwaysShowCw">{{ i18n.ts.alwaysShowCw }} <span class="_beta">CherryPick</span></MkSwitch>
<MkSwitch v-model="showReplyTargetNoteInSemiTransparent">{{ i18n.ts.showReplyTargetNoteInSemiTransparent }} <span class="_beta">CherryPick</span></MkSwitch>
</div> </div>
<div class="_gaps_s" style="margin: 0 10px;"> <div class="_gaps_s" style="margin: 0 10px;">
@ -483,6 +484,7 @@ const showFixedPostFormInReplies = computed(defaultStore.makeGetterSetter('showF
const showingAnimatedImages = computed(defaultStore.makeGetterSetter('showingAnimatedImages')); const showingAnimatedImages = computed(defaultStore.makeGetterSetter('showingAnimatedImages'));
const allMediaNoteCollapse = computed(defaultStore.makeGetterSetter('allMediaNoteCollapse')); const allMediaNoteCollapse = computed(defaultStore.makeGetterSetter('allMediaNoteCollapse'));
const alwaysShowCw = computed(defaultStore.makeGetterSetter('alwaysShowCw')); const alwaysShowCw = computed(defaultStore.makeGetterSetter('alwaysShowCw'));
const showReplyTargetNoteInSemiTransparent = computed(defaultStore.makeGetterSetter('showReplyTargetNoteInSemiTransparent'));
const nsfwOpenBehavior = computed(defaultStore.makeGetterSetter('nsfwOpenBehavior')); const nsfwOpenBehavior = computed(defaultStore.makeGetterSetter('nsfwOpenBehavior'));
const renoteVisibilitySelection = computed(defaultStore.makeGetterSetter('renoteVisibilitySelection')); const renoteVisibilitySelection = computed(defaultStore.makeGetterSetter('renoteVisibilitySelection'));
const forceRenoteVisibilitySelection = computed(defaultStore.makeGetterSetter('forceRenoteVisibilitySelection')); const forceRenoteVisibilitySelection = computed(defaultStore.makeGetterSetter('forceRenoteVisibilitySelection'));
@ -568,6 +570,7 @@ watch([
renoteQuoteButtonSeparation, renoteQuoteButtonSeparation,
allMediaNoteCollapse, allMediaNoteCollapse,
alwaysShowCw, alwaysShowCw,
showReplyTargetNoteInSemiTransparent,
showReplyButtonInNoteFooter, showReplyButtonInNoteFooter,
showRenoteButtonInNoteFooter, showRenoteButtonInNoteFooter,
showLikeButtonInNoteFooter, showLikeButtonInNoteFooter,

View File

@ -148,6 +148,7 @@ const defaultStoreSaveKeys: (keyof typeof defaultStore['state'])[] = [
'showFixedPostFormInReplies', 'showFixedPostFormInReplies',
'allMediaNoteCollapse', 'allMediaNoteCollapse',
'alwaysShowCw', 'alwaysShowCw',
'showReplyTargetNoteInSemiTransparent',
'nsfwOpenBehavior', 'nsfwOpenBehavior',
'removeModalBgColorForBlur', 'removeModalBgColorForBlur',
'nicknameEnabled', 'nicknameEnabled',

View File

@ -610,6 +610,10 @@ export const defaultStore = markRaw(new Storage('base', {
where: 'device', where: 'device',
default: false, default: false,
}, },
showReplyTargetNoteInSemiTransparent: {
where: 'device',
default: true,
},
nsfwOpenBehavior: { nsfwOpenBehavior: {
where: 'device', where: 'device',
default: 'click' as 'click' | 'doubleClick', default: 'click' as 'click' | 'doubleClick',