diff --git a/src/app/contract/contractParser.js b/src/app/contract/contractParser.js index 5f45cea55a..27796062d8 100644 --- a/src/app/contract/contractParser.js +++ b/src/app/contract/contractParser.js @@ -1,6 +1,5 @@ 'use strict' -var $ = require('jquery') var txHelper = require('../execution/txHelper') module.exports = (contractName, contract, compiledSource) => { @@ -63,7 +62,7 @@ var formatAssemblyText = function (asm, prefix, source) { return prefix + asm + '\n' } var text = prefix + '.code\n' - $.each(asm['.code'], function (i, item) { + asm['.code'].forEach(function (item, _i) { var v = item.value === undefined ? '' : item.value var src = '' if (item.begin !== undefined && item.end !== undefined) { @@ -78,11 +77,12 @@ var formatAssemblyText = function (asm, prefix, source) { text += prefix + item.name + ' ' + v + '\t\t\t' + src + '\n' }) text += prefix + '.data\n' - if (asm['.data']) { - $.each(asm['.data'], function (i, item) { - text += ' ' + prefix + '' + i + ':\n' - text += formatAssemblyText(item, prefix + ' ', source) - }) + let asmData = (asm['.data'] || []) + for (let i in asmData) { + let item = asmData[i] + + text += ' ' + prefix + '' + i + ':\n' + text += formatAssemblyText(item, prefix + ' ', source) } return text } diff --git a/src/app/panels/editor-panel.js b/src/app/panels/editor-panel.js index 605e8995ec..9c7cb19ab1 100644 --- a/src/app/panels/editor-panel.js +++ b/src/app/panels/editor-panel.js @@ -1,181 +1,12 @@ -var csjs = require('csjs-inject') var yo = require('yo-yo') var remixLib = require('remix-lib') var EventManager = remixLib.EventManager -var styleGuide = remixLib.ui.themeChooser -var styles = styleGuide.chooser() var Terminal = require('./terminal') -var cssTabs = yo` - -` - -var css = csjs` - .editorpanel { - display : flex; - flex-direction : column; - height : 100%; - } - .tabsbar { - background-color : ${styles.editor.backgroundColor_Panel}; - display : flex; - overflow : hidden; - height : 30px; - } - .tabs { - position : relative; - display : flex; - margin : 0; - left : 10px; - margin-right : 10px; - width : 100%; - overflow : hidden; - } - .files { - display : flex; - position : relative; - list-style : none; - margin : 0; - font-size : 15px; - height : 2.5em; - box-sizing : border-box; - line-height : 2em; - top : 0; - border-bottom : 0 none; - } - .changeeditorfontsize { - margin : 0; - font-size : 9px; - margin-top : 0.5em; - } - .changeeditorfontsize i { - cursor : pointer; - display : block; - color : ${styles.editor.icon_Color_Editor}; - } - .changeeditorfontsize i { - cursor : pointer; - } - .changeeditorfontsize i:hover { - color : ${styles.editor.icon_HoverColor_Editor}; - } - .buttons { - display : flex; - flex-direction : row; - justify-content : space-around; - align-items : center; - min-width : 45px; - } - .toggleLHP { - display : flex; - padding : 10px; - width : 100%; - font-weight : bold; - color : ${styles.leftPanel.icon_Color_TogglePanel}; - } - .toggleLHP i { - cursor : pointer; - font-size : 14px; - font-weight : bold; - } - .toggleLHP i:hover { - color : ${styles.leftPanel.icon_HoverColor_TogglePanel}; - } - .scroller { - position : absolute; - z-index : 999; - text-align : center; - cursor : pointer; - vertical-align : middle; - background-color : ${styles.colors.general_BackgroundColor}; - height : 100%; - font-size : 1.3em; - color : orange; - } - .scrollerright { - right : 0; - margin-right : 15px; - } - .scrollerleft { - left : 0; - } - .toggleRHP { - margin : 0.5em; - font-weight : bold; - color : ${styles.rightPanel.icon_Color_TogglePanel}; - right : 0; - } - .toggleRHP i { - cursor : pointer; - font-size : 14px; - font-weight : bold; - } - .toggleRHP i:hover { - color : ${styles.rightPanel.icon_HoverColor_TogglePanel}; - } - .show { - opacity : 1; - transition : .3s opacity ease-in; - } - .hide { - opacity : 0; - pointer-events : none; - transition : .3s opacity ease-in; - } - .content { - position : relative; - display : flex; - flex-direction : column; - height : 100%; - width : 100%; - } - .contextviewcontainer{ - width : 100%; - height : 20px; - background-color : ${styles.editor.backgroundColor_Tabs_Highlights}; - } -` +var styles = require('./styles/editor-panel-styles') +var cssTabs = styles.cssTabs +var css = styles.css class EditorPanel { constructor (opts = {}) { diff --git a/src/app/panels/file-panel.js b/src/app/panels/file-panel.js index bb4015ff32..1547f66896 100644 --- a/src/app/panels/file-panel.js +++ b/src/app/panels/file-panel.js @@ -1,6 +1,5 @@ var async = require('async') var $ = require('jquery') -var csjs = require('csjs-inject') var yo = require('yo-yo') var minixhr = require('minixhr') // simple and small cross-browser XMLHttpRequest (XHR) var remixLib = require('remix-lib') @@ -15,110 +14,7 @@ var helper = require('../../lib/helper') var styleGuide = remixLib.ui.themeChooser var styles = styleGuide.chooser() -module.exports = filepanel - -var css = csjs` - .container { - display : flex; - flex-direction : row; - width : 100%; - height : 100%; - box-sizing : border-box; - } - .fileexplorer { - display : flex; - flex-direction : column; - position : relative; - width : 100%; - } - .menu { - margin-top : -0.2em; - flex-shrink : 0; - display : flex; - flex-direction : row; - min-width : 160px; - } - .newFile { - padding : 10px; - } - .newFile i { - cursor : pointer; - } - .newFile i:hover { - color : ${styles.colors.orange}; - } - .gist { - padding : 10px; - } - .gist i { - cursor : pointer; - } - .gist i:hover { - color : orange; - } - .copyFiles { - padding : 10px; - } - .copyFiles i { - cursor : pointer; - } - .copyFiles i:hover { - color : orange; - } - .connectToLocalhost { - padding : 10px; - } - .connectToLocalhost i { - cursor : pointer; - } - .connectToLocalhost i:hover { - color : ${styles.colors.orange}; - } - .uploadFile { - padding : 10px; - } - .uploadFile label:hover { - color : ${styles.colors.orange}; - } - .uploadFile label { - cursor : pointer; - } - .treeview { - background-color : ${styles.colors.general_BackgroundColor}; - } - .treeviews { - overflow-y : auto; - } - .dragbar { - position : absolute; - top : 37px; - width : 0.5em; - right : 0; - bottom : 0; - cursor : col-resize; - z-index : 999; - border-right : 2px solid hsla(215, 81%, 79%, .3); - } - .ghostbar { - width : 3px; - background-color : ${styles.colors.lightBlue}; - opacity : 0.5; - position : absolute; - cursor : col-resize; - z-index : 9999; - top : 0; - bottom : 0; - } - .dialog { - display: flex; - flex-direction: column; - } - .dialogParagraph { - ${styles.infoTextBox} - margin-bottom: 2em; - word-break: break-word; - } -` +var css = require('./styles/file-panel-styles') var limit = 60 var canUpload = window.File || window.FileReader || window.FileList || window.Blob @@ -403,3 +299,5 @@ function packageFiles (files, callback) { callback(null, ret) }) } + +module.exports = filepanel diff --git a/src/app/panels/righthand-panel.js b/src/app/panels/righthand-panel.js index f870913867..53f65c5f85 100644 --- a/src/app/panels/righthand-panel.js +++ b/src/app/panels/righthand-panel.js @@ -11,111 +11,7 @@ var supportTab = require('../tabs/support-tab') var pluginTab = require('../tabs/plugin-tab') var PluginManager = require('../../pluginManager') -// -------------- styling ---------------------- -var csjs = require('csjs-inject') -var styleGuide = remixLib.ui.themeChooser -var styles = styleGuide.chooser() - -var css = csjs` - #righthand-panel { - display: flex; - flex-direction: column; - top: 0; - right: 0; - bottom: 0; - box-sizing: border-box; - overflow: hidden; - } - #optionViews { - background-color: ${styles.rightPanel.backgroundColor_Tab}; - overflow: scroll; - height: 100%; - } - #optionViews > div { - display: none; - } - #optionViews .pre { - word-wrap: break-word; - background-color: ${styles.rightPanel.BackgroundColor_Pre}; - border-radius: 3px; - display: inline-block; - padding: 0 0.6em; - } - #optionViews .hide { - display: none; - } - a { - color: ${styles.rightPanel.text_link}; - } - .menu { - display: flex; - background-color: ${styles.rightPanel.BackgroundColor_Pre}; - } - .options { - float: left; - padding-top: 0.7em; - min-width: 60px; - font-size: 0.9em; - cursor: pointer; - font-size: 1em; - text-align: center; - } - .opts { - display: flex; - list-style: none; - margin: 0; - padding: 0; - } - .opts_li { - display: block; - font-weight: bold; - color: ${styles.rightPanel.text_Teriary}; - } - .opts_li.active { - color: ${styles.rightPanel.text_Primary}; - } - .opts_li:hover { - color: ${styles.rightPanel.icon_HoverColor_TogglePanel}; - } - .dragbar { - position : absolute; - width : 0.5em; - top : 3em; - bottom : 0; - cursor : col-resize; - z-index : 999; - border-left : 2px solid ${styles.rightPanel.bar_Dragging}; - } - .ghostbar { - width : 3px; - background-color : ${styles.rightPanel.bar_Ghost}; - opacity : 0.5; - position : absolute; - cursor : col-resize; - z-index : 9999; - top : 0; - bottom : 0; - } - .panel { - height : 100%; - } - .header { - height : 100%; - } - .solIcon { - margin-left: 10px; - margin-right: 30px; - display: flex; - align-self: center; - height: 29px; - width: 20px; - background-color: ${styles.colors.transparent}; - } -` - -// ------------------------------------------------------------------ - -module.exports = RighthandPanel +var css = require('./styles/righthand-panel-styles') function RighthandPanel (appAPI, events, opts) { var self = this @@ -146,21 +42,21 @@ function RighthandPanel (appAPI, events, opts) { // load tabbed menu component var tabEvents = {compiler: events.compiler, app: events.app, rhp: self.event} - self._view.tabbedMenu = new TabbedMenu(options, {}, tabEvents, {}) + self._view.tabbedMenu = new TabbedMenu(options, tabEvents) events.rhp = self.event this._view.tabbedMenu.addTab('Compile', 'compileView', compileTab(optionViews, appAPI, events, opts)) - this._view.tabbedMenu.addTab('Run', 'runView', runTab(optionViews, appAPI, events, opts)) - this._view.tabbedMenu.addTab('Settings', 'settingsView', settingsTab(optionViews, appAPI, events, opts)) - this._view.tabbedMenu.addTab('Analysis', 'staticanalysisView', analysisTab(optionViews, appAPI, events, opts)) - this._view.tabbedMenu.addTab('Debugger', 'debugView', debuggerTab(optionViews, appAPI, events, opts)) - this._view.tabbedMenu.addTab('Support', 'supportView', supportTab(optionViews, appAPI, events, opts)) + this._view.tabbedMenu.addTab('Run', 'runView', runTab(optionViews, appAPI, events)) + this._view.tabbedMenu.addTab('Settings', 'settingsView', settingsTab(optionViews, appAPI, events)) + this._view.tabbedMenu.addTab('Analysis', 'staticanalysisView', analysisTab(optionViews)) + this._view.tabbedMenu.addTab('Debugger', 'debugView', debuggerTab(optionViews)) + this._view.tabbedMenu.addTab('Support', 'supportView', supportTab(optionViews)) this._view.tabbedMenu.selectTabByTitle('Compile') self.pluginManager = new PluginManager(appAPI, events) events.rhp.register('plugin-loadRequest', (json) => { - var content = pluginTab(optionViews, {}, {}, {}, json.url) + var content = pluginTab(optionViews, json.url) this._view.tabbedMenu.addTab(json.title, 'plugin', content) self.pluginManager.register(json, content) }) @@ -211,3 +107,5 @@ function RighthandPanel (appAPI, events, opts) { } } } + +module.exports = RighthandPanel diff --git a/src/app/panels/styles/editor-panel-styles.js b/src/app/panels/styles/editor-panel-styles.js new file mode 100644 index 0000000000..2d9ece153b --- /dev/null +++ b/src/app/panels/styles/editor-panel-styles.js @@ -0,0 +1,180 @@ +var yo = require('yo-yo') +var csjs = require('csjs-inject') +var remixLib = require('remix-lib') +var styleGuide = remixLib.ui.themeChooser +var styles = styleGuide.chooser() + +var cssTabs = yo` + +` + +var css = csjs` + .editorpanel { + display : flex; + flex-direction : column; + height : 100%; + } + .tabsbar { + background-color : ${styles.editor.backgroundColor_Panel}; + display : flex; + overflow : hidden; + height : 30px; + } + .tabs { + position : relative; + display : flex; + margin : 0; + left : 10px; + margin-right : 10px; + width : 100%; + overflow : hidden; + } + .files { + display : flex; + position : relative; + list-style : none; + margin : 0; + font-size : 15px; + height : 2.5em; + box-sizing : border-box; + line-height : 2em; + top : 0; + border-bottom : 0 none; + } + .changeeditorfontsize { + margin : 0; + font-size : 9px; + margin-top : 0.5em; + } + .changeeditorfontsize i { + cursor : pointer; + display : block; + color : ${styles.editor.icon_Color_Editor}; + } + .changeeditorfontsize i { + cursor : pointer; + } + .changeeditorfontsize i:hover { + color : ${styles.editor.icon_HoverColor_Editor}; + } + .buttons { + display : flex; + flex-direction : row; + justify-content : space-around; + align-items : center; + min-width : 45px; + } + .toggleLHP { + display : flex; + padding : 10px; + width : 100%; + font-weight : bold; + color : ${styles.leftPanel.icon_Color_TogglePanel}; + } + .toggleLHP i { + cursor : pointer; + font-size : 14px; + font-weight : bold; + } + .toggleLHP i:hover { + color : ${styles.leftPanel.icon_HoverColor_TogglePanel}; + } + .scroller { + position : absolute; + z-index : 999; + text-align : center; + cursor : pointer; + vertical-align : middle; + background-color : ${styles.colors.general_BackgroundColor}; + height : 100%; + font-size : 1.3em; + color : orange; + } + .scrollerright { + right : 0; + margin-right : 15px; + } + .scrollerleft { + left : 0; + } + .toggleRHP { + margin : 0.5em; + font-weight : bold; + color : ${styles.rightPanel.icon_Color_TogglePanel}; + right : 0; + } + .toggleRHP i { + cursor : pointer; + font-size : 14px; + font-weight : bold; + } + .toggleRHP i:hover { + color : ${styles.rightPanel.icon_HoverColor_TogglePanel}; + } + .show { + opacity : 1; + transition : .3s opacity ease-in; + } + .hide { + opacity : 0; + pointer-events : none; + transition : .3s opacity ease-in; + } + .content { + position : relative; + display : flex; + flex-direction : column; + height : 100%; + width : 100%; + } + .contextviewcontainer{ + width : 100%; + height : 20px; + background-color : ${styles.editor.backgroundColor_Tabs_Highlights}; + } +` + +module.exports = { + cssTabs: cssTabs, + css: css +} diff --git a/src/app/panels/styles/file-panel-styles.js b/src/app/panels/styles/file-panel-styles.js new file mode 100644 index 0000000000..6bd243422e --- /dev/null +++ b/src/app/panels/styles/file-panel-styles.js @@ -0,0 +1,109 @@ +var csjs = require('csjs-inject') +var remixLib = require('remix-lib') +var styleGuide = remixLib.ui.themeChooser +var styles = styleGuide.chooser() + +var css = csjs` + .container { + display : flex; + flex-direction : row; + width : 100%; + height : 100%; + box-sizing : border-box; + } + .fileexplorer { + display : flex; + flex-direction : column; + position : relative; + width : 100%; + } + .menu { + margin-top : -0.2em; + flex-shrink : 0; + display : flex; + flex-direction : row; + min-width : 160px; + } + .newFile { + padding : 10px; + } + .newFile i { + cursor : pointer; + } + .newFile i:hover { + color : ${styles.colors.orange}; + } + .gist { + padding : 10px; + } + .gist i { + cursor : pointer; + } + .gist i:hover { + color : orange; + } + .copyFiles { + padding : 10px; + } + .copyFiles i { + cursor : pointer; + } + .copyFiles i:hover { + color : orange; + } + .connectToLocalhost { + padding : 10px; + } + .connectToLocalhost i { + cursor : pointer; + } + .connectToLocalhost i:hover { + color : ${styles.colors.orange}; + } + .uploadFile { + padding : 10px; + } + .uploadFile label:hover { + color : ${styles.colors.orange}; + } + .uploadFile label { + cursor : pointer; + } + .treeview { + background-color : ${styles.colors.general_BackgroundColor}; + } + .treeviews { + overflow-y : auto; + } + .dragbar { + position : absolute; + top : 37px; + width : 0.5em; + right : 0; + bottom : 0; + cursor : col-resize; + z-index : 999; + border-right : 2px solid hsla(215, 81%, 79%, .3); + } + .ghostbar { + width : 3px; + background-color : ${styles.colors.lightBlue}; + opacity : 0.5; + position : absolute; + cursor : col-resize; + z-index : 9999; + top : 0; + bottom : 0; + } + .dialog { + display: flex; + flex-direction: column; + } + .dialogParagraph { + ${styles.infoTextBox} + margin-bottom: 2em; + word-break: break-word; + } +` + +module.exports = css diff --git a/src/app/panels/styles/righthand-panel-styles.js b/src/app/panels/styles/righthand-panel-styles.js new file mode 100644 index 0000000000..3233706d88 --- /dev/null +++ b/src/app/panels/styles/righthand-panel-styles.js @@ -0,0 +1,103 @@ +var csjs = require('csjs-inject') +var remixLib = require('remix-lib') +var styleGuide = remixLib.ui.themeChooser +var styles = styleGuide.chooser() + +var css = csjs` + #righthand-panel { + display: flex; + flex-direction: column; + top: 0; + right: 0; + bottom: 0; + box-sizing: border-box; + overflow: hidden; + } + #optionViews { + background-color: ${styles.rightPanel.backgroundColor_Tab}; + overflow: scroll; + height: 100%; + } + #optionViews > div { + display: none; + } + #optionViews .pre { + word-wrap: break-word; + background-color: ${styles.rightPanel.BackgroundColor_Pre}; + border-radius: 3px; + display: inline-block; + padding: 0 0.6em; + } + #optionViews .hide { + display: none; + } + a { + color: ${styles.rightPanel.text_link}; + } + .menu { + display: flex; + background-color: ${styles.rightPanel.BackgroundColor_Pre}; + } + .options { + float: left; + padding-top: 0.7em; + min-width: 60px; + font-size: 0.9em; + cursor: pointer; + font-size: 1em; + text-align: center; + } + .opts { + display: flex; + list-style: none; + margin: 0; + padding: 0; + } + .opts_li { + display: block; + font-weight: bold; + color: ${styles.rightPanel.text_Teriary}; + } + .opts_li.active { + color: ${styles.rightPanel.text_Primary}; + } + .opts_li:hover { + color: ${styles.rightPanel.icon_HoverColor_TogglePanel}; + } + .dragbar { + position : absolute; + width : 0.5em; + top : 3em; + bottom : 0; + cursor : col-resize; + z-index : 999; + border-left : 2px solid ${styles.rightPanel.bar_Dragging}; + } + .ghostbar { + width : 3px; + background-color : ${styles.rightPanel.bar_Ghost}; + opacity : 0.5; + position : absolute; + cursor : col-resize; + z-index : 9999; + top : 0; + bottom : 0; + } + .panel { + height : 100%; + } + .header { + height : 100%; + } + .solIcon { + margin-left: 10px; + margin-right: 30px; + display: flex; + align-self: center; + height: 29px; + width: 20px; + background-color: ${styles.colors.transparent}; + } +` + +module.exports = css diff --git a/src/app/panels/styles/terminal-styles.js b/src/app/panels/styles/terminal-styles.js new file mode 100644 index 0000000000..cbb3d04422 --- /dev/null +++ b/src/app/panels/styles/terminal-styles.js @@ -0,0 +1,167 @@ +var csjs = require('csjs-inject') +var remixLib = require('remix-lib') +var styleGuide = remixLib.ui.themeChooser +var styles = styleGuide.chooser() + +var css = csjs` + .panel { + position : relative; + display : flex; + flex-direction : column; + font-size : 12px; + color : ${styles.terminal.text_Regular_TransactionLog}; + background-color : ${styles.terminal.backgroundColor_Terminal}; + height : 100%; + min-height : 1.7em; + overflow : hidden; + } + .bar { + display : flex; + min-height : 3em; + padding : 2px; + background-color : ${styles.terminal.backgroundColor_Menu}; + z-index : 3; + } + .menu { + color : ${styles.terminal.text_Primary}; + position : relative; + display : flex; + align-items : center; + width : 100%; + padding : 5px; + } + .clear { + margin-left : 10px; + margin-right : 10px; + width : 10px; + cursor : pointer; + color : ${styles.terminal.icon_Color_TogglePanel}; + } + .clear:hover { + color : ${styles.terminal.icon_HoverColor_Menu}; + } + .toggleTerminal { + margin-right : 10px; + font-size : 14px; + font-weight : bold; + cursor : pointer; + color : ${styles.terminal.icon_Color_Menu}; + } + .toggleTerminal:hover { + color : ${styles.terminal.icon_HoverColor_TogglePanel}; + } + .terminal_container { + background-color : ${styles.terminal.backgroundColor_Terminal}; + display : flex; + flex-direction : column; + height : 100%; + overflow-y : auto; + font-family : monospace; + } + .terminal_bg { + display : flex; + flex-direction : column; + height : 100%; + padding-left : 5px; + padding-right : 5px; + padding-bottom : 3px; + overflow-y : auto; + font-family : monospace; + background-image : ${styles.terminal.backgroundImage_Terminal}; + opacity : 0.1; + top : 15%; + left : 33%; + bottom : 0; + right : 0; + position : absolute; + background-repeat : no-repeat; + background-size : 45%; + } + .terminal { + position: relative; + display: flex; + flex-direction: column; + height: 100%; + } + .journal { + margin-top : auto; + font-family : monospace; + } + .block { + word-break : break-all; + white-space : pre-wrap; + line-height : 2ch; + margin : 1ch; + margin-top : 2ch; + } + .cli { + line-height : 1.7em; + font-family : monospace; + background-color : ${styles.terminal.backgroundColor_TerminalCLI}; + padding : .4em; + color : ${styles.appProperties.mainText_Color}; + border-top : solid 2px ${styles.terminal.bar_Ghost}; + } + .prompt { + margin-right : 0.5em; + font-family : monospace; + font-weight : bold; + font-size : large; + color : ${styles.appProperties.supportText_OppositeColor}; + } + .input { + word-break : break-all; + outline : none; + font-family : monospace; + } + .search { + display: flex; + align-items: center; + margin-right: 10px; + } + .filter { + ${styles.terminal.input_Search_MenuBar} + width : 200px; + padding-right : 0px; + margin-right : 0px; + border-top-left-radius : 0px; + border-bottom-left-radius : 0px; + } + .searchIcon { + background-color : ${styles.colors.veryLightGrey}; + color : ${styles.terminal.icon_Color_Menu}; + height : 25px; + width : 25px; + border-top-left-radius : 3px; + border-bottom-left-radius : 3px; + display : flex; + align-items : center; + justify-content : center; + } + .listen { + min-width : 120px; + display : flex; + } + .dragbarHorizontal { + position : absolute; + top : 0; + height : 0.5em; + right : 0; + left : 0; + cursor : ns-resize; + z-index : 999; + border-top : 2px solid ${styles.terminal.bar_Dragging}; + } + .ghostbar { + position : absolute; + height : 6px; + background-color : ${styles.terminal.bar_Ghost}; + opacity : 0.5; + cursor : row-resize; + z-index : 9999; + left : 0; + right : 0; + } +` + +module.exports = css diff --git a/src/app/panels/terminal.js b/src/app/panels/terminal.js index 914799689a..0095b96704 100644 --- a/src/app/panels/terminal.js +++ b/src/app/panels/terminal.js @@ -11,172 +11,11 @@ var Web3 = require('web3') var executionContext = require('../../execution-context') var Dropdown = require('../ui/dropdown') -// -------------- styling ---------------------- var csjs = require('csjs-inject') - var styleGuide = remixLib.ui.themeChooser var styles = styleGuide.chooser() -var css = csjs` - .panel { - position : relative; - display : flex; - flex-direction : column; - font-size : 12px; - color : ${styles.terminal.text_Regular_TransactionLog}; - background-color : ${styles.terminal.backgroundColor_Terminal}; - height : 100%; - min-height : 1.7em; - overflow : hidden; - } - .bar { - display : flex; - min-height : 3em; - padding : 2px; - background-color : ${styles.terminal.backgroundColor_Menu}; - z-index : 3; - } - .menu { - color : ${styles.terminal.text_Primary}; - position : relative; - display : flex; - align-items : center; - width : 100%; - padding : 5px; - } - .clear { - margin-left : 10px; - margin-right : 10px; - width : 10px; - cursor : pointer; - color : ${styles.terminal.icon_Color_TogglePanel}; - } - .clear:hover { - color : ${styles.terminal.icon_HoverColor_Menu}; - } - .toggleTerminal { - margin-right : 10px; - font-size : 14px; - font-weight : bold; - cursor : pointer; - color : ${styles.terminal.icon_Color_Menu}; - } - .toggleTerminal:hover { - color : ${styles.terminal.icon_HoverColor_TogglePanel}; - } - .terminal_container { - background-color : ${styles.terminal.backgroundColor_Terminal}; - display : flex; - flex-direction : column; - height : 100%; - overflow-y : auto; - font-family : monospace; - } - .terminal_bg { - display : flex; - flex-direction : column; - height : 100%; - padding-left : 5px; - padding-right : 5px; - padding-bottom : 3px; - overflow-y : auto; - font-family : monospace; - background-image : ${styles.terminal.backgroundImage_Terminal}; - opacity : 0.1; - top : 15%; - left : 33%; - bottom : 0; - right : 0; - position : absolute; - background-repeat : no-repeat; - background-size : 45%; - } - .terminal { - position: relative; - display: flex; - flex-direction: column; - height: 100%; - } - .journal { - margin-top : auto; - font-family : monospace; - } - .block { - word-break : break-all; - white-space : pre-wrap; - line-height : 2ch; - margin : 1ch; - margin-top : 2ch; - } - .cli { - line-height : 1.7em; - font-family : monospace; - background-color : ${styles.terminal.backgroundColor_TerminalCLI}; - padding : .4em; - color : ${styles.appProperties.mainText_Color}; - border-top : solid 2px ${styles.terminal.bar_Ghost}; - } - .prompt { - margin-right : 0.5em; - font-family : monospace; - font-weight : bold; - font-size : large; - color : ${styles.appProperties.supportText_OppositeColor}; - } - .input { - word-break : break-all; - outline : none; - font-family : monospace; - } - .search { - display: flex; - align-items: center; - margin-right: 10px; - } - .filter { - ${styles.terminal.input_Search_MenuBar} - width : 200px; - padding-right : 0px; - margin-right : 0px; - border-top-left-radius : 0px; - border-bottom-left-radius : 0px; - } - .searchIcon { - background-color : ${styles.colors.veryLightGrey}; - color : ${styles.terminal.icon_Color_Menu}; - height : 25px; - width : 25px; - border-top-left-radius : 3px; - border-bottom-left-radius : 3px; - display : flex; - align-items : center; - justify-content : center; - } - .listen { - min-width : 120px; - display : flex; - } - .dragbarHorizontal { - position : absolute; - top : 0; - height : 0.5em; - right : 0; - left : 0; - cursor : ns-resize; - z-index : 999; - border-top : 2px solid ${styles.terminal.bar_Dragging}; - } - .ghostbar { - position : absolute; - height : 6px; - background-color : ${styles.terminal.bar_Ghost}; - opacity : 0.5; - cursor : row-resize; - z-index : 9999; - left : 0; - right : 0; - } -` +var css = require('./styles/terminal-styles') var KONSOLES = [] diff --git a/src/app/tabs/analysis-tab.js b/src/app/tabs/analysis-tab.js index bf17e4037a..8042a42ab1 100644 --- a/src/app/tabs/analysis-tab.js +++ b/src/app/tabs/analysis-tab.js @@ -1,34 +1,7 @@ var yo = require('yo-yo') -var remixLib = require('remix-lib') +var css = require('./styles/analysis-tab-styles') -// -------------- styling ---------------------- -var csjs = require('csjs-inject') -var styleGuide = remixLib.ui.themeChooser -var styles = styleGuide.chooser() - -var css = csjs` - .analysisTabView { - padding: 2%; - padding-bottom: 3em; - display: flex; - flex-direction: column; - } - #staticanalysisView { - display: block; - } - .infoBox { - ${styles.infoTextBox} - margin-bottom: 1em; - } - .textBox { - ${styles.textBoxL} - margin-bottom: 1em; - } -` - -module.exports = analysisTab - -function analysisTab (container, appAPI, events, opts) { +function analysisTab (container) { var el = yo`