From 295665a177985e1f7c460e1de23b3d8a96afb2b0 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 10 Sep 2023 17:16:50 +0900 Subject: [PATCH] =?UTF-8?q?enhance(frontend):=20=E3=83=AA=E3=82=A2?= =?UTF-8?q?=E3=82=AF=E3=82=B7=E3=83=A7=E3=83=B3=E3=81=AE=E8=A1=A8=E7=A4=BA?= =?UTF-8?q?=E3=82=B5=E3=82=A4=E3=82=BA=E3=82=92=E3=82=88=E3=82=8A=E5=A4=A7?= =?UTF-8?q?=E3=81=8D=E3=81=8F=E3=81=A7=E3=81=8D=E3=82=8B=E3=82=88=E3=81=86?= =?UTF-8?q?=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 3 +- locales/index.d.ts | 2 +- locales/ja-JP.yml | 2 +- .../components/MkReactionsViewer.reaction.vue | 34 +++++++++++++------ .../frontend/src/pages/settings/general.vue | 10 ++++-- packages/frontend/src/store.ts | 4 +-- 6 files changed, 37 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b9ef0d35..ef5b55d8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,7 +30,6 @@ - メニューのスイッチの動作を改善 - 絵文字ピッカーの検索の表示件数を100件に増加 - 投稿フォームのプレビューの表示状態を記憶するように -- ノート詳細ページ読み込み時のパフォーマンスを改善 - AiScriptからMisskeyサーバーAPIを呼び出す際の制限を撤廃 - Playで直接投稿フォームを埋め込めるように(`Ui:C:postForm`) - Enhance: ユーザーメニューでスイッチでユーザーリストに追加・削除できるように @@ -41,6 +40,8 @@ - Enhance: Renoteを管理者権限で削除可能に - `$[rainbow ]`記法が、動きのあるMFMが無効になっていても使用できるようになりました - Playの操作を行うAPI TokenをAPIコンソールから発行できるように +- リアクションの表示サイズをより大きくできるように +- ノート詳細ページ読み込み時のパフォーマンスを改善 - Fix: サーバー情報画面(`/instance-info/{domain}`)でブロックができないのを修正 - Fix: 未読のお知らせの「わかった」をクリック・タップしてもその場で「わかった」が消えない問題を修正 - Fix: iOSで画面を回転させるとテキストサイズが変わる問題を修正 diff --git a/locales/index.d.ts b/locales/index.d.ts index 858736be6..771d5cf87 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -1026,7 +1026,7 @@ export interface Locale { "enableChartsForRemoteUser": string; "enableChartsForFederatedInstances": string; "showClipButtonInNoteFooter": string; - "largeNoteReactions": string; + "reactionsDisplaySize": string; "noteIdOrUrl": string; "video": string; "videos": string; diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 7e625b9ac..2b2cad8d7 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1023,7 +1023,7 @@ retryAllQueuesConfirmText: "一時的にサーバーの負荷が増大するこ enableChartsForRemoteUser: "リモートユーザーのチャートを生成" enableChartsForFederatedInstances: "リモートサーバーのチャートを生成" showClipButtonInNoteFooter: "ノートのアクションにクリップを追加" -largeNoteReactions: "ノートのリアクションを大きく表示" +reactionsDisplaySize: "リアクションの表示サイズ" noteIdOrUrl: "ノートIDまたはURL" video: "動画" videos: "動画" diff --git a/packages/frontend/src/components/MkReactionsViewer.reaction.vue b/packages/frontend/src/components/MkReactionsViewer.reaction.vue index 2bc88907a..7da579012 100644 --- a/packages/frontend/src/components/MkReactionsViewer.reaction.vue +++ b/packages/frontend/src/components/MkReactionsViewer.reaction.vue @@ -8,7 +8,7 @@ SPDX-License-Identifier: AGPL-3.0-only ref="buttonEl" v-ripple="canToggle" class="_button" - :class="[$style.root, { [$style.reacted]: note.myReaction == reaction, [$style.canToggle]: canToggle, [$style.large]: defaultStore.state.largeNoteReactions }]" + :class="[$style.root, { [$style.reacted]: note.myReaction == reaction, [$style.canToggle]: canToggle, [$style.small]: defaultStore.state.reactionsDisplaySize === 'small', [$style.large]: defaultStore.state.reactionsDisplaySize === 'large' }]" @click="toggleReaction()" > @@ -115,10 +115,11 @@ useTooltip(buttonEl, async (showing) => { diff --git a/packages/frontend/src/pages/settings/general.vue b/packages/frontend/src/pages/settings/general.vue index 3b39a5c00..85a3a2e2e 100644 --- a/packages/frontend/src/pages/settings/general.vue +++ b/packages/frontend/src/pages/settings/general.vue @@ -40,13 +40,18 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ i18n.ts.showNoteActionsOnlyHover }} {{ i18n.ts.showClipButtonInNoteFooter }} - {{ i18n.ts.largeNoteReactions }} {{ i18n.ts.collapseRenotes }} {{ i18n.ts.enableAdvancedMfm }} {{ i18n.ts.enableAnimatedMfm }} {{ i18n.ts.showGapBetweenNotesInTimeline }} {{ i18n.ts.loadRawImages }} {{ i18n.ts.useReactionPickerForContextMenu }} + + + + + +
@@ -204,7 +209,7 @@ const overridedDeviceKind = computed(defaultStore.makeGetterSetter('overridedDev const serverDisconnectedBehavior = computed(defaultStore.makeGetterSetter('serverDisconnectedBehavior')); const showNoteActionsOnlyHover = computed(defaultStore.makeGetterSetter('showNoteActionsOnlyHover')); const showClipButtonInNoteFooter = computed(defaultStore.makeGetterSetter('showClipButtonInNoteFooter')); -const largeNoteReactions = computed(defaultStore.makeGetterSetter('largeNoteReactions')); +const reactionsDisplaySize = computed(defaultStore.makeGetterSetter('reactionsDisplaySize')); const collapseRenotes = computed(defaultStore.makeGetterSetter('collapseRenotes')); const reduceAnimation = computed(defaultStore.makeGetterSetter('animation', v => !v, v => !v)); const useBlurEffectForModal = computed(defaultStore.makeGetterSetter('useBlurEffectForModal')); @@ -264,6 +269,7 @@ watch([ instanceTicker, overridedDeviceKind, mediaListWithOneImageAppearance, + reactionsDisplaySize, ], async () => { await reloadAsk(); }); diff --git a/packages/frontend/src/store.ts b/packages/frontend/src/store.ts index 2b7a16b6b..787a584f8 100644 --- a/packages/frontend/src/store.ts +++ b/packages/frontend/src/store.ts @@ -316,9 +316,9 @@ export const defaultStore = markRaw(new Storage('base', { where: 'device', default: false, }, - largeNoteReactions: { + reactionsDisplaySize: { where: 'device', - default: false, + default: 'medium' as 'small' | 'medium' | 'large', }, forceShowAds: { where: 'device',