Files
MajoorWaldi-ComfyUI-Majoor-…/js/features/panel/controllers/hotkeysState.js
T
MajoorWaldi e7c2443670 fix(security): improve API token handling and add server-side bootstrapping
- Move token from local to session storage on client side
- Set httpOnly cookie for server-side token on bootstrap/rotate
- Add token validation and auto-sanitization
- Implement retry logic for failed operations
- Add input validation for collection names
- Update toast durations and error handling
2026-02-27 10:09:44 +01:00

26 lines
566 B
JavaScript

const HOTKEYS_STATE = {
suspended: false,
scope: null,
ratingHotkeysActive: false,
};
export function getHotkeysState() {
return HOTKEYS_STATE;
}
export function setHotkeysScope(scope) {
HOTKEYS_STATE.scope = scope == null ? null : String(scope);
}
export function isHotkeysSuspended() {
return !!HOTKEYS_STATE.suspended;
}
export function setHotkeysSuspendedFlag(suspended) {
HOTKEYS_STATE.suspended = Boolean(suspended);
}
export function setRatingHotkeysActive(active) {
HOTKEYS_STATE.ratingHotkeysActive = Boolean(active);
}