removed electron

This commit is contained in:
2026-04-07 23:08:27 -06:00
parent d80ff847d8
commit e25f8a9b63
20 changed files with 96 additions and 363 deletions

View File

@ -30,8 +30,8 @@ async function encryptAndStore(key: string, value: string): Promise<void> {
localStorage.removeItem(ENCRYPTED_KEY_PREFIX + key);
return;
}
if (window.electronAPI) {
const encrypted = await window.electronAPI.encryptString(value);
if (window.desktopAPI) {
const encrypted = await window.desktopAPI.encryptString(value);
localStorage.setItem(ENCRYPTED_KEY_PREFIX + key, encrypted);
} else {
localStorage.setItem(ENCRYPTED_KEY_PREFIX + key, btoa(value));
@ -41,9 +41,9 @@ async function encryptAndStore(key: string, value: string): Promise<void> {
async function loadAndDecrypt(key: string): Promise<string> {
const stored = localStorage.getItem(ENCRYPTED_KEY_PREFIX + key);
if (!stored) return '';
if (window.electronAPI) {
if (window.desktopAPI) {
try {
return await window.electronAPI.decryptString(stored);
return await window.desktopAPI.decryptString(stored);
} catch {
return '';
}