feat: expand graph canvas and restore original Endoleap branding
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
|
||||
import { useEffect, useState } from "react";
|
||||
import { useRouter, useSearchParams } from "next/navigation";
|
||||
import { Network } from "lucide-react";
|
||||
import { api, errorText } from "@/lib/api";
|
||||
import { readDemoBoards } from "@/lib/demo-workspace";
|
||||
import type { Board } from "@/lib/workspace";
|
||||
@@ -46,13 +45,10 @@ export default function GraphPage({ workspaceId, boardId }: { workspaceId: strin
|
||||
}, [workspaceId, boardId, demo, router]);
|
||||
|
||||
return (
|
||||
<main className={styles.graph} aria-label="无限图谱">
|
||||
{error ? <p className={styles.graphStatus} role="alert">{error}</p> : board ? (
|
||||
<>
|
||||
<header className={styles.graphHeader}><Network size={16} /><h1>{board.title}</h1>{demo && <span>演示</span>}</header>
|
||||
<div className={styles.graphSurface} aria-label={board.title + "的空白图谱"} />
|
||||
</>
|
||||
) : <p className={styles.graphStatus} role="status">正在打开图谱…</p>}
|
||||
<main className={styles.graph} aria-label={board ? board.title + " · 无限图谱" : "无限图谱"} aria-busy={!board && !error}>
|
||||
<div className={styles.graphSurface} aria-label={board ? board.title + "的画布" : "画布"} />
|
||||
{error ? <p className={styles.graphStatus} role="alert">{error}</p>
|
||||
: !board && <p className={styles.graphStatus} role="status">正在打开图谱…</p>}
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -105,12 +105,14 @@
|
||||
.settingsActions button { padding: 6px 12px; border: 1px solid #e2ddd6; border-radius: 6px; font-size: 13px; }
|
||||
.settingsActions button[type="submit"] { background: #37352f; color: white; border-color: #37352f; }
|
||||
.settingsActions button:disabled { opacity: 0.5; cursor: not-allowed; }
|
||||
.graph { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 100dvh; }
|
||||
.graphHeader { display: flex; align-items: center; gap: 10px; padding: 20px 24px 20px 110px; min-height: 64px; border-bottom: 1px solid #efede8; font-size: 13px; }
|
||||
.graphHeader h1 { margin: 0; font-size: 14px; font-weight: 500; }
|
||||
.graphHeader span { color: #aaa299; }
|
||||
.graphSurface { flex: 1; background-image: radial-gradient(#b8aea245 1px, transparent 1px); background-size: 22px 22px; }
|
||||
.graphStatus { padding: 80px 24px; color: #9a948c; text-align: center; font-size: 13px; }
|
||||
.graph { position: fixed; inset: 0; z-index: 0; display: flex; width: 100%; height: 100dvh; background: #fffefb; }
|
||||
.graphSurface { width: 100%; height: 100%; background-image: radial-gradient(#b8aea245 1px, transparent 1px); background-size: 22px 22px; }
|
||||
.graphStatus { position: absolute; left: 50%; top: 72px; transform: translateX(-50%); max-width: calc(100vw - 48px); padding: 8px 12px; border-radius: 6px; background: #fffefbe6; color: #9a948c; text-align: center; font-size: 13px; }
|
||||
@keyframes account-enter { from { opacity: 0; transform: translateY(4px) scale(0.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
|
||||
@media (max-width: 600px) { .shell { --sidebar-width: 240px; } .graphHeader { padding: 20px 14px; } }
|
||||
@media (max-width: 600px) { .shell { --sidebar-width: 240px; } }
|
||||
@media (prefers-reduced-motion: reduce) { .accountPopup:popover-open { animation: none; } }
|
||||
|
||||
.logoLink { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 28px; height: 24px; padding: 4px 6px; border-radius: 5px; }
|
||||
.logoLink img { display: block; width: 16px; height: 16px; }
|
||||
.logoLink:hover { background: #e9e7e3; }
|
||||
.logoLink:focus-visible { outline: 2px solid #9d7d66; outline-offset: 2px; }
|
||||
|
||||
Reference in New Issue
Block a user