feat(前端界面): 优化前端界面
build.yaml / build (push) Successful in 35s

This commit is contained in:
2026-07-09 13:07:59 +08:00
parent 5b8b015bfc
commit 38e55d962c
2 changed files with 10 additions and 1 deletions
+9
View File
@@ -361,6 +361,11 @@ async function openSelectedOFD() {
if (!file) {
return;
}
if (!isOFDFile(file)) {
el.ofdInput.value = "";
showError(new Error("请选择 .ofd 文件"), !state.doc);
return;
}
state.wasmRecoveries = 0;
setBusy(true, "正在读取 OFD", 10, STATUS.opening);
try {
@@ -373,6 +378,10 @@ async function openSelectedOFD() {
}
}
function isOFDFile(file) {
return /\.ofd$/i.test(file.name || "");
}
async function openSelectedFonts() {
const files = Array.from(el.fontInput.files || []);
if (!files.length) {