From 7808528b46bf0f06ff007fe4dce249b7e823fa0b Mon Sep 17 00:00:00 2001 From: LianaHus Date: Tue, 21 May 2019 13:17:07 +0200 Subject: [PATCH 1/3] fixes publish Swarm --- src/app/tabs/compile-tab.js | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/app/tabs/compile-tab.js b/src/app/tabs/compile-tab.js index e8b9734d1a0..cacd994331b 100644 --- a/src/app/tabs/compile-tab.js +++ b/src/app/tabs/compile-tab.js @@ -182,14 +182,17 @@ class CompileTab extends CompilerApi { * @param {string[]} contractList Names of the compiled contracts */ contractSelection (contractList = [], sourceFile) { - return contractList.length !== 0 + let selectEl = yo` + + ` + let result = contractList.length !== 0 ? yo`
@@ -220,6 +223,10 @@ class CompileTab extends CompilerApi { : yo`
No Contract Compiled Yet
` + + if (0 !== contractList.length) + this.selectedContract = selectEl.value + return result; } // TODO : Add success alert when compilation succeed From 96d23cc55e9aab91b5cb51a6a984de3fa30d68b2 Mon Sep 17 00:00:00 2001 From: LianaHus Date: Tue, 21 May 2019 14:23:05 +0200 Subject: [PATCH 2/3] standard --- src/app/tabs/compile-tab.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/app/tabs/compile-tab.js b/src/app/tabs/compile-tab.js index cacd994331b..047f9b56724 100644 --- a/src/app/tabs/compile-tab.js +++ b/src/app/tabs/compile-tab.js @@ -187,7 +187,7 @@ class CompileTab extends CompilerApi { ${contractList.map((name) => yo``)} ` - let result = contractList.length !== 0 + let result = !contractList.length ? yo`
` - if (0 !== contractList.length) - this.selectedContract = selectEl.value - return result; + if (!contractList.length) this.selectedContract = selectEl.value + return result } // TODO : Add success alert when compilation succeed From 0c34ac2d80d2c3265fe5458534f7df61ec304cb3 Mon Sep 17 00:00:00 2001 From: LianaHus Date: Tue, 21 May 2019 16:16:58 +0200 Subject: [PATCH 3/3] removed see more button restyle debuger -> tx N field --- src/app/debugger/debuggerUI/TxBrowser.js | 13 ++++++++++++- src/app/tabs/compile-tab.js | 13 ++++++++++--- src/app/ui/tooltip.js | 10 +++++++++- 3 files changed, 31 insertions(+), 5 deletions(-) diff --git a/src/app/debugger/debuggerUI/TxBrowser.js b/src/app/debugger/debuggerUI/TxBrowser.js index 6cdcc45e85b..d58c9e5a957 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/tabs/compile-tab.js b/src/app/tabs/compile-tab.js index 047f9b56724..4eb001bb708 100644 --- a/src/app/tabs/compile-tab.js +++ b/src/app/tabs/compile-tab.js @@ -183,11 +183,14 @@ class CompileTab extends CompilerApi { */ contractSelection (contractList = [], sourceFile) { let selectEl = yo` - ${contractList.map((name) => yo``)} ` - let result = !contractList.length + let result = contractList.length ? yo`
` - if (!contractList.length) this.selectedContract = selectEl.value + if (contractList.length) { + this.selectedContract = selectEl.value + } else { + delete this.selectedContract + } return result } diff --git a/src/app/ui/tooltip.js b/src/app/ui/tooltip.js index 8c44f905e8d..508357725fc 100644 --- a/src/app/ui/tooltip.js +++ b/src/app/ui/tooltip.js @@ -8,6 +8,7 @@ var modal = require('./modal-dialog-custom') * @param {function} [action] Returns An HTMLElement to display for action */ module.exports = function addTooltip (tooltipText, action, opts) { + action = action || function () { return yo`
` } let t = new Toaster() return t.render(tooltipText, action(t), opts) } @@ -27,9 +28,16 @@ class Toaster { return new Promise((resolve, reject) => { const shortTooltipText = tooltipText.length > 201 ? tooltipText.substring(0, 200) + '...' : tooltipText + let button = tooltipText.length > 201 ? yo` + + ` : `` + this.tooltip = yo`
{ over() }} onmouseleave=${() => { out() }}> - ${shortTooltipText} + + ${shortTooltipText} + ${button} + ${action}
` let timeOut = () => {