添加主页功能,支持加载和展示首页数据,包括链接和推荐应用列表

This commit is contained in:
2026-02-25 20:46:28 +08:00
parent b72f5f8da6
commit 21b069d7ef
8 changed files with 311 additions and 32 deletions

View File

@@ -160,6 +160,24 @@ ipcMain.handle("run-update-tool", async () => {
}
});
// 启动安装设置脚本(可能需要提升权限)
ipcMain.handle("open-install-settings", async () => {
try {
const { spawn } = await import("node:child_process");
const scriptPath = "/opt/durapps/spark-store/bin/update-upgrade/ss-update-controler.sh";
const child = spawn("/opt/spark-store/extras/host-spawn", [scriptPath], {
detached: true,
stdio: "ignore",
});
child.unref();
logger.info(`Launched ${scriptPath}`);
return { success: true };
} catch (err) {
logger.error({ err }, "Failed to launch install settings script");
return { success: false, message: (err as Error)?.message || String(err) };
}
});
app.whenReady().then(() => {
// Set User-Agent for client
session.defaultSession.webRequest.onBeforeSendHeaders((details, callback) => {