From e5c339b86a06da9f573e17397017748737c91e44 Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 29 Sep 2023 16:56:17 +0900 Subject: enhance(frontend): タイムラインでファイルが添付されたノートのみ表示するオプションを追加 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/frontend/src/ui/deck/deck-store.ts | 1 + packages/frontend/src/ui/deck/tl-column.vue | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'packages/frontend/src/ui/deck') diff --git a/packages/frontend/src/ui/deck/deck-store.ts b/packages/frontend/src/ui/deck/deck-store.ts index fcd595661b..49fdf4d314 100644 --- a/packages/frontend/src/ui/deck/deck-store.ts +++ b/packages/frontend/src/ui/deck/deck-store.ts @@ -32,6 +32,7 @@ export type Column = { tl?: 'home' | 'local' | 'social' | 'global'; withRenotes?: boolean; withReplies?: boolean; + onlyFiles?: boolean; }; export const deckStore = markRaw(new Storage('deck', { diff --git a/packages/frontend/src/ui/deck/tl-column.vue b/packages/frontend/src/ui/deck/tl-column.vue index e89c8b3358..b6dc6c7f21 100644 --- a/packages/frontend/src/ui/deck/tl-column.vue +++ b/packages/frontend/src/ui/deck/tl-column.vue @@ -23,10 +23,11 @@ SPDX-License-Identifier: AGPL-3.0-only @@ -52,6 +53,7 @@ const isLocalTimelineAvailable = (($i == null && instance.policies.ltlAvailable) const isGlobalTimelineAvailable = (($i == null && instance.policies.gtlAvailable) || ($i != null && $i.policies.gtlAvailable)); const withRenotes = $ref(props.column.withRenotes ?? true); const withReplies = $ref(props.column.withReplies ?? false); +const onlyFiles = $ref(props.column.onlyFiles ?? false); watch($$(withRenotes), v => { updateColumn(props.column.id, { @@ -111,6 +113,10 @@ const menu = [{ type: 'switch', text: i18n.ts.withReplies, ref: $$(withReplies), +}, { + type: 'switch', + text: i18n.ts.fileAttachedOnly, + ref: $$(onlyFiles), }]; -- cgit v1.2.3-freya