From 607bf60007f36a22def49df533750d2bfc834362 Mon Sep 17 00:00:00 2001 From: anatawa12 Date: Fri, 7 Feb 2025 15:57:14 +0900 Subject: [PATCH] =?UTF-8?q?enhance(frontend):=20=E3=82=A2=E3=83=B3?= =?UTF-8?q?=E3=83=86=E3=83=8A=E3=80=81=E3=83=AA=E3=82=B9=E3=83=88=E7=AD=89?= =?UTF-8?q?=E3=81=AE=E5=90=8D=E5=89=8D=E3=82=92deck=E3=81=AE=E3=82=AB?= =?UTF-8?q?=E3=83=A9=E3=83=A0=E5=90=8D=E3=81=AE=E3=83=87=E3=83=95=E3=82=A9?= =?UTF-8?q?=E3=83=AB=E3=83=88=E5=80=A4=E3=81=AB=E3=81=99=E3=82=8B=E3=82=88?= =?UTF-8?q?=E3=81=86=E3=81=AB=20(#13992)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * refactor: remove type errors from deck.vue and deck-store.ts * feat: アンテナ、リスト等の名前をカラム名のデフォルト値にするように * docs: アンテナ、リスト等の名前をカラム名のデフォルト値にするように * lint: fix * chore: カラム名が指定されている場合にはチャンネル名を取得しないように * chore: チャンネルについては投稿でも使用されてる channel 変数を使用するように * docs: fix changelog --------- Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com> Co-authored-by: Sayamame-beans <61457993+Sayamame-beans@users.noreply.github.com> Co-authored-by: かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com> --- CHANGELOG.md | 1 + packages/frontend/src/os.ts | 15 ++++++++++++++ packages/frontend/src/ui/deck.vue | 2 +- .../frontend/src/ui/deck/antenna-column.vue | 10 +++++++++- .../frontend/src/ui/deck/channel-column.vue | 19 +++++++++++++----- packages/frontend/src/ui/deck/column.vue | 5 +++-- packages/frontend/src/ui/deck/deck-store.ts | 14 +++++++++---- .../frontend/src/ui/deck/direct-column.vue | 3 ++- packages/frontend/src/ui/deck/list-column.vue | 20 ++++++++++++++----- .../frontend/src/ui/deck/mentions-column.vue | 3 ++- .../src/ui/deck/notifications-column.vue | 2 +- .../src/ui/deck/role-timeline-column.vue | 12 +++++++++-- packages/frontend/src/ui/deck/tl-column.vue | 2 +- .../frontend/src/ui/deck/widgets-column.vue | 2 +- 14 files changed, 85 insertions(+), 25 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a4772362f..596bd62be9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ### Client - Enhance: 投稿フォームの「迷惑になる可能性があります」のダイアログを表示する条件においてCWを考慮するように +- Enhance: アンテナ、リスト等の名前をカラム名のデフォルト値にするように `#13992` ### Server - diff --git a/packages/frontend/src/os.ts b/packages/frontend/src/os.ts index 69cc62ad6e..6e48366092 100644 --- a/packages/frontend/src/os.ts +++ b/packages/frontend/src/os.ts @@ -310,6 +310,21 @@ export function inputText(props: { } | { canceled: false; result: string; }>; +// min lengthが指定されてたら result は null になり得ないことを保証する overload function +export function inputText(props: { + type?: 'text' | 'email' | 'password' | 'url'; + title?: string; + text?: string; + placeholder?: string | null; + autocomplete?: string; + default?: string; + minLength: number; + maxLength?: number; +}): Promise<{ + canceled: true; result: undefined; +} | { + canceled: false; result: string; +}>; export function inputText(props: { type?: 'text' | 'email' | 'password' | 'url'; title?: string; diff --git a/packages/frontend/src/ui/deck.vue b/packages/frontend/src/ui/deck.vue index 71a18fbc66..8e99c457ad 100644 --- a/packages/frontend/src/ui/deck.vue +++ b/packages/frontend/src/ui/deck.vue @@ -188,7 +188,7 @@ const addColumn = async (ev) => { addColumnToStore({ type: column, id: uuid(), - name: i18n.ts._deck._columns[column], + name: null, width: 330, soundSetting: { type: null, volume: 1 }, }); diff --git a/packages/frontend/src/ui/deck/antenna-column.vue b/packages/frontend/src/ui/deck/antenna-column.vue index 07ae17b982..b79cd8408b 100644 --- a/packages/frontend/src/ui/deck/antenna-column.vue +++ b/packages/frontend/src/ui/deck/antenna-column.vue @@ -6,7 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only