去除界面优化

This commit is contained in:
2026-03-15 17:00:58 +08:00
parent 74b1f65ab1
commit 6729e321a6
15 changed files with 141 additions and 227 deletions

View File

@@ -251,8 +251,7 @@ ipcMain.on("queue-install", async (event, download_json) => {
type: "info",
title: "APM 安装成功",
message: "恭喜您APM 已成功安装",
detail:
"APM 应用需重启后方可展示和使用,若完成安装后无法在应用列表中展示,请重启电脑后继续。",
detail: "APM 应用需重启后方可展示和使用,若完成安装后无法在应用列表中展示,请重启电脑后继续。",
buttons: ["确定"],
defaultId: 0,
});
@@ -671,6 +670,7 @@ ipcMain.handle("list-upgradable", async () => {
return { success: true, apps };
});
// eslint-disable-next-line @typescript-eslint/no-explicit-any
ipcMain.handle("uninstall-installed", async (_event, payload: any) => {
const pkgname = typeof payload === "string" ? payload : payload.pkgname;

View File

@@ -136,4 +136,4 @@ export function sendTelemetryOnce(storeVersion: string): void {
.catch((err) => {
logger.warn({ err }, "Telemetry request failed");
});
}
}

View File

@@ -64,7 +64,6 @@ if (!app.requestSingleInstanceLock()) {
let win: BrowserWindow | null = null;
const preload = path.join(__dirname, "../preload/index.mjs");
const indexHtml = path.join(RENDERER_DIST, "index.html");
/** 与项目 package.json 一致的版本号:打包用 app.getVersion(),未打包时读 package.json */
function getAppVersion(): string {
if (app.isPackaged) return app.getVersion();
@@ -95,8 +94,10 @@ function getStoreFilterFromArgv(): "spark" | "apm" | "both" {
return "both";
}
ipcMain.handle("get-store-filter", (): "spark" | "apm" | "both" =>
getStoreFilterFromArgv(),
);
async function createWindow() {
@@ -212,7 +213,7 @@ app.whenReady().then(() => {
});
createWindow();
handleCommandLine(process.argv);
// 启动后执行一次遥测(仅 Linux不阻塞
// 启动后执行一次遥测(仅 Linux不阻塞
sendTelemetryOnce(getAppVersion());
});
@@ -273,6 +274,7 @@ function getTrayIconPath(): string | null {
const FALLBACK_TRAY_PNG =
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAHklEQVQ4T2NkYGD4z0ABYBwNwMAwGoChNQAAAABJRU5ErkJggg==";
function getTrayImage():
| string
| ReturnType<typeof nativeImage.createFromDataURL> {