fix(playback-controller): 移除旧的暗黑主题样式,新增播放控制器的暗黑主题样式

This commit is contained in:
xudan 2025-10-27 16:05:41 +08:00
parent 51ffcd95e2
commit 1caed38024
2 changed files with 17 additions and 20 deletions

View File

@ -325,21 +325,6 @@ const handleTimelineClick = (event: MouseEvent) => {
color: #555;
white-space: nowrap;
}
body[data-theme='dark'] {
.tick {
background-color: #777;
&.tick-major {
background-color: #ddd;
}
}
.tick-label {
color: #aaa;
}
.timeline-container::after {
background-color: #434343;
}
}
</style>
<style lang="scss">
@ -358,5 +343,18 @@ body[data-theme='dark'] {
color: #0dbb8a !important; /* "Today" button text color */
}
}
html[theme='dark'] {
.playback-controller {
background-color: #36393a;
border-color: #2a2c2c;
.timeline-container {
&::after {
background-color: #2a2c2c;
}
.tick-label {
color: #aaa;
}
}
}
}
</style>

View File

@ -1,4 +1,3 @@
import { message } from 'ant-design-vue';
import { type Ref, ref, type ShallowRef, shallowRef } from 'vue';
@ -98,7 +97,7 @@ export function usePlaybackWebSocket(editorService: ShallowRef<EditorService | u
locateCenter();
}, 100);
} else if (msg.type === 'AMR') {
(msg.data as RobotRealtimeInfo[]).forEach(robot => {
(msg.data as RobotRealtimeInfo[]).forEach((robot) => {
latestRobotData.set(robot.id, robot);
});
}
@ -134,7 +133,7 @@ export function usePlaybackWebSocket(editorService: ShallowRef<EditorService | u
if (client.value && client.value.readyState === WebSocket.OPEN) {
client.value.send(command);
} else {
message.warn('回放连接未建立或已断开,无法发送指令');
// message.warn('回放连接未建立或已断开,无法发送指令');
}
};
@ -180,7 +179,7 @@ export function usePlaybackWebSocket(editorService: ShallowRef<EditorService | u
robot: {
...rest,
// 增加更严格的校验:确保 state 的值存在于 RobotState 枚举中
state: RobotState[state] ? state : currentState ?? RobotState.,
state: RobotState[state] ? state : (currentState ?? RobotState.),
}, // 将业务数据挂载到图元的 robot 属性上
},
{ render: false },