Skip to content

AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.

fix(web): share workspace surfaces for page, hover, and selection

tianma-ifd149525c447f
diff --git a/apps/web/src/components/AiPromptsPane.tsx b/apps/web/src/components/AiPromptsPane.tsx
index 2467f94e..e7c19420 100644
--- a/apps/web/src/components/AiPromptsPane.tsx
+++ b/apps/web/src/components/AiPromptsPane.tsx
@@ -168,7 +168,7 @@ export const AiPromptsPane = ({ onClose, onOpenExecutionCenter }: { onClose: ()
const editorOpen = creating || Boolean(editing);
return (
- <div className="flex h-full min-h-0 min-w-0 flex-col bg-slate-50/60">
+ <div className="flex h-full min-h-0 min-w-0 flex-col bg-workspace-canvas">
<header className="flex h-[calc(3.75rem+env(safe-area-inset-top))] shrink-0 items-end justify-between border-b border-slate-200/80 bg-card px-6 pb-3 pt-[env(safe-area-inset-top)] shadow-2xs lg:h-16 lg:items-center lg:pb-0 lg:pt-0">
<div className="flex min-w-0 items-center gap-3">
<TooltipProvider delayDuration={0}>
diff --git a/apps/web/src/components/AssetsPane.tsx b/apps/web/src/components/AssetsPane.tsx
index 91aa889c..3b5f7ca5 100644
--- a/apps/web/src/components/AssetsPane.tsx
+++ b/apps/web/src/components/AssetsPane.tsx
@@ -300,7 +300,7 @@ export const AssetsPane = ({ onClose, repository, onOpenExecutionCenter }: Asset
</div>
{/* Main Content Area */}
- <div className="flex-1 overflow-y-auto bg-slate-50/30 p-6">
+ <div className="flex-1 overflow-y-auto bg-workspace-canvas p-6">
<div className="mx-auto max-w-4xl">
{resourcesQuery.isLoading ? (
<div className="flex flex-col items-center justify-center py-32 text-slate-400">
diff --git a/apps/web/src/components/EditorPaneErrorBoundary.tsx b/apps/web/src/components/EditorPaneErrorBoundary.tsx
index 230aefd1..24a06aec 100644
--- a/apps/web/src/components/EditorPaneErrorBoundary.tsx
+++ b/apps/web/src/components/EditorPaneErrorBoundary.tsx
@@ -49,7 +49,7 @@ export class EditorPaneErrorBoundary extends React.Component<Props, State> {
const zh = isChineseInterface();
return (
- <main className="flex h-full min-h-0 items-center justify-center bg-slate-50 p-6 text-slate-900">
+ <main className="flex h-full min-h-0 items-center justify-center bg-workspace-canvas p-6 text-slate-900">
<section className="w-full max-w-lg rounded-2xl border border-slate-200 bg-card p-6 shadow-sm" role="alert">
<div className="mb-4 flex h-11 w-11 items-center justify-center rounded-full bg-amber-50 text-xl text-amber-700">!</div>
<h1 className="text-lg font-semibold">{zh ? "这条笔记暂时无法显示" : "This note cannot be displayed"}</h1>
@@ -83,7 +83,7 @@ export class EditorPaneErrorBoundary extends React.Component<Props, State> {
export const EditorRecoveryPane = () => {
const zh = isChineseInterface();
return (
- <main className="flex h-full min-h-0 items-center justify-center bg-slate-50 p-6 text-slate-900">
+ <main className="flex h-full min-h-0 items-center justify-center bg-workspace-canvas p-6 text-slate-900">
<section className="w-full max-w-lg rounded-2xl border border-slate-200 bg-card p-6 shadow-sm" role="status">
<div className="mb-4 flex h-11 w-11 items-center justify-center rounded-full bg-emerald-50 text-xl text-emerald-700">✓</div>
<h1 className="text-lg font-semibold">{zh ? "已进入安全启动模式" : "Safe startup mode is active"}</h1>
diff --git a/apps/web/src/components/EvernoteImportGuidePane.tsx b/apps/web/src/components/EvernoteImportGuidePane.tsx
index d5066230..9d9bc202 100644
--- a/apps/web/src/components/EvernoteImportGuidePane.tsx
+++ b/apps/web/src/components/EvernoteImportGuidePane.tsx
@@ -14,7 +14,7 @@ export const EvernoteImportGuidePane = ({ onClose, onOpenExecutionCenter }: { on
const htmlContent = useMemo(() => marked.parse(markdown) as string, [markdown]);
return (
- <div className="flex h-full min-h-0 min-w-0 flex-col overflow-x-hidden bg-slate-50">
+ <div className="flex h-full min-h-0 min-w-0 flex-col overflow-x-hidden bg-workspace-canvas">
<header className="flex h-[calc(3.5rem+env(safe-area-inset-top))] shrink-0 items-end justify-between border-b border-slate-200 bg-card px-4 pb-3 pt-[env(safe-area-inset-top)] lg:h-16 lg:items-center lg:px-6 lg:pb-0 lg:pt-0">
<div className="flex min-w-0 items-center gap-3">
<Button
diff --git a/apps/web/src/components/NotebookPane.tsx b/apps/web/src/components/NotebookPane.tsx
index 5b4af3f3..d587747e 100644
--- a/apps/web/src/components/NotebookPane.tsx
+++ b/apps/web/src/components/NotebookPane.tsx
@@ -937,12 +937,12 @@ export const NotebookPane = ({
</div>
</TooltipProvider>
) : (
- <footer className="edgeever-workspace-sidebar-footer border-t border-slate-200 px-3 pb-[max(0.5rem,env(safe-area-inset-bottom))] pt-2 backdrop-blur-sm">
+ <footer className="edgeever-workspace-sidebar-footer border-t border-[var(--workspace-divider)] px-3 pb-[max(0.5rem,env(safe-area-inset-bottom))] pt-2">
<div className="space-y-1">
<DropdownMenu>
<DropdownMenuTrigger asChild>
<button
- className="flex h-9 w-full items-center gap-3 rounded-md px-3 text-left text-xs font-medium leading-5 text-slate-700 transition-colors duration-200 hover:bg-slate-200 hover:text-slate-950 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-emerald-400/70 data-[state=open]:bg-slate-200 data-[state=open]:text-slate-950"
+ className="flex h-9 w-full items-center gap-3 rounded-md px-3 text-left text-xs font-medium leading-5 text-slate-700 transition-colors duration-200 hover:bg-workspace-hover hover:text-slate-950 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-emerald-400/70 data-[state=open]:bg-workspace-hover data-[state=open]:text-slate-950"
type="button"
aria-label={t("pwa.sidebarDownloadsTitle") || "下载 EdgeEver 客户端与浏览器插件"}
>
@@ -1152,7 +1152,7 @@ export const NotebookPane = ({
<div className="flex items-center gap-1">
<button
onClick={onOpenSettings}
- className="flex h-9 min-w-0 flex-1 items-center gap-3 rounded-md px-3 text-left text-xs font-medium leading-5 text-slate-700 transition-colors duration-200 hover:bg-slate-200 hover:text-slate-950 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-400/70"
+ className="flex h-9 min-w-0 flex-1 items-center gap-3 rounded-md px-3 text-left text-xs font-medium leading-5 text-slate-700 transition-colors duration-200 hover:bg-workspace-hover hover:text-slate-950 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-400/70"
type="button"
aria-label={t("notebookPane.profile")}
>
diff --git a/apps/web/src/components/PluginMarketplacePane.tsx b/apps/web/src/components/PluginMarketplacePane.tsx
index ee6ad8e8..6eaa4af6 100644
--- a/apps/web/src/components/PluginMarketplacePane.tsx
+++ b/apps/web/src/components/PluginMarketplacePane.tsx
@@ -33,7 +33,7 @@ export const PluginMarketplacePane = ({
};
return (
- <div className="flex h-full min-h-0 min-w-0 flex-col overflow-hidden bg-slate-50">
+ <div className="flex h-full min-h-0 min-w-0 flex-col overflow-hidden bg-workspace-canvas">
<header className="flex h-[calc(3.5rem+env(safe-area-inset-top))] shrink-0 items-end justify-between border-b border-slate-200 bg-card px-4 pb-3 pt-[env(safe-area-inset-top)] lg:h-16 lg:items-center lg:px-6 lg:pb-0 lg:pt-0">
<div className="flex min-w-0 items-center gap-3">
<Button
diff --git a/apps/web/src/components/SettingsPane.tsx b/apps/web/src/components/SettingsPane.tsx
index 1f2955a1..32bd760d 100644
--- a/apps/web/src/components/SettingsPane.tsx
+++ b/apps/web/src/components/SettingsPane.tsx
@@ -264,7 +264,7 @@ export const SettingsPane = ({
};
return (
- <div className="flex h-full min-h-0 min-w-0 flex-col overflow-x-hidden bg-slate-50">
+ <div className="flex h-full min-h-0 min-w-0 flex-col overflow-x-hidden bg-workspace-canvas">
<header className="flex h-[calc(3.5rem+env(safe-area-inset-top))] shrink-0 items-end justify-between border-b border-slate-200 bg-card px-4 pb-3 pt-[env(safe-area-inset-top)] lg:h-16 lg:items-center lg:px-6 lg:pb-0 lg:pt-0">
<div className="flex min-w-0 items-center gap-3">
<Button
@@ -290,7 +290,7 @@ export const SettingsPane = ({
</div>
</header>
- <div className="flex flex-1 min-h-0 min-w-0 bg-slate-50/50">
+ <div className="flex min-h-0 min-w-0 flex-1 bg-workspace-canvas">
{/* 桌面端布局:双栏 */}
<div className="hidden lg:flex flex-1 min-h-0 min-w-0 mx-auto max-w-5xl px-6 py-6 gap-6">
{/* 左侧垂直 Tab 栏 */}
@@ -304,20 +304,20 @@ export const SettingsPane = ({
type="button"
onClick={() => setActiveTab(item.key)}
className={cn(
- "flex items-center gap-3 px-3.5 py-2.5 rounded-xl text-xs font-normal leading-5 transition-all duration-150 text-left w-full",
+ "flex items-center gap-3 px-3.5 py-2.5 rounded-xl text-xs leading-5 transition-all duration-150 text-left w-full",
isSelected
- ? `${item.colorClass} ${item.bgColorClass}`
- : "text-slate-600 hover:bg-slate-200/50 hover:text-slate-900"
+ ? "bg-workspace-selection font-semibold text-slate-950"
+ : "font-normal text-slate-600 hover:bg-workspace-hover hover:text-slate-900"
)}
>
- <Icon className={cn("h-4 w-4 shrink-0 transition-colors", isSelected ? item.colorClass : "text-slate-400")} />
+ <Icon className={cn("h-4 w-4 shrink-0 transition-colors", isSelected ? "text-slate-950" : "text-slate-400")} />
<span className="flex-1 truncate">{item.label}</span>
{item.badge ? (
<span
className={cn(
"rounded-full px-1.5 py-0.5 text-xs font-semibold leading-none",
isSelected
- ? "bg-emerald-600/15 text-emerald-800"
+ ? "bg-slate-200 text-slate-950"
: "bg-slate-200/80 text-slate-600"
)}
>
diff --git a/apps/web/src/components/TemplatesPane.tsx b/apps/web/src/components/TemplatesPane.tsx
index 7a9b0981..0030c1c1 100644
--- a/apps/web/src/components/TemplatesPane.tsx
+++ b/apps/web/src/components/TemplatesPane.tsx
@@ -159,7 +159,7 @@ export const TemplatesPane = ({
return (
<TooltipProvider>
- <div className="flex h-full min-h-0 min-w-0 flex-col bg-slate-50/60">
+ <div className="flex h-full min-h-0 min-w-0 flex-col bg-workspace-canvas">
{/* Header */}
<header className="flex h-[calc(3.75rem+env(safe-area-inset-top))] shrink-0 items-end justify-between border-b border-slate-200/80 bg-card px-6 pb-3 pt-[env(safe-area-inset-top)] lg:h-16 lg:items-center lg:pb-0 lg:pt-0 shadow-2xs">
<div className="flex min-w-0 items-center gap-3">
diff --git a/apps/web/src/components/execution/ExecutionCenterPane.tsx b/apps/web/src/components/execution/ExecutionCenterPane.tsx
index 0b900ce8..0d4e9b16 100644
--- a/apps/web/src/components/execution/ExecutionCenterPane.tsx
+++ b/apps/web/src/components/execution/ExecutionCenterPane.tsx
@@ -44,7 +44,7 @@ export const ExecutionCenterPane = ({
const rangeEnd = Math.min(offset + items.length, totalCount);
return (
- <div className="flex h-full min-h-0 min-w-0 flex-col bg-slate-50">
+ <div className="flex h-full min-h-0 min-w-0 flex-col bg-workspace-canvas">
<header className="flex h-[calc(4rem+env(safe-area-inset-top))] shrink-0 items-end justify-between gap-3 border-b border-slate-200 bg-card px-4 pb-3 pt-[env(safe-area-inset-top)] lg:h-16 lg:items-center lg:px-6 lg:pb-0 lg:pt-0">
<div className="flex min-w-0 items-center gap-3">
<Button
diff --git a/apps/web/src/lib/ui-palette.test.mjs b/apps/web/src/lib/ui-palette.test.mjs
index 5eed1f31..abb17b7f 100644
--- a/apps/web/src/lib/ui-palette.test.mjs
+++ b/apps/web/src/lib/ui-palette.test.mjs
@@ -23,6 +23,9 @@ describe("application color system", () => {
expect(globals).toContain("--workspace-memo-list: #f4f6f8;");
expect(globals).toContain("--workspace-editor: #ffffff;");
expect(globals).toContain("--workspace-selection: #dde3e9;");
+ expect(globals).toContain("--color-workspace-canvas: var(--workspace-canvas);");
+ expect(globals).toContain("--workspace-hover: color-mix(in srgb, var(--workspace-sidebar) 40%, white);");
+ expect(globals).toContain(".edgeever-workspace-sidebar-footer {\n background: var(--workspace-sidebar);");
expect(globals).toContain("--slate-500-rgb: 115 115 115;");
expect(globals).toContain("--slate-950-rgb: 10 10 10;");
expect(globals).toContain("--amber-50-rgb: 255 251 235;");
diff --git a/apps/web/src/styles/globals.css b/apps/web/src/styles/globals.css
index af86fbf6..dc611fe1 100644
--- a/apps/web/src/styles/globals.css
+++ b/apps/web/src/styles/globals.css
@@ -53,6 +53,12 @@
--color-slate-800: rgb(var(--slate-800-rgb) / 1);
--color-slate-900: rgb(var(--slate-900-rgb) / 1);
--color-slate-950: rgb(var(--slate-950-rgb) / 1);
+ --color-workspace-canvas: var(--workspace-canvas);
+ --color-workspace-sidebar: var(--workspace-sidebar);
+ --color-workspace-memo-list: var(--workspace-memo-list);
+ --color-workspace-editor: var(--workspace-editor);
+ --color-workspace-selection: var(--workspace-selection);
+ --color-workspace-hover: var(--workspace-hover);
--color-emerald-50: rgb(var(--brand-green-50-rgb) / 1);
--color-emerald-100: rgb(var(--brand-green-100-rgb) / 1);
--color-emerald-200: rgb(var(--brand-green-200-rgb) / 1);
@@ -292,6 +298,7 @@ html.dark[data-edgeever-environment="demo"] body::after {
--workspace-divider: #e1e5ea;
--workspace-memo-divider: #e6eaee;
--workspace-selection: #dde3e9;
+ --workspace-hover: color-mix(in srgb, var(--workspace-sidebar) 40%, white);
--tooltip-bg: #1a1f1c;
--tooltip-fg: #f4f7f5;
--scrollbar-thumb: rgb(115 115 115 / 0.28);
@@ -406,6 +413,7 @@ html.dark[data-edgeever-environment="demo"] body::after {
--workspace-divider: #2a312d;
--workspace-memo-divider: #3b4540;
--workspace-selection: #1d3028;
+ --workspace-hover: color-mix(in srgb, var(--workspace-sidebar) 82%, white);
--tooltip-bg: #252c28;
--tooltip-fg: #e9efeb;
--scrollbar-thumb: rgb(137 150 142 / 0.38);
@@ -628,7 +636,7 @@ html[data-edgeever-extension-theme] kbd {
}
.edgeever-workspace-sidebar-footer {
- background: color-mix(in srgb, var(--workspace-sidebar) 92%, transparent);
+ background: var(--workspace-sidebar);
}
.edgeever-workspace-selection {
@@ -717,7 +725,7 @@ html[data-edgeever-extension-theme] .edgeever-memo-divider {
}
:root.dark .edgeever-workspace-sidebar-footer {
- background: color-mix(in srgb, var(--workspace-sidebar) 90%, transparent);
+ background: var(--workspace-sidebar);
}
:root.dark .edgeever-workspace-selection,