+
+
{title}
- {meta}
+
+ {meta}
+
);
}
diff --git a/apps/desktop/src/shared/ui/Badge.tsx b/apps/desktop/src/shared/ui/Badge.tsx
index 593f402..a008b9f 100644
--- a/apps/desktop/src/shared/ui/Badge.tsx
+++ b/apps/desktop/src/shared/ui/Badge.tsx
@@ -5,7 +5,7 @@ function Badge({ className, ...props }: HTMLAttributes) {
return (
{
const variantClasses: Record = {
default:
- "bg-[linear-gradient(135deg,hsl(var(--primary)),hsl(var(--accent)))] text-white shadow-[0_18px_40px_rgba(19,53,89,0.18)] hover:-translate-y-0.5",
+ "button-clip border border-[#007AFF] bg-[#007AFF] text-white shadow-none hover:border-[#0067D6] hover:bg-[#0067D6]",
secondary:
- "bg-white/70 text-slate-900 shadow-none ring-1 ring-slate-200 hover:bg-white",
+ "button-clip border border-[#007AFF] bg-white text-[#007AFF] shadow-none hover:bg-[#F3F8FF]",
outline:
- "bg-transparent text-slate-900 shadow-none ring-1 ring-slate-300 hover:bg-white/70",
- ghost: "bg-transparent text-slate-700 shadow-none hover:bg-slate-100/80",
+ "button-clip border border-[#C9D5E3] bg-white text-[#445468] shadow-none hover:bg-[#F8FBFF]",
+ ghost:
+ "border border-transparent bg-transparent text-[#6B7B8E] shadow-none hover:bg-[#F3F7FB] hover:text-[#1F2D3D]",
};
function Button({
@@ -27,7 +28,7 @@ function Button({
{title}
- {message}
+ {message}
{details ? (
- {details}
+ {details}
) : null}
{code ? (
-
+
Error code: {code}
) : null}
diff --git a/apps/desktop/src/shared/ui/Input.tsx b/apps/desktop/src/shared/ui/Input.tsx
index 184d9c5..b1036bf 100644
--- a/apps/desktop/src/shared/ui/Input.tsx
+++ b/apps/desktop/src/shared/ui/Input.tsx
@@ -5,7 +5,7 @@ function Input({ className, ...props }: InputHTMLAttributes) {
return (
state.setLanguage);
const copy = getWorkbenchCopy(language);
+ const systemStatus = hero.error
+ ? language === "zh"
+ ? "异常"
+ : "Alert"
+ : hero.hasQueryResult
+ ? language === "zh"
+ ? "在线"
+ : "Live"
+ : language === "zh"
+ ? "待机"
+ : "Standby";
+
+ const currentMode =
+ hero.viewMode === "dashboard"
+ ? copy.hero.dashboardButton
+ : copy.hero.workspaceButton;
+
+ const dataState = hero.hasQueryResult
+ ? language === "zh"
+ ? "已建模"
+ : "Modeled"
+ : language === "zh"
+ ? "未执行"
+ : "Idle";
+
function handleViewKeyDown(
event: KeyboardEvent,
currentView: "workspace" | "dashboard",
@@ -59,15 +84,105 @@ function WorkbenchHeroWidget({
}
return (
- <>
-
-
- {copy.hero.eyebrow}
+
+
+ Database_Admin_Light
+
+ {hero.viewMode === "dashboard"
+ ? copy.hero.dashboardTitle
+ : copy.hero.workspaceTitle}
+
+
+ {hero.viewMode === "dashboard"
+ ? copy.hero.dashboardDescription
+ : copy.hero.workspaceDescription}
-
-
- {copy.hero.languageLabel}
-
+
+
+
+ {language === "zh" ? "系统状态" : "System state"}
+ {systemStatus}
+
+ {hero.error ? (hero.error.code ?? hero.error.title) : hero.status}
+
+
+
+ {language === "zh" ? "当前模式" : "Current mode"}
+ {currentMode}
+
+ {hero.viewMode === "dashboard"
+ ? "Dashboard workspace"
+ : "Query workspace"}
+
+
+
+ {language === "zh" ? "数据状态" : "Data state"}
+ {dataState}
+
+ {hero.hasQueryResult
+ ? language === "zh"
+ ? "数据视图可用"
+ : "Data views available"
+ : language === "zh"
+ ? "等待数据装载"
+ : "Waiting for dataset load"}
+
+
+
+
+
+
+ ) =>
+ handleViewKeyDown(event, "workspace")
+ }
+ >
+ {copy.hero.workspaceButton}
+
+ ) =>
+ handleViewKeyDown(event, "dashboard")
+ }
+ disabled={!hero.hasQueryResult}
+ >
+ {copy.hero.dashboardButton}
+
+
+
+ {!hero.error && hero.status ? (
+ {hero.status}
+ ) : null}
+ {hero.error ? (
+
+ ) : null}
+
+
+
+
+
+ {copy.hero.languageLabel}
+
+
+
+ {language === "zh" ? "页面名称" : "Page name"}
+ DB Admin
+
+ {language === "zh"
+ ? "浅色数据库管理控制台"
+ : "Light database admin canvas"}
+
+
+
+ {language === "zh" ? "布局模式" : "Layout mode"}
+ 3 Columns
+
+ {language === "zh"
+ ? "左导航 + 中央三栏工作区"
+ : "Left rail plus three-column workspace"}
+
+
+
+ {language === "zh" ? "主色系统" : "Primary color"}
+ #007AFF
+
+ {language === "zh"
+ ? "主按钮与描边按钮统一配色"
+ : "Primary and outline actions share one accent"}
+
+
+
-
- {hero.viewMode === "dashboard"
- ? copy.hero.dashboardTitle
- : copy.hero.workspaceTitle}
-
-
- {hero.viewMode === "dashboard"
- ? copy.hero.dashboardDescription
- : copy.hero.workspaceDescription}
-
-
- ) =>
- handleViewKeyDown(event, "workspace")
- }
- >
- {copy.hero.workspaceButton}
-
- ) =>
- handleViewKeyDown(event, "dashboard")
- }
- disabled={!hero.hasQueryResult}
- >
- {copy.hero.dashboardButton}
-
-
- {!hero.error && hero.status ? (
-
- {hero.status}
-
- ) : null}
- {hero.error ? (
-
- ) : null}
- >
+
);
}
diff --git a/apps/desktop/src/widgets/import/ImportPreparationWidget.tsx b/apps/desktop/src/widgets/import/ImportPreparationWidget.tsx
index 65596ce..e413da1 100644
--- a/apps/desktop/src/widgets/import/ImportPreparationWidget.tsx
+++ b/apps/desktop/src/widgets/import/ImportPreparationWidget.tsx
@@ -47,17 +47,40 @@ function ImportPreparationWidget({
<>
-
+
{surfaceCopy.eyebrow}
-
- {surfaceCopy.title}
-
-
- {surfaceCopy.description}
-
+ {surfaceCopy.title}
+ {surfaceCopy.description}
+
+
+ {language === "zh" ? "数据接入" : "Data ingress"}
+ {activeDataSource ? "READY" : "PENDING"}
+
+ {activeDataSource
+ ? activeDataSource.info.name
+ : language === "zh"
+ ? "等待本地文件选择"
+ : "Awaiting local source selection"}
+
+
+
+ {language === "zh" ? "处理模式" : "Process mode"}
+ {language === "zh" ? "离线" : "OFFLINE"}
+
+ {language === "zh"
+ ? "缓存与分析均在本地执行"
+ : "Caching and analysis stay local"}
+
+
+
+ {language === "zh" ? "入口状态" : "Ingress state"}
+ {isLoading ? "SYNC" : "STANDBY"}
+ {status || surfaceCopy.stageReady}
+
+
-
+
{copy.hero.languageLabel}
+
+
+ {language === "zh" ? "源数量" : "Source count"}
+ {String(dataSources.length).padStart(2, "0")}
+
+ {language === "zh" ? "已装载数据源" : "Loaded data sources"}
+
+
+
+ {language === "zh" ? "缓存预热" : "Cache warmup"}
+
+ {activeDataSource?.info.cache_path ? "LINKED" : "UNSET"}
+
+
+ {activeDataSource?.info.cache_path ??
+ (language === "zh"
+ ? "等待 Parquet 缓存"
+ : "Awaiting Parquet cache")}
+
+
+
{!error && status ? (
diff --git a/apps/desktop/src/widgets/shell/WorkbenchShellWidget.tsx b/apps/desktop/src/widgets/shell/WorkbenchShellWidget.tsx
index 6d10395..272d210 100644
--- a/apps/desktop/src/widgets/shell/WorkbenchShellWidget.tsx
+++ b/apps/desktop/src/widgets/shell/WorkbenchShellWidget.tsx
@@ -25,21 +25,22 @@ function WorkbenchShellWidget({
}: WorkbenchShellWidgetProps) {
const language = useAppUiStore((state) => state.language);
const [surfacePage, setSurfacePage] = useState<"import" | "studio">("import");
+
const surfaceCopy =
language === "zh"
? {
- railLabel: "页面",
- importLabel: "导入清洗",
- studioLabel: "分析工作台",
- importHint: "先准备数据",
- studioHint: "再做分析与仪表盘",
+ railLabel: "导航",
+ importLabel: "导入",
+ studioLabel: "工作区",
+ importHint: "数据导入",
+ studioHint: "查询分析",
}
: {
- railLabel: "Pages",
+ railLabel: "Navigation",
importLabel: "Import",
studioLabel: "Studio",
- importHint: "Prepare data first",
- studioHint: "Then build analysis",
+ importHint: "Data import",
+ studioHint: "Query analysis",
};
useEffect(() => {
@@ -49,8 +50,6 @@ function WorkbenchShellWidget({
}, [hero.viewMode]);
useLayoutEffect(() => {
- // Dashboard sections can leave the document scrolled past the shorter
- // workspace content. Reset every known scroll root before paint.
window.scrollTo(0, 0);
document.documentElement.scrollTop = 0;
document.body.scrollTop = 0;
@@ -68,17 +67,15 @@ function WorkbenchShellWidget({
return (
-
{title}
- {meta} + + {meta} +{message}
+{message}
{details ? ( -{details}
+{details}
) : null} {code ? ( -+
Error code: {code}
) : null} diff --git a/apps/desktop/src/shared/ui/Input.tsx b/apps/desktop/src/shared/ui/Input.tsx index 184d9c5..b1036bf 100644 --- a/apps/desktop/src/shared/ui/Input.tsx +++ b/apps/desktop/src/shared/ui/Input.tsx @@ -5,7 +5,7 @@ function Input({ className, ...props }: InputHTMLAttributes- {copy.hero.eyebrow} +
Database_Admin_Light
++ {hero.viewMode === "dashboard" + ? copy.hero.dashboardTitle + : copy.hero.workspaceTitle} +
++ {hero.viewMode === "dashboard" + ? copy.hero.dashboardDescription + : copy.hero.workspaceDescription}
-+ {hero.error ? (hero.error.code ?? hero.error.title) : hero.status} +
++ {hero.viewMode === "dashboard" + ? "Dashboard workspace" + : "Query workspace"} +
++ {hero.hasQueryResult + ? language === "zh" + ? "数据视图可用" + : "Data views available" + : language === "zh" + ? "等待数据装载" + : "Waiting for dataset load"} +
+{hero.status}
+ ) : null} + {hero.error ? ( +- {hero.viewMode === "dashboard" - ? copy.hero.dashboardTitle - : copy.hero.workspaceTitle} -
-- {hero.viewMode === "dashboard" - ? copy.hero.dashboardDescription - : copy.hero.workspaceDescription} -
-- {hero.status} -
- ) : null} - {hero.error ? ( -{surfaceCopy.eyebrow}
-- {surfaceCopy.title} -
-- {surfaceCopy.description} -
+{surfaceCopy.title}
+{surfaceCopy.description}
++ {activeDataSource + ? activeDataSource.info.name + : language === "zh" + ? "等待本地文件选择" + : "Awaiting local source selection"} +
++ {language === "zh" + ? "缓存与分析均在本地执行" + : "Caching and analysis stay local"} +
+{status || surfaceCopy.stageReady}
+