diff --git a/src/app.js b/src/app.js index d19af373e6..2659ddb82f 100644 --- a/src/app.js +++ b/src/app.js @@ -412,7 +412,8 @@ Please make a backup of your contracts and start using http://remix.ethereum.org // get the file from gist const gistHandler = new GistHandler() const queryParams = new QueryParams() - const loadedFromGist = gistHandler.loadFromGist(queryParams.get(), fileManager) + const params = queryParams.get() + const loadedFromGist = gistHandler.loadFromGist(params, fileManager) if (!loadedFromGist) { // insert example contracts if there are no files to show self._components.filesProviders['browser'].resolveDirectory('/', (error, filesList) => { @@ -428,4 +429,6 @@ Please make a backup of your contracts and start using http://remix.ethereum.org if (isElectron()) { appManager.activatePlugin('remixd') } + + if (params.embed) framingService.embed() } diff --git a/src/app/panels/main-view.js b/src/app/panels/main-view.js index 6e9e2a4f54..38d8c0f388 100644 --- a/src/app/panels/main-view.js +++ b/src/app/panels/main-view.js @@ -80,7 +80,7 @@ export class MainView { self.data = { _layout: { top: { - offset: self._deps.config.get('terminal-top-offset') || 150, + offset: self._terminalTopOffset(), show: true } } @@ -97,6 +97,9 @@ export class MainView { }) } } + _terminalTopOffset () { + return this._deps.config.get('terminal-top-offset') || 150 + } _adjustLayout (direction, delta) { var limitUp = 0 var limitDown = 32 @@ -126,6 +129,12 @@ export class MainView { self._components.terminal.scroll2bottom() } } + minimizeTerminal () { + this._adjustLayout('top') + } + showTerminal (offset) { + this._adjustLayout('top', offset || this._terminalTopOffset()) + } getTerminal () { return this._components.terminal } diff --git a/src/framingService.js b/src/framingService.js index fa8a0d3237..1d59cf822b 100644 --- a/src/framingService.js +++ b/src/framingService.js @@ -34,4 +34,9 @@ export class FramingService { } }) } + + embed () { + this.mainView.minimizeTerminal() + this.resizeFeature.hidePanel() + } }