From ce6b2448ced1101a4f0f8eeeb0d48378d40f696a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=8B=E3=81=A3=E3=81=93=E3=81=8B=E3=82=8A?= <67428053+kakkokari-gtyih@users.noreply.github.com> Date: Sun, 16 Mar 2025 14:05:58 +0900 Subject: [PATCH] =?UTF-8?q?enhance(frontend):=20=E6=8A=95=E7=A8=BF?= =?UTF-8?q?=E3=83=95=E3=82=A9=E3=83=BC=E3=83=A0=E3=81=AE=E8=A8=AD=E5=AE=9A?= =?UTF-8?q?=E3=83=A1=E3=83=8B=E3=83=A5=E3=83=BC=E3=82=92=E6=94=B9=E8=89=AF?= =?UTF-8?q?=20(#14804)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * enhance(frontend): 投稿フォームの設定メニューを改良 * Update Changelog * indent * MkMenuのitemを切り出して共通化 * remove unused expose * fix: ドロワーなどのOptionが当たらない問題を修正 * 他のpopupMenuの項目選択時と挙動をあわせる * チュートリアルで詰む問題を修正 * Revert "MkMenuのitemを切り出して共通化" This reverts commit ce3679798c5b642dd0e47056f70657e46b382b5e. * enhance: slotで共通化 * Update MkPostFormOtherMenu.vue * remove duplicated locale key * refactor: メニューの定義をMkPostForm側で行うように * Update CHANGELOG.md * [ci skip] Update MkPostFormOtherMenu.vue * Update MkPostForm.vue * Update CHANGELOG.md --------- Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com> --- CHANGELOG.md | 3 + locales/index.d.ts | 4 + locales/ja-JP.yml | 1 + packages/frontend/src/components/MkMenu.vue | 333 +++++++++--------- .../frontend/src/components/MkPostForm.vue | 53 ++- .../src/components/MkPostFormOtherMenu.vue | 128 +++++++ packages/frontend/src/filters/number.ts | 2 +- packages/frontend/src/style.scss | 4 + 8 files changed, 360 insertions(+), 168 deletions(-) create mode 100644 packages/frontend/src/components/MkPostFormOtherMenu.vue diff --git a/CHANGELOG.md b/CHANGELOG.md index b6fcbba1b5..cd8027b050 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,9 @@ - Enhance: CWの注釈テキストが入力されていない場合, Postボタンを非アクティブに - Enhance: CWを無効にした場合, 注釈テキストが最大入力文字数を超えていても投稿できるように - Enhance: テーマ設定画面のデザインを改善 +- Enhance: 投稿フォームの設定メニューを改良 + - 投稿フォームをリセットできるように + - 文字数カウントを復活 - Fix: テーマ切り替え時に一部の色が変わらない問題を修正 ### Server diff --git a/locales/index.d.ts b/locales/index.d.ts index c9f67c8110..3b56563149 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -5346,6 +5346,10 @@ export interface Locale extends ILocale { * 投稿フォーム */ "postForm": string; + /** + * 文字数 + */ + "textCount": string; "_emojiPalette": { /** * パレット diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 605aab919d..ad96549160 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1332,6 +1332,7 @@ preferenceSyncConflictChoiceCancel: "同期の有効化をキャンセル" paste: "ペースト" emojiPalette: "絵文字パレット" postForm: "投稿フォーム" +textCount: "文字数" _emojiPalette: palettes: "パレット" diff --git a/packages/frontend/src/components/MkMenu.vue b/packages/frontend/src/components/MkMenu.vue index aa53c19c33..954cfa58be 100644 --- a/packages/frontend/src/components/MkMenu.vue +++ b/packages/frontend/src/components/MkMenu.vue @@ -15,9 +15,6 @@ SPDX-License-Identifier: AGPL-3.0-only @focusin.passive.stop="() => {}" >
{}" @contextmenu.self.prevent="() => {}" > - - - {{ i18n.ts.none }} - +
+
@@ -429,7 +435,7 @@ onBeforeUnmount(() => { .root { &.center { > .menu { - > .item { + .item { text-align: center; } } @@ -439,7 +445,7 @@ onBeforeUnmount(() => { > .menu { min-width: 230px; - > .item { + .item { padding: 6px 20px; font-size: 0.95em; line-height: 24px; @@ -452,36 +458,38 @@ onBeforeUnmount(() => { margin: auto; > .menu { - padding: 12px 0 max(env(safe-area-inset-bottom, 0px), 12px) 0; width: 100%; border-radius: 24px; border-bottom-right-radius: 0; border-bottom-left-radius: 0; - > .item { - font-size: 1em; - padding: 12px 24px; + > .menuItems { + padding: 12px 0 max(env(safe-area-inset-bottom, 0px), 12px) 0; - &::before { - width: calc(100% - 24px); - border-radius: 12px; + > .item { + font-size: 1em; + padding: 12px 24px; + + &::before { + width: calc(100% - 24px); + border-radius: 12px; + } + + > .icon { + margin-right: 14px; + width: 24px; + } } - > .icon { - margin-right: 14px; - width: 24px; + > .divider { + margin: 12px 0; } } - - > .divider { - margin: 12px 0; - } } } } .menu { - padding: 8px 0; box-sizing: border-box; max-width: 100vw; min-width: 200px; @@ -493,6 +501,11 @@ onBeforeUnmount(() => { } } +.menuItems { + padding: 8px 0; + box-sizing: border-box; +} + .item { display: flex; align-items: center; diff --git a/packages/frontend/src/components/MkPostForm.vue b/packages/frontend/src/components/MkPostForm.vue index d57300f647..e31c33149f 100644 --- a/packages/frontend/src/components/MkPostForm.vue +++ b/packages/frontend/src/components/MkPostForm.vue @@ -20,7 +20,7 @@ SPDX-License-Identifier: AGPL-3.0-only
- - +