feat(web): add account workspaces and signed content flows

This commit is contained in:
justme committed 2026-10-14 04:06:03 +08:00
1 parent 7b8d61d1ba
commit b5cf3d5958
117 files changed
+2789 -1674

No files matched your search

+1
View File
@@ -13,6 +13,7 @@ const PATHS = {
send: 'M4 12l16-8-6 16-3-7z',
clip: 'M20 11l-8 8a5 5 0 01-7-7l8-8a3.5 3.5 0 015 5l-8 8a2 2 0 01-3-3l7-7',
close: 'M6 6l12 12 M18 6L6 18',
plus: 'M12 5v14 M5 12h14',
check: 'M5 12l5 5 9-10',
edit: 'M4 20h4L19 9l-4-4L4 16z',
trash: 'M5 7h14 M9 7V4h6v3 M7 7l1 13h8l1-13',
+4 -2
View File
@@ -1,4 +1,4 @@
import { useEffect, useRef, type ReactNode } from 'react';
import { useEffect, useId, useRef, type ReactNode } from 'react';
import { createPortal } from 'react-dom';
import { useBackToClose } from '@/lib/useBackToClose';
import { Button } from './Button';
@@ -18,6 +18,7 @@ interface Props {
/** 手机为底部抽屉(或顶部),桌面为居中面板。遮罩是纯色,不用 blur(ui-design §4) */
export function Sheet({ title, onClose, actions, wide, placement = 'bottom', children }: Props) {
const ref = useRef<HTMLDivElement>(null);
const titleId = useId();
// onClose 放进 ref:父组件传内联函数也不会重复聚焦
const close = useRef(onClose);
@@ -47,11 +48,12 @@ export function Sheet({ title, onClose, actions, wide, placement = 'bottom', chi
tabIndex={-1}
role="dialog"
aria-modal="true"
aria-labelledby={titleId}
className={`${styles.sheet} ${wide ? styles.wide : ''}`}
onClick={(e) => e.stopPropagation()}
>
<header className={styles.head}>
<div className={styles.title}>{title}</div>
<div id={titleId} className={styles.title}>{title}</div>
<div className={styles.actions}>{actions}</div>
<Button variant="ghost" icon="close" label="关闭" onClick={onClose} />
</header>