feat(新增平台): 新增linux amd64桌面支持
build.yaml / build (push) Successful in 45s

This commit is contained in:
xiaoqidun committed 2026-10-20 10:39:11 +08:00
1 parent eac5a659e6
commit 6b0332224f
10 files changed
+203 -22

No files matched your search

+8 -1
View File
@@ -529,13 +529,20 @@ class NativeHost {
}
async start(onFiles, onError) {
this.bridge.on("ofdgo.files", values => onFiles(values.map(value => new NativeFile(value))));
this.bridge.on("ofdgo.files", async values => {
try { await onFiles(values.map(value => new NativeFile(value))); }
catch (error) { onError(error); }
});
this.bridge.on("ofdgo.error", message => onError(new Error(message)));
const title = document.querySelector("title");
if (title) new MutationObserver(() => this.call("title", {title:document.title}).catch(onError)).observe(title, {childList:true});
await this.call("ready", {});
}
async discardFiles(files) {
await Promise.all(files.filter(file => file.drop && file.nativeFile).map(file => this.call("drop.release", {file:file.nativeFile})));
}
installFileInputs(onError) {
document.addEventListener("click", async event => {
const input = event.target;