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:
+18
@@ -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
|
||||
// ----------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user