mirror of
https://gitee.com/spark-store-project/spark-store
synced 2026-08-06 11:13:56 +08:00
投稿器用自渲染对话框替换alert修复选择deb后无法编辑信息的问题
Signed-off-by: gfdgd_xi <3025613752@qq.com>
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user