diff --git a/components/canvas/RealtimeCanvasDialog.tsx b/components/canvas/RealtimeCanvasDialog.tsx index 7603ad1ea..6fde01ab0 100644 --- a/components/canvas/RealtimeCanvasDialog.tsx +++ b/components/canvas/RealtimeCanvasDialog.tsx @@ -786,13 +786,25 @@ export function RealtimeCanvasDialog({ const statusBadge = useMemo(() => { if (status === "live") - return { label: "实时中", className: "bg-emerald-50 text-emerald-700" }; + return { + label: "实时中", + className: "bg-emerald-500/15 text-emerald-600 dark:text-emerald-400", + }; if (status === "connecting") { - return { label: "连接中", className: "bg-blue-50 text-blue-700" }; + return { + label: "连接中", + className: "bg-blue-500/15 text-blue-600 dark:text-blue-400", + }; } if (status === "error") - return { label: "异常", className: "bg-rose-50 text-rose-700" }; - return { label: "待启动", className: "bg-zinc-100 text-zinc-600" }; + return { + label: "异常", + className: "bg-rose-500/15 text-rose-600 dark:text-rose-400", + }; + return { + label: "待启动", + className: "bg-muted text-muted-foreground", + }; }, [status]); const selectedImageLayer = useMemo( @@ -2654,9 +2666,9 @@ export function RealtimeCanvasDialog({ }, [clearPreviewCanvas, resetCanvas]); const compactToolButtonClass = - "h-9 w-9 rounded-[16px] text-zinc-600 transition hover:bg-zinc-100 hover:text-zinc-900"; + "h-9 w-9 rounded-[16px] text-muted-foreground transition hover:bg-accent hover:text-foreground"; const compactToolButtonActiveClass = - "bg-black text-white hover:bg-black hover:text-white"; + "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground"; const currentModeLabel = brushMode === "select" ? "鼠标" @@ -2695,269 +2707,51 @@ export function RealtimeCanvasDialog({ 左侧绘制草图,右侧实时预览。 )} -
-
-
-
-
- {siteLogo ? ( - {siteName} - ) : ( -
- -
- )} - - {siteName} - -
- - - {statusBadge.label} - - - 延迟 {adaptiveThrottleMs}ms - +
+
+ {siteLogo ? ( + {siteName} + ) : ( +
+
+ )} + + {siteName} + +
+
-
- - - -
- -
- - - - - - -
- -
- - setBrushColor(event.target.value)} - ref={colorInputRef} - title="自定义颜色" - type="color" - value={brushColor} - /> -
- - 粗细 {brushSize} - - setBrushSize(val)} - rangeClassName="bg-sky-500" - step={1} - thumbClassName="h-5 w-5 border border-zinc-300 bg-white shadow-sm" - trackClassName="h-2.5 bg-zinc-200 shadow-inner" - value={[brushSize]} - /> -
-
- -
- - -
- - {standalone ? ( -
- -
- ) : null} -
+
+
+
{saveProjectDialogOpen ? (
-
+
保存项目
-
+
请输入项目名称后保存当前画布
@@ -2994,7 +2788,7 @@ export function RealtimeCanvasDialog({ 取消
-
+
粗细 - + {brushSize}
@@ -3523,10 +3316,10 @@ export function RealtimeCanvasDialog({ max={50} min={2} onValueChange={([val]) => setBrushSize(val)} - rangeClassName="bg-black" + rangeClassName="bg-primary" step={1} - thumbClassName="h-5 w-5 border border-zinc-300 bg-white shadow-sm" - trackClassName="h-2.5 bg-zinc-200 shadow-inner" + thumbClassName="h-5 w-5 border border-border bg-background shadow-sm" + trackClassName="h-2.5 bg-muted shadow-inner" value={[brushSize]} />
@@ -3535,7 +3328,7 @@ export function RealtimeCanvasDialog({
画笔设置
-
调整颜色和粗细
+
调整颜色和粗细
@@ -3555,7 +3348,7 @@ export function RealtimeCanvasDialog({
上传图片
-
添加新的图片图层
+
添加新的图片图层
@@ -3572,7 +3365,7 @@ export function RealtimeCanvasDialog({
保存项目
-
保存当前画布状态
+
保存当前画布状态
@@ -3592,7 +3385,7 @@ export function RealtimeCanvasDialog({
项目列表
-
打开已保存项目
+
打开已保存项目
@@ -3609,7 +3402,7 @@ export function RealtimeCanvasDialog({
新建空白
-
清空并开始新项目
+
清空并开始新项目
@@ -3630,7 +3423,7 @@ export function RealtimeCanvasDialog({
撤销
-
回退上一步编辑
+
回退上一步编辑
@@ -3648,14 +3441,14 @@ export function RealtimeCanvasDialog({
重做
-
恢复已撤销操作
+
恢复已撤销操作
{standalone ? (