|
|
@ -29,8 +29,6 @@ function App() { |
|
|
|
if (filePath.endsWith('.circom')) { |
|
|
|
if (filePath.endsWith('.circom')) { |
|
|
|
dispatch({ type: 'SET_FILE_PATH', payload: filePath }) |
|
|
|
dispatch({ type: 'SET_FILE_PATH', payload: filePath }) |
|
|
|
plugin.parse(filePath) |
|
|
|
plugin.parse(filePath) |
|
|
|
} else { |
|
|
|
|
|
|
|
dispatch({ type: 'SET_FILE_PATH', payload: '' }) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
// @ts-ignore
|
|
|
|
// @ts-ignore
|
|
|
@ -40,6 +38,9 @@ function App() { |
|
|
|
plugin.parse(path, content) |
|
|
|
plugin.parse(path, content) |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
plugin.on('filePanel', 'setWorkspace', async () => { |
|
|
|
|
|
|
|
dispatch({ type: 'SET_FILE_PATH', payload: '' }) |
|
|
|
|
|
|
|
}) |
|
|
|
setIsPluginActivated(true) |
|
|
|
setIsPluginActivated(true) |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
@ -103,6 +104,9 @@ function App() { |
|
|
|
if (appState.autoCompile) await compileCircuit(plugin, appState) |
|
|
|
if (appState.autoCompile) await compileCircuit(plugin, appState) |
|
|
|
})() |
|
|
|
})() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
dispatch({ type: 'SET_SIGNAL_INPUTS', payload: [] }) |
|
|
|
|
|
|
|
dispatch({ type: 'SET_COMPILER_STATUS', payload: 'idle' }) |
|
|
|
|
|
|
|
dispatch({ type: 'SET_COMPILER_FEEDBACK', payload: null }) |
|
|
|
}, [appState.filePath]) |
|
|
|
}, [appState.filePath]) |
|
|
|
|
|
|
|
|
|
|
|
const setCurrentLocale = async () => { |
|
|
|
const setCurrentLocale = async () => { |
|
|
|