Merge pull request #1786 from ethereum/swap_it_style_fixes_l

Style fixes
pull/1/head
yann300 6 years ago committed by GitHub
commit 94f0ec55ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 21
      src/app/files/file-explorer.js
  2. 8
      src/app/files/styles/file-explorer-styles.js
  3. 14
      src/app/panels/editor-panel.js
  4. 49
      src/app/panels/styles/terminal-styles.js
  5. 2
      src/app/panels/tab-proxy.js
  6. 14
      src/app/panels/terminal.js
  7. 8
      src/app/tabs/compile-tab.js
  8. 16
      src/app/ui/dropdown.js
  9. 201
      src/app/ui/landing-page/landing-page.js
  10. 11
      src/app/ui/landing-page/section.js
  11. 27
      src/app/ui/landing-page/workspace.js
  12. 18
      src/app/ui/styles/dropdown-styles.js
  13. 1
      src/remixAppManager.js

@ -10,7 +10,6 @@ var Treeview = require('../ui/TreeView')
var modalDialog = require('../ui/modaldialog')
var EventManager = require('../../lib/events')
var contextMenu = require('../ui/contextMenu')
var addTooltip = require('../ui/tooltip')
var css = require('./styles/file-explorer-styles')
var globalRegistry = require('../../global/registry')
var queryParams = new QueryParams()
@ -63,6 +62,8 @@ function fileExplorer (localRegistry, files, menuItems) {
fileManager: self._components.registry.get('filemanager').api
}
self._components.registry.put({ api: self, name: `fileexplorer/${self.files.type}` })
// warn if file changed outside of Remix
function remixdDialog () {
return yo`<div>This file has been changed outside of Remix IDE.</div>`
@ -175,12 +176,12 @@ function fileExplorer (localRegistry, files, menuItems) {
MENU_HANDLE && MENU_HANDLE.hide(null, true)
MENU_HANDLE = contextMenu(event, {
'Rename': () => {
if (self.files.readonly) { return addTooltip('cannot rename folder. ' + self.files.type + ' is a read only explorer') }
if (self.files.readonly) { return tooltip('cannot rename folder. ' + self.files.type + ' is a read only explorer') }
var name = label.querySelector('label[data-path="' + key + '"]')
if (name) editModeOn(name)
},
'Delete': () => {
if (self.files.readonly) { return addTooltip('cannot delete folder. ' + self.files.type + ' is a read only explorer') }
if (self.files.readonly) { return tooltip('cannot delete folder. ' + self.files.type + ' is a read only explorer') }
modalDialogCustom.confirm(null, 'Do you want to delete this folder?', () => { files.remove(key) }, () => {})
}
})
@ -191,12 +192,12 @@ function fileExplorer (localRegistry, files, menuItems) {
MENU_HANDLE && MENU_HANDLE.hide(null, true)
MENU_HANDLE = contextMenu(event, {
'Rename': () => {
if (self.files.readonly) { return addTooltip('cannot rename file. ' + self.files.type + ' is a read only explorer') }
if (self.files.readonly) { return tooltip('cannot rename file. ' + self.files.type + ' is a read only explorer') }
var name = label.querySelector('label[data-path="' + key + '"]')
if (name) editModeOn(name)
},
'Delete': () => {
if (self.files.readonly) { return addTooltip('cannot delete file. ' + self.files.type + ' is a read only explorer') }
if (self.files.readonly) { return tooltip('cannot delete file. ' + self.files.type + ' is a read only explorer') }
modalDialogCustom.confirm(null, 'Do you want to delete this file?', () => { files.remove(key) }, () => {})
}
})
@ -427,7 +428,7 @@ fileExplorer.prototype.packageFiles = function (filesProvider, callback) {
else {
async.eachSeries(Object.keys(files), (path, cb) => {
filesProvider.get(path, (error, content) => {
if (/^\s+$/.test(content)) {
if (/^\s+$/.test(content) || !content.length) {
content = '// this line is added to create a gist. Empty file is not allowed.'
}
if (error) cb(error)
@ -507,7 +508,7 @@ fileExplorer.prototype.renderMenuItems = function () {
items = this.menuItems.map(({action, title, icon}) => {
if (action === 'uploadFile') {
return yo`
<label class="${icon} ${css.newFile}">
<label class="${icon} ${css.newFile}" title="${title}">
<input type="file" onchange=${(event) => {
event.stopPropagation()
this.uploadFile(event)
@ -516,14 +517,12 @@ fileExplorer.prototype.renderMenuItems = function () {
`
} else {
return yo`
<span onclick=${(event) => { event.stopPropagation(); this[ action ]() }} class="newFile ${css.newFile}" title=${title}>
<i class=${icon}></i>
</span>
<span onclick=${(event) => { event.stopPropagation(); this[ action ]() }} class="newFile ${icon} ${css.newFile}" title=${title}></span>
`
}
})
}
return yo`<span class=${css.menu}>${items}</span>`
return yo`<span class=" ${css.menu}">${items}</span>`
}
fileExplorer.prototype.ensureRoot = function (cb) {

@ -2,7 +2,7 @@ var csjs = require('csjs-inject')
var css = csjs`
.label {
margin-bottom : 0px;
margin-top : 4px
}
.fileexplorer {
box-sizing : border-box;
@ -19,13 +19,13 @@ var css = csjs`
padding : 4px;
}
.newFile {
padding : 4px;
padding-right : 5px;
}
.newFile i {
cursor : pointer;
}
.newFile i:hover {
color : var(--secondary)
.newFile:hover {
transform : scale(1.3);
}
.menu {
margin-left : 20px;

@ -50,6 +50,13 @@ class EditorPanel {
pluginManager: self._components.registry.get('pluginmanager').api
}
self.tabProxy = new TabProxy(self._deps.fileManager, self._components.editor, self.appStore, self.appManager)
let showApp = function (name) {
self.mainPanelComponent.showContent(name)
self._view.editor.style.display = 'none'
self._components.contextView.hide()
self._view.mainPanel.style.display = 'block'
}
self.appManager.event.on('ensureActivated', (name) => { if (name === 'home') { showApp(name) } })
/*
We listen here on event from the tab component to display / hide the editor and mainpanel
depending on the content that should be displayed
@ -65,12 +72,7 @@ class EditorPanel {
})
self.tabProxy.event.on('closeFile', (file) => {
})
self.tabProxy.event.on('switchApp', (name) => {
self.mainPanelComponent.showContent(name)
self._view.editor.style.display = 'none'
self._components.contextView.hide()
self._view.mainPanel.style.display = 'block'
})
self.tabProxy.event.on('switchApp', showApp)
self.tabProxy.event.on('closeApp', (name) => {
self._view.editor.style.display = 'block'
self._components.contextView.hide()

@ -21,6 +21,8 @@ var css = csjs`
display : flex;
align-items : center;
width : 100%;
border-bottom-style : ridge;
max-height : 35px;
}
.clear {
margin-right : 20px;
@ -54,10 +56,10 @@ var css = csjs`
background-size : auto calc(75% - 1.7em);
}
.terminal {
position: relative;
display: flex;
flex-direction: column;
height: 100%;
position : relative;
display : flex;
flex-direction : column;
height : 100%;
}
.journal {
margin-top : auto;
@ -89,9 +91,11 @@ var css = csjs`
font-family : monospace;
}
.search {
display: flex;
align-items: center;
margin-right: 10px;
display : flex;
align-items : center;
width : 200px;
padding-left : 20px;
height : 100%;
}
.filter {
width : 200px;
@ -99,22 +103,24 @@ var css = csjs`
margin-right : 0px;
border-top-left-radius : 0px;
border-bottom-left-radius : 0px;
height : 100%;
}
.searchIcon {
height : 25px;
height : 100%;
width : 25px;
border-top-left-radius : 3px;
border-bottom-left-radius : 3px;
display : flex;
align-items : center;
justify-content : center;
margin-right : 5px;
}
.listen {
margin-right: 30px;
min-width: 40px;
height: 13px;
display: flex;
align-items: center;
margin-right : 30px;
min-width : 40px;
height : 13px;
display : flex;
align-items : center;
}
.listenLabel {
min-width: 50px;
@ -122,18 +128,17 @@ var css = csjs`
.verticalLine {
border-left : 1px solid var(--secondary)
height : 65%;
margin-right : 30px;
}
.pendingTx {
border : 1px solid var(--secondary);
border-radius: 50%;
margin-right: 30px;
min-width: 13px;
height: 13px;
display: flex;
justify-content: center;
align-items: center;
font-size: 10px;
border-radius : 50%;
margin-right : 30px;
min-width : 13px;
height : 13px;
display : flex;
justify-content : center;
align-items : center;
font-size : 10px;
}
.dragbarHorizontal {
position : absolute;

@ -107,7 +107,7 @@ export class TabProxy {
</div>
`
let tabsbar = yo`
<div class="d-flex">
<div class="d-flex border-bottom">
<div class="m-1">
<span class="p-1">
<i class="m-1 fa fa-plus" style="color: var(--text-dark)" onclick=${increase} aria-hidden="true" title="increase editor font size"></i>

@ -128,7 +128,7 @@ class Terminal {
self._view.bar = yo`
<div class="${css.bar}">
${self._view.dragbar}
<div class=${css.menu}>
<div class="${css.menu} bg-light">
${self._view.icon}
<div class=${css.clear} onclick=${clear}>
<i class="fa fa-ban" aria-hidden="true" title="Clear console"
@ -136,15 +136,15 @@ class Terminal {
</div>
${self._view.pendingTxCount}
<div class=${css.verticalLine}></div>
<div class=${css.listen}>
<input id="listenNetworkCheck" onchange=${listenOnNetwork} type="checkbox" class="form-check-input"
<div class="form-check">
<input id="listenNetworkCheck" onchange=${listenOnNetwork} type="checkbox" class="form-check-input "
title="If checked Remix will listen on all transactions mined in the current environment and not only transactions created by you">
<label class="${css.listenLabel} form-check-label" title="If checked Remix will listen on all transactions mined in the current environment and not only transactions created by you" for="listenNetworkCheck">listen on network</label>
<label class="form-check-label" title="If checked Remix will listen on all transactions mined in the current environment and not only transactions created by you" for="listenNetworkCheck">listen on network</label>
</div>
${self._view.dropdown}
<div class=${css.search}>
<i class="fa fa-search ${css.searchIcon} bg-light btn" aria-hidden="true"></i>
<input spellcheck="false" type="text" class=${css.filter} onkeydown=${filter} placeholder="Search transactions">
<i class="fa fa-search ${css.searchIcon} bg-light btn-light" aria-hidden="true"></i>
<input spellcheck="false" type="text" class="${css.filter} form-control" onkeydown=${filter} placeholder="Search transactions">
</div>
</div>
</div>
@ -158,7 +158,7 @@ class Terminal {
</div>
`
self._view.el = yo`
<div class="${css.panel}">
<div class="${css.panel}" style="height: 180px;">
${self._view.bar}
${self._view.term}
</div>

@ -111,7 +111,8 @@ class CompileTab extends ApiFactory {
if (data['error']) {
this.renderer.error(data['error'].formattedMessage, this._view.errorContainer, {type: data['error'].severity || 'error'})
if (data['error'].mode === 'panic') {
return modalDialogCustom.alert(yo`<div><i class="fa fa-exclamation-circle ${css.panicError}" aria-hidden="true"></i>
return modalDialogCustom.alert(yo`
<div><i class="fa fa-exclamation-circle ${css.panicError}" aria-hidden="true"></i>
The compiler returned with the following internal error: <br> <b>${data['error'].formattedMessage}.<br>
The compiler might be in a non-sane state, please be careful and do not use further compilation data to deploy to mainnet.
It is heavily recommended to use another browser not affected by this issue (Firefox is known to not be affected).</b><br>
@ -289,7 +290,10 @@ class CompileTab extends ApiFactory {
})
if (details[propertyName] !== '') {
try {
node = yo`<div>${treeView.render(typeof details[propertyName] === 'object' ? details[propertyName] : JSON.parse(details[propertyName]))}</div>` // catch in case the parsing fails.
node = yo`
<div>
${treeView.render(typeof details[propertyName] === 'object' ? details[propertyName] : JSON.parse(details[propertyName]))}
</div>` // catch in case the parsing fails.
} catch (e) {
node = yo`<div>Unable to display "${propertyName}": ${e.message}</div>`
}

@ -45,11 +45,19 @@ class Dropdown {
</div>
`
self._view.el = yo`
<div class=${css.dropdown} onclick=${show}>
<div name="dropdown" class="${css.dropdown} form-control form-control-sm" onclick=${show}>
${self._view.selected}
<div class=${css.options} style="display: none;">
<div class="${css.options} bg-light" style="display: none;}">
${self.data._options.map(label => {
var input = yo`<input data-idx=${self.data._elements.length} onchange=${emit} type="checkbox" />`
let index = self.data._elements.length
var input = yo`
<input
data-idx=${index}
onchange=${emit}
type="${index === 2 ? 'checkbox' : 'radio'}"
id="${label}"
/>
`
if (self.data.selected.indexOf(label) !== -1) {
input.checked = true
self.event.trigger('select', [label])
@ -58,7 +66,7 @@ class Dropdown {
return yo`
<div class=${css.option}>
${input}
<label>${label}</label>
<label class="text-dark" for="${label}">${label}</label>
</div>
`
})}

@ -1,33 +1,38 @@
var yo = require('yo-yo')
var csjs = require('csjs-inject')
// var globalRegistry = require('../../../global/registry')
let yo = require('yo-yo')
let csjs = require('csjs-inject')
let globalRegistry = require('../../../global/registry')
let CompilerImport = require('../../compiler/compiler-imports')
var modalDialogCustom = require('../modal-dialog-custom')
var tooltip = require('../tooltip')
var css = csjs`
let css = csjs`
.sectionContainer {
display : table-cell;
display : flex;
flex-direction : column;
flex-wrap : wrap;
align-content : space-around;
padding : 20px;
max-width : 300px;
max-width : 340px;
min-height : 300px;
background-color: var(--light);
font-family : "Lucida Console", Monaco, monospace;
}
.landingPage {
height : 100%;
width : 100%;
background-color: var(--light);
flex-wrap : wrap;
justify-content : space-evenly;
user-select : none;
}
.im {
display : grid;
max-width : 150px;
max-height : 160px;
max-width : 200px;
max-height : 200px;
width : 100%;
height : 100%;
padding : 20px;
background-color: var(--bg-light);
align-self : center;
}
.im:hover {
}
@ -43,73 +48,109 @@ export class LandingPage extends ApiFactory {
constructor (appManager, appStore) {
super()
this.sections = []
/* var actionsStart = [
let load = function (item) {
let compilerImport = new CompilerImport()
let fileProviders = globalRegistry.get('fileproviders').api
modalDialogCustom.prompt(null, 'Enter the ' + item + ' you would like to load.', null, (target) => {
if (target !== '') {
compilerImport.import(
target,
(loadingMsg) => { tooltip(loadingMsg) },
(error, content, cleanUrl, type, url) => {
if (error) {
modalDialogCustom.alert(error)
} else {
if (fileProviders[type]) {
fileProviders[type].addReadOnly(cleanUrl, content, url)
}
}
}
)
}
})
}
var actionsStart = [
{ label: 'New file',
type: 'callback',
payload: () => {
let fileExplorer = globalRegistry.get('fileexplorer').api
fileExplorer.creatNewFile()
let fileExplorer = globalRegistry.get('fileexplorer/browser').api
fileExplorer.createNewFile()
}
},
{label: 'Import from GitHub', type: `callback`, payload: () => { this.alert(`-imported from GitHub-`) }},
{label: 'Import from gist', type: `callback`, payload: () => { this.alert(`-imported from gist-`) }},
{label: 'Import from swarm', type: `callback`, payload: () => { this.alert(`-imported from swarm-`) }},
{label: 'Import from ipfs', type: `callback`, payload: () => { this.alert(`-imported from ipfs-`) }},
{label: 'Import from gist', type: `callback`, payload: () => { this.alert(`-imported from gist-`) }},
{label: 'Open file', type: `callback`, payload: () => { this.alert(`-imported from gist-`) }}
] */
var actionsLearn = [
{ label: 'Remix documentation', type: `link`, payload: `https://remix.readthedocs.io/en/latest/#` },
{ label: 'GitHub repository', type: `link`, payload: `https://github.com/ethereum/remix-ide` },
{ label: 'Access local file system. remixd', type: `link`, payload: `https://remix.readthedocs.io/en/latest/tutorial_remixd_filesystem.html` },
{ label: 'npm module for remixd', type: `link`, payload: `https://www.npmjs.com/package/remixd` },
{ label: 'Medium posts', type: `link`, payload: `https://medium.com/remix-ide` },
{ label: 'Tutorials', type: `link`, payload: `https://github.com/ethereum/remix-workshops` }
]
var actionsPlugins = [
{ label: 'Remix plugins & modules', type: `link`, payload: `https://github.com/ethereum/remix-plugin/blob/master/readme.md` },
{ label: 'Repository on GitHub', type: `link`, payload: `https://github.com/ethereum/remix-plugin` },
{ label: 'Examples', type: `link`, payload: `https://github.com/ethereum/remix-plugin/tree/master/examples` },
{ label: 'Build a plugin for Remix', type: `link`, payload: `https://medium.com/remix-ide/build-a-plugin-for-remix-90d43b209c5a` }
{ label: 'Open file',
type: `callback`,
description: ``,
payload: () => { this.alert(`-imported from gist-`) }
},
{ label: 'Import from gist',
type: `callback`,
description: ``,
payload: () => {
let app = globalRegistry.get('app').api
app.loadFromGist({gist: ''})
}
},
{ label: 'Import from GitHub',
type: `callback`,
description: ``,
payload: () => {
load('URL')
}
},
{ label: 'Import from Swarm',
type: `callback`,
description: ``,
payload: () => { load('bzz-raw URL') }
},
{ label: 'Import from IPFS',
type: `callback`,
description: ``,
payload: () => { load('IPFS URL') }
},
{ label: 'Connect to localhost',
type: `callback`,
description: ``,
payload: () => {
appManager.ensureActivated('remixd')
}
}
]
var actionsHelp = [
{ label: 'Gitter channel', type: `link`, payload: `https://gitter.im/ethereum/remix` },
{ label: 'Stack Overflow', type: `link`, payload: `https://stackoverflow.com/questions/tagged/remix` },
{ label: 'Reddit', type: `link`, payload: `https://www.reddit.com/r/ethdev/search?q=remix&restrict_sr=1` }
{ label: 'Remix documentation', type: `link`, description: ``, payload: `https://remix.readthedocs.io/en/latest/#` },
{ label: 'Access local file system. remixd', description: ``, type: `link`, payload: `https://remix.readthedocs.io/en/latest/tutorial_remixd_filesystem.html` },
{ label: 'Medium posts', type: `link`, description: ``, payload: `https://medium.com/remix-ide` },
{ label: 'Plugins & modules', type: `link`, description: ``, payload: `https://github.com/ethereum/remix-plugin/blob/master/readme.md` },
{ label: 'GitHub repo', type: `link`, description: ``, payload: `https://github.com/ethereum/remix-ide` },
{ label: 'Gitter channel', type: `link`, description: ``, payload: `https://gitter.im/ethereum/remix` },
{ label: 'Stack Overflow', type: `link`, description: ``, payload: `https://stackoverflow.com/questions/tagged/remix` },
{ label: 'Reddit', type: `link`, description: ``, payload: `https://www.reddit.com/r/ethdev/search?q=remix&restrict_sr=1` }
]
// var sectionStart = new Section('Start', actionsStart)
var sectionLearn = new Section('Learn', actionsLearn)
var sectionPlugins = new Section('Plugins', actionsPlugins)
var sectionHelp = new Section('Help', actionsHelp)
var sectionStart = new Section('Start', actionsStart)
let sectionHelp = new Section('Help', actionsHelp)
var sectionsWorkspaces = []
this.sectionWorkspaceMain = []
this.sectionWorkspaceOthers = []
defaultWorkspaces(appManager).forEach((workspace) => {
sectionsWorkspaces.push({
if (workspace.isMain) {
this.sectionWorkspaceMain.push({
label: workspace.title,
type: 'callback',
description: workspace.description,
payload: () => { workspace.activate() }
})
})
sectionsWorkspaces.push({
label: 'Close All Modules',
} else {
this.sectionWorkspaceOthers.push({
label: workspace.title,
type: 'callback',
payload: () => {
appStore.getActives()
.filter(({ profile }) => !profile.required)
.forEach((profile) => { appManager.deactivateOne(profile.name) })
description: workspace.description,
payload: () => { workspace.activate() }
})
}
})
var sectionWorkspace = new Section('Workspaces', sectionsWorkspaces)
this.sections.push(sectionWorkspace)
// this.sections.push(sectionStart)
this.sections.push(sectionLearn)
this.sections.push(sectionPlugins)
this.sections.push(sectionStart)
this.sections.push(sectionHelp)
}
@ -131,20 +172,54 @@ export class LandingPage extends ApiFactory {
<div class="${css.landingPage}">
</div>
`
totalLook.appendChild(yo`
<div class="${css.sectionContainer} p-2">
<img class="${css.im}" src="${logo}" />
${this.sections[0].render()}
</div>
let main = yo`<div class="container m-4"></div>`
for (let i = 0; i < this.sectionWorkspaceMain.length; i++) {
main.appendChild(yo`
<span class="btn btn-secondary btn-lg m-2" onclick="${this.sectionWorkspaceMain[i].payload}">
${this.sectionWorkspaceMain[i].label}
</span>
`)
}
for (let i = 1; i < this.sections.length; i++) {
totalLook.appendChild(yo`
let others = yo`<div class="container m-4"></div>`
for (let i = 0; i < this.sectionWorkspaceOthers.length; i++) {
others.appendChild(yo`
<span class="btn btn-secondary btn-sm m-2" onclick="${this.sectionWorkspaceOthers[i].payload}">
${this.sectionWorkspaceOthers[i].label}
</span>
`)
}
let docs = yo`<div class="container m-4"></div>`
for (let i = 0; i < this.sections.length; i++) {
docs.appendChild(yo`
<div class="${css.sectionContainer} p-2">
${this.sections[i].render()}
</div>
`)
}
totalLook.appendChild(yo`
<div class="container-fluid">
<div class="row">
<div class="card m-4 p-4" style="min-width: 50%;">
<img class="card-img-top ${css.im}" src="${logo}" />
<div class="card-body-fluid m-4">
<h5 class="card-header m-4">Workspaces</h5>
<h6>Create, compile and execute smart contracts</h6>
<p>${main}</p>
<h6> Most used plugins</h6>
<p>${others}</p>
</div>
</div>
<div>
${docs}
</div>
</div>
</div>
`)
return totalLook
}
}

@ -6,6 +6,7 @@ var css = csjs`
cursor: pointer;
font-weight: normal;
max-width: 300px;
user-select: none;
}
.text:hover {
font-weight: bold;
@ -14,6 +15,7 @@ var css = csjs`
cursor: pointer;
font-weight: normal;
text-decoration : none;
user-select: none;
}
.link:hover {
font-weight: bold;
@ -25,13 +27,12 @@ class Section {
constructor (title, actions) {
this.title = title
this.actions = actions
this.cardStyle = (this.title === 'Workspaces') ? 'bg-success text-light' : 'bg-light text-dark border-dark'
}
render () {
let sectionLook = yo`
<div class="card ${this.cardStyle} p-3" style="min-width: 300px;">
<div class="card-header font-weight-bold">${this.title}</div>
<div class="card border-0 bg-light bd-light text-dark p-1" style="min-width: 300px; min-height: 210px;">
<div class="card-header font-weight-bold" style="user-select: none;">${this.title}</div>
<p></p>
</div>
`
@ -39,7 +40,7 @@ class Section {
if (this.actions[i].type === `callback`) {
sectionLook.appendChild(yo`
<div>
<span class ="${css.text}" onclick=${this.actions[i].payload} >
<span class="${css.text} text-dark" onclick=${this.actions[i].payload} >
${this.actions[i].label}
</span>
</div>
@ -47,7 +48,7 @@ class Section {
} else if (this.actions[i].type === `link`) {
sectionLook.appendChild(yo`
<div >
<a class="${css.link} text-decoration-none" href=${this.actions[i].payload} target="_blank" >
<a class="${css.link} text-dark text-decoration-none" href=${this.actions[i].payload} target="_blank" >
${this.actions[i].label}
</a>
</div>

@ -1,7 +1,8 @@
export class Workspace {
constructor (title, description, activate, deactivate) {
constructor (title, description, isMain, activate, deactivate) {
this.title = title
this.description = description
this.isMain = isMain
this.activate = activate
this.deactivate = deactivate
}
@ -9,23 +10,31 @@ export class Workspace {
export const defaultWorkspaces = (appManager) => {
return [
new Workspace('Solidity', '', () => {
new Workspace(
'Solidity',
'Writing smart contracts. It is used for implementing smart contracts on various blockchain platforms',
true,
() => {
appManager.ensureActivated('solidity')
appManager.ensureActivated('run')
appManager.ensureActivated('solidityStaticAnalysis')
appManager.ensureActivated('solidityUnitTesting')
}, () => {}),
new Workspace('Vyper', '', () => {
new Workspace(
'Vyper',
'Vyper is a contract-oriented, pythonic programming language that targets the Ethereum Virtual Machine (EVM)',
true,
() => {
appManager.ensureActivated('vyper')
appManager.ensureActivated('run')
}, () => {}),
new Workspace('Pipeline', '', () => {
new Workspace('Debugger', 'Debug transactions with remix', false, () => {
appManager.ensureActivated('debugger')
}, () => {}),
new Workspace('Pipeline', '', false, () => {
appManager.ensureActivated('solidity')
appManager.ensureActivated('run')
appManager.ensureActivated('pipeline')
}, () => {}),
new Workspace('Debugger', '', () => {
appManager.ensureActivated('debugger')
}, () => {})
appManager.ensureActivated('run')
})
]
}

@ -6,23 +6,22 @@ var css = csjs`
position : relative;
display : flex;
flex-direction : column;
margin-right : 10px;
margin-left : 10px;
width : auto;
}
.selectbox {
display : flex;
align-items : center;
margin : 3px;
cursor : pointer;
}
.selected {
display : inline-block;
min-width : 30ch;
max-width : 30ch;
white-space : nowrap;
text-overflow : ellipsis;
overflow : hidden;
padding : 3px;
margin-right : 10px;
min-width : 200px;
}
.icon {
padding : 0px 5px;
@ -32,15 +31,18 @@ var css = csjs`
display : flex;
flex-direction : column;
align-items : end;
top : 24px;
top : 32px;
left : 0;
width : 250px;
border : 1px solid var(--primary);
width : 245px;
border : 1px solid var(--dark);
border-radius : 3px;
border-top : 0;
padding-left : 5px;
}
.option {
margin: 0;
margin-left : 5px;
margin-top : 5px;
width : -webkit-fill-available;
}
`

@ -18,6 +18,7 @@ export class RemixAppManager extends AppManagerApi {
ensureActivated (apiName) {
if (!this.store.isActive(apiName)) this.activateOne(apiName)
this.event.emit('ensureActivated', apiName)
}
proxy () {

Loading…
Cancel
Save