Figure out structuring the node-browser boundary
This commit is contained in:
@ -8,10 +8,6 @@ import { ProjectRoute } from 'wasm-lib/kcl/bindings/ProjectRoute'
|
||||
import { components } from './machine-api'
|
||||
import { isDesktop } from './isDesktop'
|
||||
|
||||
// All these functions call into lib/electron since many require filesystem
|
||||
// access, and the second half is the original tauri code also stored app
|
||||
// state on the "desktop" side.
|
||||
|
||||
// Get the app state from desktop.
|
||||
export async function getState(): Promise<ProjectState | undefined> {
|
||||
if (!isDesktop()) {
|
||||
@ -45,7 +41,7 @@ export async function renameProjectDirectory(
|
||||
projectPath: string,
|
||||
newName: string
|
||||
): Promise<string> {
|
||||
return invoke<string>('rename_project_directory', { projectPath, newName })
|
||||
return window.electron.ipcRenderer.invoke<string>('rename_project_directory', { projectPath, newName })
|
||||
}
|
||||
|
||||
// Get the initial default dir for holding all projects.
|
||||
|
Reference in New Issue
Block a user