Add first-time setup onboarding flow

Introduces a multi-step onboarding process for first-time users, including theme selection and default browser setup. Adds setup.html, setup.js, and setup.css for the new UI, updates main.js and preload.js to support onboarding logic and IPC handlers, and adjusts theme-manager.js for correct theme directory resolution.
This commit is contained in:
2026-01-20 22:07:22 +13:00
parent a0e76e623d
commit 6ea31e7f80
6 changed files with 1541 additions and 2 deletions
+18
View File
@@ -505,6 +505,24 @@ contextBridge.exposeInMainWorld('updaterAPI', {
onUpdateStatus: (handler) => ipcRenderer.on('update-status', (_e, payload) => handler(payload))
});
// First-Time Setup API
contextBridge.exposeInMainWorld('api', {
// Check if this is the first run
isFirstRun: () => ipcRenderer.invoke('is-first-run'),
// Get all available themes
getAllThemes: () => ipcRenderer.invoke('get-all-themes'),
// Apply a theme
applyTheme: (themeId) => ipcRenderer.invoke('apply-theme', themeId),
// Check if Nebula is the default browser
isDefaultBrowser: () => ipcRenderer.invoke('is-default-browser'),
// Set Nebula as the default browser
setAsDefaultBrowser: () => ipcRenderer.invoke('set-as-default-browser'),
// Complete first-run setup
completeFirstRun: (data) => ipcRenderer.invoke('complete-first-run', data),
// Get first-run data
getFirstRunData: () => ipcRenderer.invoke('get-first-run-data')
});
// ----------------------------------------
// Plugin renderer preloads
// ----------------------------------------