feat(macos): configuration window + curl-backed macOS updater (#71)

This commit is contained in:
2026-05-17 02:23:44 -07:00
committed by GitHub
parent 6ca5cede3e
commit e84674e3b5
100 changed files with 13890 additions and 235 deletions
+25
View File
@@ -0,0 +1,25 @@
import { contextBridge, ipcRenderer } from 'electron';
import type {
ConfigSettingsAPI,
ConfigSettingsPatch,
ConfigSettingsSaveResult,
ConfigSettingsSnapshot,
} from './types/settings';
const SETTINGS_IPC_CHANNELS = {
getSnapshot: 'config:get-settings-snapshot',
savePatch: 'config:save-settings-patch',
openFile: 'config:open-settings-file',
openWindow: 'config:open-settings-window',
} as const;
const configSettingsAPI: ConfigSettingsAPI = {
getSnapshot: (): Promise<ConfigSettingsSnapshot> =>
ipcRenderer.invoke(SETTINGS_IPC_CHANNELS.getSnapshot),
savePatch: (patch: ConfigSettingsPatch): Promise<ConfigSettingsSaveResult> =>
ipcRenderer.invoke(SETTINGS_IPC_CHANNELS.savePatch, patch),
openSettingsFile: (): Promise<boolean> => ipcRenderer.invoke(SETTINGS_IPC_CHANNELS.openFile),
openSettingsWindow: (): Promise<boolean> => ipcRenderer.invoke(SETTINGS_IPC_CHANNELS.openWindow),
};
contextBridge.exposeInMainWorld('configSettingsAPI', configSettingsAPI);