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.
This commit is contained in:
1 parent
0d31e3d058
commit
d0aefb3d6e
5 files changed
+46
-64
No files matched your search
@@ -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 (
|
||||
<section aria-label={title}>
|
||||
<h2 className={styles.h}>{title}</h2>
|
||||
<h2 className={`${styles.h} ${quietTitle ? styles.quiet : ''}`}>{title}</h2>
|
||||
<ul className={styles.list}>
|
||||
{list.map((c) => (
|
||||
<li key={c.id} className={styles.row}>
|
||||
|
||||
Reference in new issue
Block a user