diff --git a/package.json b/package.json index 1d0e6636a7..58d3cfd85c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "remix-ide", - "version": "v0.8.0-rc.1", + "version": "v0.8.0", "description": "Minimalistic browser-based Solidity IDE", "devDependencies": { "@fortawesome/fontawesome-free": "^5.8.1", @@ -68,7 +68,7 @@ }, "dependencies": { "http-server": "^0.11.1", - "remix-plugin": "0.0.2-alpha.8", + "remix-plugin": "0.0.2-alpha.9", "remixd": "0.1.8-alpha.6" }, "repository": { @@ -156,7 +156,7 @@ "remix-ide": "./bin/remix-ide" }, "scripts": { - "setupremix": "npm run linkremixdebug && npm run linkremixlib && npm run linkremixsolidity && npm run linkremixsimulator && npm run linkremixtests", + "setupremix": "npm run linkremixdebug && npm run linkremixlib && npm run linkremixsolidity && npm run linkremixanalyzer && npm run linkremixtests", "pullremix": "git clone https://github.com/ethereum/remix", "linkremixlib": "cd node_modules && rm -rf remix-lib && ln -s ../../remix/remix-lib remix-lib && cd ..", "linkremixsolidity": "cd node_modules && rm -rf remix-solidity && ln -s ../../remix/remix-solidity remix-solidity && cd ..", diff --git a/src/app/components/local-plugin.js b/src/app/components/local-plugin.js index 4b814f8a9e..660a54eff8 100644 --- a/src/app/components/local-plugin.js +++ b/src/app/components/local-plugin.js @@ -171,7 +171,7 @@ module.exports = class LocalPlugin {
Location in remix (required)
- ${radioLocations('sidePanel', 'Swap Panel')} + ${radioLocations('sidePanel', 'Side Panel')} ${radioLocations('mainPanel', 'Main Panel')} ${radioLocations('none', 'None')} ` diff --git a/src/app/components/side-panel.js b/src/app/components/side-panel.js index 619f4d6df7..8b1c848e42 100644 --- a/src/app/components/side-panel.js +++ b/src/app/components/side-panel.js @@ -11,12 +11,9 @@ const css = csjs` text-transform: uppercase; white-space: nowrap; } - .swapitTitle a{ - cursor: help; - } .swapitTitle i{ - padding-left:4px; - font-size:10px; + padding-left: 6px; + font-size: 14px; } .swapitHeader { height: 35px; @@ -67,7 +64,7 @@ export class SidePanel extends AbstractPanel { const { profile } = this.store.getOne(this.active) name = profile.displayName ? profile.displayName : profile.name const docsRoot = 'https://remix.readthedocs.io/en/latest/' - docLink = profile.documentation ? yo`` : '' + docLink = profile.documentation ? yo`` : '' } return yo` diff --git a/src/app/contract/publishOnSwarm.js b/src/app/contract/publishOnSwarm.js index cd4bdb3bac..f4dc32b833 100644 --- a/src/app/contract/publishOnSwarm.js +++ b/src/app/contract/publishOnSwarm.js @@ -47,6 +47,11 @@ module.exports = (contract, fileManager, cb, swarmVerifiedPublishCallBack) => { var uploaded = [] async.eachSeries(sources, function (item, cb) { swarmVerifiedPublish(item.content, item.hash, (error, result) => { + try { + item.hash = result.url.match('bzz-raw://(.+)')[1] + } catch (e) { + item.hash = ' - ' + item.fileName + } if (!error && swarmVerifiedPublishCallBack) swarmVerifiedPublishCallBack(item) item.output = result uploaded.push(item) @@ -55,7 +60,19 @@ module.exports = (contract, fileManager, cb, swarmVerifiedPublishCallBack) => { cb(error) }) }, () => { - swarmVerifiedPublish(JSON.stringify(metadata), '', (error, result) => { + const metadataContent = JSON.stringify(metadata) + swarmVerifiedPublish(metadataContent, '', (error, result) => { + try { + contract.metadataHash = result.url.match('bzz-raw://(.+)')[1] + } catch (e) { + contract.metadataHash = ' - metadata.json' + } + if (!error && swarmVerifiedPublishCallBack) { + swarmVerifiedPublishCallBack({ + content: metadataContent, + hash: contract.metadataHash + }) + } uploaded.push({ content: contract.metadata, hash: contract.metadataHash, diff --git a/src/app/debugger/debuggerUI/TxBrowser.js b/src/app/debugger/debuggerUI/TxBrowser.js index 6cdcc45e85..d58c9e5a95 100644 --- a/src/app/debugger/debuggerUI/TxBrowser.js +++ b/src/app/debugger/debuggerUI/TxBrowser.js @@ -18,6 +18,10 @@ var css = csjs` } .txinput { width: inherit; + font-size: small; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; } .txbuttons { width: 100%; @@ -80,7 +84,14 @@ TxBrowser.prototype.render = function () { var view = yo`
- +
diff --git a/src/app/debugger/debuggerUI/vmDebugger/CodeListView.js b/src/app/debugger/debuggerUI/vmDebugger/CodeListView.js index deb4545ca7..7ee5c24069 100644 --- a/src/app/debugger/debuggerUI/vmDebugger/CodeListView.js +++ b/src/app/debugger/debuggerUI/vmDebugger/CodeListView.js @@ -15,7 +15,6 @@ function CodeListView () { this.event = new EventManager() this.code this.address - this.codeView this.itemSelected this.basicPanel = new DropdownPanel('Instructions', {json: false, displayContentOnly: true}) this.basicPanel.event.register('hide', () => { @@ -27,7 +26,8 @@ function CodeListView () { } CodeListView.prototype.render = function () { - return yo`
${this.basicPanel.render({height: style.instructionsList.height})}
` + this.view = yo`
${this.basicPanel.render({height: style.instructionsList.height})}
` + return this.view } CodeListView.prototype.indexChanged = function (index) { @@ -39,14 +39,15 @@ CodeListView.prototype.indexChanged = function (index) { this.itemSelected.firstChild.removeAttribute('style') } } - this.itemSelected = this.codeView.children[index] + let codeView = this.view.querySelector('#asmitems') + this.itemSelected = codeView.children[index] this.itemSelected.style.setProperty('background-color', 'var(--info)') this.itemSelected.style.setProperty('color', 'var(--light)') this.itemSelected.setAttribute('selected', 'selected') if (this.itemSelected.firstChild) { this.itemSelected.firstChild.setAttribute('style', 'margin-left: 2px') } - this.codeView.scrollTop = this.itemSelected.offsetTop - parseInt(this.codeView.offsetTop) + codeView.scrollTop = this.itemSelected.offsetTop - parseInt(codeView.offsetTop) } CodeListView.prototype.reset = function () { @@ -59,8 +60,7 @@ CodeListView.prototype.changed = function (code, address, index) { } this.code = code this.address = address - this.codeView = this.renderAssemblyItems() - this.basicPanel.setContent(this.codeView) + this.basicPanel.setContent(this.renderAssemblyItems()) this.indexChanged(index) } diff --git a/src/app/editor/editor.js b/src/app/editor/editor.js index f447b940a7..ba3b643917 100644 --- a/src/app/editor/editor.js +++ b/src/app/editor/editor.js @@ -219,7 +219,9 @@ class Editor { */ _getMode (path) { let ext = path.indexOf('.') !== -1 ? /[^.]+/.exec(path) : null - if (ext) ext = path.replace(ext[0] + '.', '') // we get + if (ext) { + ext = path.replace(ext[0] + '.', '') // we get + } else ext = 'txt' ext = ext.split('#') if (!ext.length) return this.modes['txt'] ext = ext[0] diff --git a/src/app/files/basicReadOnlyExplorer.js b/src/app/files/basicReadOnlyExplorer.js index df4f17c11c..67a1a1f874 100644 --- a/src/app/files/basicReadOnlyExplorer.js +++ b/src/app/files/basicReadOnlyExplorer.js @@ -41,13 +41,13 @@ class BasicReadOnlyExplorer { } set (path, content, cb) { - var unprefixedPath = this.removePrefix(path) - this.addReadOnly(unprefixedPath, content) + this.addReadOnly(path, content) if (cb) cb() return true } addReadOnly (path, content, rawPath) { + path = this.removePrefix(path) try { // lazy try to format JSON content = JSON.stringify(JSON.parse(content), null, '\t') } catch (e) {} @@ -67,7 +67,7 @@ class BasicReadOnlyExplorer { this.paths[this.type][split] = { isDirectory: folder } this.files[path] = content this.normalizedNames[rawPath] = path - this.event.trigger('fileAdded', [path, true]) + this.event.trigger('fileAdded', [this.type + '/' + path, true]) return true } diff --git a/src/app/files/file-explorer.js b/src/app/files/file-explorer.js index 891e5a1692..007073f351 100644 --- a/src/app/files/file-explorer.js +++ b/src/app/files/file-explorer.js @@ -158,7 +158,8 @@ function fileExplorer (localRegistry, files, menuItems) { return yo`