mirror of
https://gitee.com/spark-store-project/spark-store
synced 2026-08-06 13:33:57 +08:00
feat(submitter,update-center): add multiple features and optimize submission flow
1. add shell caller ssupdate command support 2. add pre-update system refresh for update center 3. add get-git-email IPC handler and auto-fill email 4. optimize deb submission UI and category handling 5. disable and auto-fill package name/version fields 6. add loading and error states for category list 7. fix category value matching for history data
This commit is contained in:
@@ -911,6 +911,24 @@ export function registerSubmitterHandlers(
|
||||
}
|
||||
});
|
||||
|
||||
ipcMain.handle("get-git-email", async () => {
|
||||
try {
|
||||
const { exec } = await import("node:child_process");
|
||||
const util = await import("util");
|
||||
const execAsync = util.promisify(exec);
|
||||
const { stdout } = await execAsync("git config user.email");
|
||||
const email = stdout.trim();
|
||||
logger.info({ email }, "[Submitter] Git email retrieved");
|
||||
return { success: true, data: email || "" };
|
||||
} catch (err) {
|
||||
logger.warn(
|
||||
{ err },
|
||||
"[Submitter] Failed to get git email, not a git repo or git not installed",
|
||||
);
|
||||
return { success: false, data: "" };
|
||||
}
|
||||
});
|
||||
|
||||
ipcMain.handle("get-tags-list", async () => {
|
||||
try {
|
||||
const apiUrl = "https://upload.deepinos.org.cn/api/index/get_tags_list";
|
||||
|
||||
Reference in New Issue
Block a user