投稿器用自渲染对话框替换alert修复选择deb后无法编辑信息的问题

Signed-off-by: gfdgd_xi <3025613752@qq.com>
This commit is contained in:
2026-06-27 18:45:22 +08:00
parent 8d642c43ef
commit 2cab0b2161
2 changed files with 241 additions and 139 deletions
+8 -4
View File
@@ -1,4 +1,4 @@
import { type BrowserWindow, dialog, ipcMain, shell } from "electron";
import { BrowserWindow, dialog, ipcMain, shell } from "electron";
import path from "node:path";
import fs from "node:fs";
import os from "node:os";
@@ -462,13 +462,12 @@ export function registerSubmitterHandlers(
return { success: true };
}
const BrowserWindowClass = (await import("electron")).BrowserWindow;
const newWin = new BrowserWindowClass({
const newWin = new BrowserWindow({
title: "星火应用商店 - 投稿应用",
width: 800,
height: 900,
frame: false,
show: false,
autoHideMenuBar: true,
icon: path.join(process.env.VITE_PUBLIC!, "favicon.ico"),
webPreferences: {
@@ -482,6 +481,11 @@ export function registerSubmitterHandlers(
newWin.loadFile(indexHtml, { hash: "submitter" });
}
newWin.once("ready-to-show", () => {
newWin.show();
newWin.focus();
});
newWin.on("closed", () => {
setSubmitterWin(null);
});