From 607bf60007f36a22def49df533750d2bfc834362 Mon Sep 17 00:00:00 2001 From: anatawa12 Date: Fri, 7 Feb 2025 15:57:14 +0900 Subject: enhance(frontend): アンテナ、リスト等の名前をdeckのカラム名のデフォルト値にするように (#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> --- packages/frontend/src/os.ts | 15 +++++++++++++++ packages/frontend/src/ui/deck.vue | 2 +- packages/frontend/src/ui/deck/antenna-column.vue | 10 +++++++++- packages/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 ++++++++++---- packages/frontend/src/ui/deck/direct-column.vue | 3 ++- packages/frontend/src/ui/deck/list-column.vue | 20 +++++++++++++++----- packages/frontend/src/ui/deck/mentions-column.vue | 3 ++- .../frontend/src/ui/deck/notifications-column.vue | 2 +- .../frontend/src/ui/deck/role-timeline-column.vue | 12 ++++++++++-- packages/frontend/src/ui/deck/tl-column.vue | 2 +- packages/frontend/src/ui/deck/widgets-column.vue | 2 +- 13 files changed, 84 insertions(+), 25 deletions(-) (limited to 'packages/frontend') 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