Fix HUD window controls

This commit is contained in:
lenn
2026-05-26 14:33:51 +08:00
parent 39840f469f
commit 0812142359
3 changed files with 6 additions and 10 deletions

View File

@@ -35,6 +35,6 @@ pub async fn win_close(
.await .await
.map_err(|error| error.to_string())?; .map_err(|error| error.to_string())?;
app.exit(0); main_window(&app)?.close().map_err(|error| error.to_string())
Ok(())
} }

View File

@@ -4,6 +4,8 @@
ConnectionState, ConnectionState,
HudConfigLink, HudConfigLink,
HudNoticeTone, HudNoticeTone,
LocaleCode,
StageViewMode,
WindowControlAction WindowControlAction
} from "$lib/types/hud"; } from "$lib/types/hud";

View File

@@ -68,6 +68,7 @@
rangeMaxLabel: "最大值", rangeMaxLabel: "最大值",
colorMapLabel: "映射颜色", colorMapLabel: "映射颜色",
matrixViewLabel: "矩阵模式", matrixViewLabel: "矩阵模式",
matrixViewNumericLabel: "数字模式",
matrixViewDotsLabel: "点矩阵", matrixViewDotsLabel: "点矩阵",
stageModeLabel: "渲染模式", stageModeLabel: "渲染模式",
stageModeWebglLabel: "WebGL", stageModeWebglLabel: "WebGL",
@@ -129,6 +130,7 @@
rangeMaxLabel: "Max", rangeMaxLabel: "Max",
colorMapLabel: "Color Map", colorMapLabel: "Color Map",
matrixViewLabel: "Matrix Mode", matrixViewLabel: "Matrix Mode",
matrixViewNumericLabel: "Numeric",
matrixViewDotsLabel: "Dots", matrixViewDotsLabel: "Dots",
stageModeLabel: "Render Mode", stageModeLabel: "Render Mode",
stageModeWebglLabel: "WebGL", stageModeWebglLabel: "WebGL",
@@ -1090,12 +1092,10 @@
currentLocale === "zh-CN" currentLocale === "zh-CN"
? { ? {
streamOn: "打开", streamOn: "打开",
streamOff: "关闭",
settings: "参数" settings: "参数"
} }
: { : {
streamOn: "Open", streamOn: "Open",
streamOff: "Close",
settings: "Setup" settings: "Setup"
}; };
const devkitLabel = currentLocale === "zh-CN" ? "开发工具" : "DevKit"; const devkitLabel = currentLocale === "zh-CN" ? "开发工具" : "DevKit";
@@ -1107,12 +1107,6 @@
tone: "lime", tone: "lime",
active: activeId === "stream-on" active: activeId === "stream-on"
}, },
{
id: "stream-off",
label: labels.streamOff,
tone: "orange",
active: activeId === "stream-off"
},
{ {
id: "settings", id: "settings",
label: labels.settings, label: labels.settings,