From 381f161f9e7e3002f27d098091223c1950716044 Mon Sep 17 00:00:00 2001 From: alexcherman Date: Thu, 13 Feb 2020 10:42:37 +0100 Subject: [PATCH] Remove unnecessary classes --- src/app/tabs/theme-module.js | 4 ++-- src/app/udapp/run-tab.js | 4 ++-- src/app/ui/TreeView.js | 5 +---- src/app/ui/multiParamManager.js | 10 +++++----- src/app/ui/universal-dapp-ui.js | 8 ++++---- src/universal-dapp-styles.js | 7 ++++++- 6 files changed, 20 insertions(+), 18 deletions(-) diff --git a/src/app/tabs/theme-module.js b/src/app/tabs/theme-module.js index 1723bdfb2d..40d931e639 100644 --- a/src/app/tabs/theme-module.js +++ b/src/app/tabs/theme-module.js @@ -4,8 +4,8 @@ import * as packageJson from '../../../package.json' import yo from 'yo-yo' const themes = [ - {name: 'Dark', quality: 'dark', url: 'https://res.cloudinary.com/dvtmp0niu/raw/upload/v1579188869/remix-dark-theme.css'}, - {name: 'Light', quality: 'light', url: 'https://res.cloudinary.com/dvtmp0niu/raw/upload/v1579188869/light-theme.css'}, + {name: 'Dark', quality: 'dark', url: 'https://res.cloudinary.com/dvtmp0niu/raw/upload/v1581586063/remix-dark-theme_w5nghe.css'}, + {name: 'Light', quality: 'light', url: 'https://res.cloudinary.com/dvtmp0niu/raw/upload/v1581586063/light-theme_fswxxf.css'}, // switching to the url Todo: remove when the theme is ready // {name: 'Dark', quality: 'dark', url: 'assets/css/remix-dark-theme.css'}, diff --git a/src/app/udapp/run-tab.js b/src/app/udapp/run-tab.js index 9cb2c35ae2..0494c5aeee 100644 --- a/src/app/udapp/run-tab.js +++ b/src/app/udapp/run-tab.js @@ -62,10 +62,10 @@ export class RunTab extends LibraryPlugin { } renderInstanceContainer () { - this.instanceContainer = yo`
` + this.instanceContainer = yo`
` const instanceContainerTitle = yo` -
Deployed Contracts this.event.trigger('clearInstance', [])} diff --git a/src/app/ui/TreeView.js b/src/app/ui/TreeView.js index c5d5b0780a..391f8be10d 100644 --- a/src/app/ui/TreeView.js +++ b/src/app/ui/TreeView.js @@ -13,9 +13,6 @@ var css = csjs` } .ul_tv { list-style-type: none; - margin: 0; - padding: 0; - border: none; -webkit-margin-before: 0px; -webkit-margin-after: 0px; -webkit-margin-start: 0px; @@ -77,7 +74,7 @@ class TreeView { var children = Object.keys(json).map((innerkey) => { return this.renderObject(json[innerkey], json, innerkey, expand, innerkey) }) - return yo`
    ${children}
` + return yo`
    ${children}
` } formatData (key, data, children, expand, keyPath) { diff --git a/src/app/ui/multiParamManager.js b/src/app/ui/multiParamManager.js index c706abf654..baa2a37dd6 100644 --- a/src/app/ui/multiParamManager.js +++ b/src/app/ui/multiParamManager.js @@ -100,7 +100,7 @@ class MultiParamManager { if (this.funABI.inputs) { return yo`
${this.funABI.inputs.map(function (inp) { - return yo`
` + return yo`
` })}
` } @@ -125,7 +125,7 @@ class MultiParamManager { } let funcButton = yo`` this.contractActionsContainerSingle = yo` -
+
${funcButton} ${this.basicInputField} this.switchMethodViewOn()} title=${title} > @@ -145,8 +145,8 @@ class MultiParamManager { var expandedButton = yo`` this.contractActionsContainerMulti = yo`
-
-
{ this.switchMethodViewOff() }} class="${css.multiHeader} run-instance-multi-header"> +
+
{ this.switchMethodViewOff() }} class="${css.multiHeader}">
${title}
@@ -174,7 +174,7 @@ class MultiParamManager {
` var contractProperty = yo` -
+
${this.contractActionsContainerSingle} ${this.contractActionsContainerMulti}
` diff --git a/src/app/ui/universal-dapp-ui.js b/src/app/ui/universal-dapp-ui.js index 142834c1e1..997b154810 100644 --- a/src/app/ui/universal-dapp-ui.js +++ b/src/app/ui/universal-dapp-ui.js @@ -54,7 +54,7 @@ UniversalDAppUI.prototype.renderInstanceFromABI = function (contractABI, address let self = this address = (address.slice(0, 2) === '0x' ? '' : '0x') + address.toString('hex') address = ethJSUtil.toChecksumAddress(address) - var instance = yo`
` + var instance = yo`
` const context = this.blockchain.context() var shortAddress = helper.shortenAddress(address) @@ -87,7 +87,7 @@ UniversalDAppUI.prototype.renderInstanceFromABI = function (contractABI, address title.querySelector('.btn-group').appendChild(close) var contractActionsWrapper = yo` -
+
` @@ -97,7 +97,7 @@ UniversalDAppUI.prototype.renderInstanceFromABI = function (contractABI, address } function toggleClass (e) { - $(instance).toggleClass(`${css.hidesub} expanded`) + $(instance).toggleClass(`${css.hidesub} bg-light`) // e.currentTarget.querySelector('i') e.currentTarget.querySelector('i').classList.toggle(`fa-angle-right`) e.currentTarget.querySelector('i').classList.toggle(`fa-angle-down`) @@ -223,7 +223,7 @@ UniversalDAppUI.prototype.getCallButton = function (args) { self.blockchain.getInputs(args.funABI) ) - const contractActionsContainer = yo`
${multiParamManager.render()}
` + const contractActionsContainer = yo`
${multiParamManager.render()}
` contractActionsContainer.appendChild(outputOverride) return contractActionsContainer diff --git a/src/universal-dapp-styles.js b/src/universal-dapp-styles.js index 68b71a403b..23750a28e2 100644 --- a/src/universal-dapp-styles.js +++ b/src/universal-dapp-styles.js @@ -62,6 +62,9 @@ var css = csjs` background: none; border-radius: 2px; } + .instance.hidesub { + border-bottom: 1px solid; + } .instance.hidesub .title { display: flex; } @@ -155,10 +158,12 @@ var css = csjs` } .contractActionsContainer { width: 100%; + margin-bottom: 8px; } .contractActionsContainerSingle { display: flex; width: 100%; + margin-bottom: 8px; } .contractActionsContainerSingle i { line-height: 2; @@ -170,8 +175,8 @@ var css = csjs` .contractActionsContainerMultiInner { width: 100%; padding: 16px 8px 16px 14px; - background-color: var(--light); border-radius: 3px; + margin-bottom: 8px; } .multiHeader { display: flex;