From d0aefb3d6ed8bde79647809f410487c7e5b77615 Mon Sep 17 00:00:00 2001 From: JustMe Date: Wed, 14 Oct 2026 22:42:06 +0800 Subject: [PATCH] feat(web): split the home page into quick share and spaces zones Two side-by-side zones (stacked on narrow screens) with an icon and a one-line positioning each: quick share is temporary, read-only and needs no account; spaces are long-lived, multi-user and need a login. Shorter copy, my shares listed under the share input, and an empty state for spaces. --- web/src/features/home/ChannelList.module.css | 8 +++ web/src/features/home/ChannelList.tsx | 6 ++- web/src/features/home/Home.tsx | 52 ++++++++++++-------- web/src/features/home/QuickShare.module.css | 30 ----------- web/src/features/home/QuickShare.tsx | 14 ++---- 5 files changed, 46 insertions(+), 64 deletions(-) diff --git a/web/src/features/home/ChannelList.module.css b/web/src/features/home/ChannelList.module.css index 95b7202..cfd9a3a 100644 --- a/web/src/features/home/ChannelList.module.css +++ b/web/src/features/home/ChannelList.module.css @@ -3,6 +3,14 @@ font-size: 13px; } +.quiet { + position: absolute; + width: 1px; + height: 1px; + overflow: hidden; + clip-path: inset(50%); +} + .list { margin: 0; padding: 0; diff --git a/web/src/features/home/ChannelList.tsx b/web/src/features/home/ChannelList.tsx index 6f0b1f9..94cbbb8 100644 --- a/web/src/features/home/ChannelList.tsx +++ b/web/src/features/home/ChannelList.tsx @@ -11,9 +11,11 @@ interface Props { kind: 'channel' | 'share'; title: string; onOpen: (c: ChannelInfo | Share) => void; + /** 标题只给屏幕阅读器(所在分区已有标题) */ + quietTitle?: boolean; } -export function ChannelList({ kind, title, onOpen }: Props) { +export function ChannelList({ kind, title, onOpen, quietTitle = false }: Props) { const channels = useChannels((s) => s.list); const forgetChannel = useChannels((s) => s.forget); const shares = useShares((s) => s.list); @@ -24,7 +26,7 @@ export function ChannelList({ kind, title, onOpen }: Props) { return (
-

{title}

+

{title}