diff --git a/apps/vyper/src/app/app.tsx b/apps/vyper/src/app/app.tsx index 18fc0f5a86..c971468947 100644 --- a/apps/vyper/src/app/app.tsx +++ b/apps/vyper/src/app/app.tsx @@ -131,11 +131,17 @@ const App = () => { -
+
-
- setEnvironment('remote')} label="Remote Compiler" className={`${state.environment === 'remote' ? 'd-flex mr-4' : 'd-flex mr-4 cursor-status'}`} /> - setEnvironment('local')} label="Local Compiler" className={`${state.environment === 'local' ? '' : `cursor-status`}`} /> +
+
+ setEnvironment('remote')} className={`custom-control-input ${state.environment === 'remote' ? 'd-flex mr-4' : 'd-flex mr-4 cursor-status'}`} /> + +
+
+ setEnvironment('local')} className={`custom-control-input ${state.environment === 'local' ? '' : `cursor-status`}`} /> + +
diff --git a/libs/remix-ui/solidity-compiler/src/lib/api/compiler-api.ts b/libs/remix-ui/solidity-compiler/src/lib/api/compiler-api.ts index 68e62915c5..0528aeda0a 100644 --- a/libs/remix-ui/solidity-compiler/src/lib/api/compiler-api.ts +++ b/libs/remix-ui/solidity-compiler/src/lib/api/compiler-api.ts @@ -28,7 +28,7 @@ export const CompilerApiMixin = (Base) => class extends Base { onContentChanged: () => void onFileClosed: (name: string) => void statusChanged: (data: { key: string, title?: string, type?: string }) => void - + setSolJsonBinData: (urls: iSolJsonBinData) => void initCompilerApi () { @@ -336,7 +336,7 @@ export const CompilerApiMixin = (Base) => class extends Base { await this.call('editor', 'addAnnotation', pos, file) } } - } + } } this.compiler.event.register('compilationFinished', this.data.eventHandlers.onCompilationFinished) @@ -360,6 +360,8 @@ export const CompilerApiMixin = (Base) => class extends Base { else this.compileTabLogic.runCompiler(undefined) } else if (this.currentFile && this.currentFile.endsWith('.circom')) { await this.call('circuit-compiler', 'compile', this.currentFile) + } else if (this.currentFile && this.currentFile.endsWith('.vy')) { + await this.call('vyper', 'vyperCompileCustomAction', this.currentFile) } } } @@ -370,7 +372,7 @@ export const CompilerApiMixin = (Base) => class extends Base { return new Promise((resolve) => { if (!data.contracts || (data.contracts && Object.keys(data.contracts).length === 0)) { return resolve({ - contractMap: {}, + contractMap: {}, contractsDetails: {}, target: source.target }) @@ -386,7 +388,7 @@ export const CompilerApiMixin = (Base) => class extends Base { ) }) return resolve({ - contractMap, + contractMap, contractsDetails, target: source.target })