fix license check

This commit is contained in:
2026-08-03 15:18:28 +08:00
parent 2090597858
commit bae71f3253
11 changed files with 469 additions and 20 deletions
+13
View File
@@ -246,6 +246,14 @@ function registerHandlers() {
callServer({ type: "createCompany", name: request.name, code: request.code }, request.credentials));
ipcMain.handle("organization:create-line", (_event, request) =>
callServer({ type: "createProductionLine", companyId: request.companyId, name: request.name, code: request.code }, request.credentials));
ipcMain.handle("organization:delete-company", (_event, request) =>
callServer({ type: "deleteCompany", companyId: request.companyId }, request.credentials));
ipcMain.handle("organization:delete-line", (_event, request) =>
callServer({
type: "deleteProductionLine",
companyId: request.companyId,
productionLineId: request.productionLineId
}, request.credentials));
ipcMain.handle("license:issue", async (_event, request) => {
const keySelection = await dialog.showOpenDialog({
@@ -295,6 +303,11 @@ function registerHandlers() {
{ type: "revokeLicense", licenseId: request.licenseId, reason: request.reason },
resolveCredentials(request.credentials)
));
ipcMain.handle("license:delete", (_event, request) =>
callServer(
{ type: "deleteLicense", licenseId: request.licenseId },
resolveCredentials(request.credentials)
));
ipcMain.handle("license:download", async (_event, request) => {
const resolvedCredentials = resolveCredentials(request.credentials);
const result = await callServer(