feat(workbench): implement workbench window management and navigation state
Deployment Config CI / Deployment Config (push) Successful in 24s
Desktop Client Build / Resolve Build Metadata (push) Successful in 39s
Frontend CI / Frontend (push) Successful in 3m3s
Backend CI / Backend (push) Successful in 16m18s
Desktop Client Build / Build Desktop Client (push) Successful in 24m1s
Desktop Client Build / Publish Client Artifacts to NAS (push) Successful in 35s
Deployment Config CI / Deployment Config (push) Successful in 24s
Desktop Client Build / Resolve Build Metadata (push) Successful in 39s
Frontend CI / Frontend (push) Successful in 3m3s
Backend CI / Backend (push) Successful in 16m18s
Desktop Client Build / Build Desktop Client (push) Successful in 24m1s
Desktop Client Build / Publish Client Artifacts to NAS (push) Successful in 35s
This commit is contained in:
@@ -38,6 +38,16 @@ interface DesktopLoginCredentials {
|
||||
password: string
|
||||
}
|
||||
|
||||
interface WorkbenchNavigationState {
|
||||
canGoBack: boolean
|
||||
canGoForward: boolean
|
||||
loading: boolean
|
||||
url: string
|
||||
title: string
|
||||
host: string
|
||||
secure: boolean
|
||||
}
|
||||
|
||||
const rendererProxyRequestChannel = 'desktop:renderer-devtools-proxy:request'
|
||||
const rendererProxyResponseChannel = 'desktop:renderer-devtools-proxy:response'
|
||||
|
||||
@@ -196,6 +206,25 @@ const desktopBridge = {
|
||||
}
|
||||
},
|
||||
},
|
||||
workbenchNavigation: {
|
||||
getState: () =>
|
||||
ipcRenderer.invoke(
|
||||
'desktop:workbench-navigation:get-state',
|
||||
) as Promise<WorkbenchNavigationState>,
|
||||
goBack: () => ipcRenderer.invoke('desktop:workbench-navigation:go-back') as Promise<null>,
|
||||
goForward: () =>
|
||||
ipcRenderer.invoke('desktop:workbench-navigation:go-forward') as Promise<null>,
|
||||
reload: () => ipcRenderer.invoke('desktop:workbench-navigation:reload') as Promise<null>,
|
||||
onStateChanged: (listener: (state: WorkbenchNavigationState) => void) => {
|
||||
const wrapped = (_event: IpcRendererEvent, payload: WorkbenchNavigationState) => {
|
||||
listener(payload)
|
||||
}
|
||||
ipcRenderer.on('desktop:workbench-navigation-state', wrapped)
|
||||
return () => {
|
||||
ipcRenderer.off('desktop:workbench-navigation-state', wrapped)
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
contextBridge.exposeInMainWorld('desktopBridge', desktopBridge)
|
||||
|
||||
Reference in New Issue
Block a user