mirror of
https://github.com/dtzp555-max/odo.git
synced 2026-07-21 21:15:10 +00:00
feat: Phase 1 scaffold — React + Vite + TypeScript + Dashboard (v0.10.0)
- Add Vite + React + TypeScript + Tailwind CSS to Electron app - Create Dashboard page with gateway control (start/stop/restart/status) - Expand preload.js IPC bridge with gateway and OCM API channels - Add IPC handlers in main.js for openclaw CLI and OCM proxy - Dev mode loads Vite dev server, production loads built dist/ - Bump version to 0.10.0 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+15
-6
@@ -1,12 +1,21 @@
|
||||
'use strict';
|
||||
|
||||
// Preload script — runs in renderer before page loads
|
||||
// Currently minimal; will be expanded for IPC bridge in future phases
|
||||
|
||||
const { contextBridge } = require('electron');
|
||||
const { contextBridge, ipcRenderer } = require('electron');
|
||||
|
||||
contextBridge.exposeInMainWorld('odo', {
|
||||
platform: process.platform,
|
||||
version: '0.9.6',
|
||||
isElectron: true
|
||||
version: '0.10.0',
|
||||
isElectron: true,
|
||||
|
||||
gateway: {
|
||||
status: () => ipcRenderer.invoke('gateway:status'),
|
||||
start: () => ipcRenderer.invoke('gateway:start'),
|
||||
stop: () => ipcRenderer.invoke('gateway:stop'),
|
||||
restart: () => ipcRenderer.invoke('gateway:restart'),
|
||||
},
|
||||
|
||||
ocm: {
|
||||
api: (method, path, body) =>
|
||||
ipcRenderer.invoke('ocm:api', { method, path, body }),
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user