double-click to open / open from cli (#3643)
* fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * add tests Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * Look at this (photo)Graph *in the voice of Nickelback* * remove unneeded rust Signed-off-by: Jess Frazelle <github@jessfraz.com> * remove dep on clap Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixups for imports Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix types Signed-off-by: Jess Frazelle <github@jessfraz.com> * bump Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
@ -60,6 +60,9 @@ const listMachines = async (): Promise<MachinesListing> => {
|
||||
const getMachineApiIp = async (): Promise<String | null> =>
|
||||
ipcRenderer.invoke('find_machine_api')
|
||||
|
||||
const loadProjectAtStartup = async (): Promise<string | null> =>
|
||||
ipcRenderer.invoke('loadProjectAtStartup')
|
||||
|
||||
contextBridge.exposeInMainWorld('electron', {
|
||||
login,
|
||||
// Passing fs directly is not recommended since it gives a lot of power
|
||||
@ -93,6 +96,7 @@ contextBridge.exposeInMainWorld('electron', {
|
||||
isWindows,
|
||||
isLinux,
|
||||
},
|
||||
loadProjectAtStartup,
|
||||
// IMPORTANT NOTE: kittycad.ts reads process.env.BASE_URL. But there is
|
||||
// no way to set it across the bridge boundary. We need to make it a command.
|
||||
setBaseUrl: (value: string) => (process.env.BASE_URL = value),
|
||||
|
Reference in New Issue
Block a user