feat(electron): added key managment ui

This commit is contained in:
2025-08-11 11:26:09 -04:00
parent d7d7615376
commit 268e4fbeae
28 changed files with 2525 additions and 247 deletions

View File

@@ -11,6 +11,10 @@ let pendingOperation = null; // Store the operation to execute after warning con
// Current OPAT file state
let currentOPATFile = null;
// Current key management state
let currentKeys = null;
let keyOperationInProgress = false;
// Bundle state management
const getBundleState = () => ({
currentBundle,
@@ -67,6 +71,27 @@ const clearOPATFile = () => {
currentOPATFile = null;
};
// Key management state functions
const setKeysState = (keysData) => {
currentKeys = keysData;
};
const getKeysState = () => {
return currentKeys;
};
const clearKeysState = () => {
currentKeys = null;
};
const setKeyOperationInProgress = (inProgress) => {
keyOperationInProgress = inProgress;
};
const getKeyOperationInProgress = () => {
return keyOperationInProgress;
};
// Export state management functions
module.exports = {
// Bundle state
@@ -86,6 +111,13 @@ module.exports = {
getOPATFile,
clearOPATFile,
// Key management state
setKeysState,
getKeysState,
clearKeysState,
setKeyOperationInProgress,
getKeyOperationInProgress,
// Direct state access (for compatibility)
getCurrentBundle: () => currentBundle,
getCurrentBundlePath: () => currentBundlePath,