feat: transition to a fully frontend architecture by removing backend dependencies and updating configuration for local deployment

This commit is contained in:
HouYunFei
2026-06-16 12:56:49 +08:00
parent 8a66524ea7
commit 7f0199da59
36 changed files with 571 additions and 1773 deletions
@@ -2721,9 +2721,7 @@ function CanvasTopBar({
const colorTheme = useThemeStore((state) => state.theme);
const theme = canvasThemes[colorTheme];
const titleRef = useRef<HTMLDivElement>(null);
const accountRef = useRef<HTMLDivElement>(null);
const [shortcutsOpen, setShortcutsOpen] = useState(false);
const [accountOpen, setAccountOpen] = useState(false);
useEffect(() => {
if (!isTitleEditing) return;
@@ -2734,15 +2732,6 @@ function CanvasTopBar({
return () => document.removeEventListener("pointerdown", close, true);
}, [isTitleEditing, onFinishTitleEditing]);
useEffect(() => {
if (!accountOpen) return;
const close = (event: PointerEvent) => {
if (!accountRef.current?.contains(event.target as Node)) setAccountOpen(false);
};
document.addEventListener("pointerdown", close, true);
return () => document.removeEventListener("pointerdown", close, true);
}, [accountOpen]);
return (
<>
<div className="pointer-events-none absolute left-0 right-0 top-0 z-50 flex h-16 items-center justify-between px-4">
@@ -2800,14 +2789,7 @@ function CanvasTopBar({
<div className="pointer-events-auto flex items-center gap-1.5">
<UserStatusActions
variant="canvas"
accountOpen={accountOpen}
onAccountOpenChange={setAccountOpen}
accountRef={accountRef}
getPopupContainer={(node) => node.parentElement || document.body}
onOpenShortcuts={() => {
setShortcutsOpen(true);
setAccountOpen(false);
}}
onOpenShortcuts={() => setShortcutsOpen(true)}
/>
<span className="h-6 w-px" style={{ background: theme.toolbar.border }} />
<Button