Update theme-draft.js & refactoring styling

pull/1/head
ninabreznik 7 years ago committed by yann300
parent bd465eeb11
commit d5c15aa71d
  1. 12
      src/app/execution/txLogger.js
  2. 6
      src/app/panels/editor-panel.js
  3. 5
      src/app/panels/righthand-panel.js
  4. 18
      src/app/panels/terminal.js
  5. 20
      src/app/tabs/compile-tab.js
  6. 4
      src/app/tabs/debugger-tab.js
  7. 4
      src/app/tabs/run-tab.js
  8. 23
      src/app/ui/dropdown.js
  9. 28
      src/app/ui/theme-draft.js
  10. 6
      src/universal-dapp.js

@ -22,13 +22,14 @@ var css = csjs`
} }
.tx { .tx {
color: ${styles.colors.violet}; color: ${styles.colors.violet};
font-weight: bold;
width: 45%; width: 45%;
} }
.txTable, .tr, .td { .txTable, .tr, .td {
border-collapse: collapse; border-collapse: collapse;
font-size: 10px; font-size: 10px;
color: ${styles.colors.grey}; color: ${styles.colors.black};
border: 1px dashed ${styles.colors.black}; border: 1px solid ${styles.colors.black};
} }
#txTable { #txTable {
margin-top: 1%; margin-top: 1%;
@ -62,7 +63,12 @@ var css = csjs`
.clipboardCopy { .clipboardCopy {
margin-right: 0.5em; margin-right: 0.5em;
cursor: pointer; cursor: pointer;
}` color: ${styles.colors.black};
}
.clipboardCopy:hover {
color: ${styles.colors.lightOrange};
}
`
/** /**
* This just export a function that register to `newTransaction` and forward them to the logger. * This just export a function that register to `newTransaction` and forward them to the logger.
* Emit debugRequested * Emit debugRequested

@ -71,6 +71,8 @@ var css = csjs`
} }
.toggleLHP i { .toggleLHP i {
cursor : pointer; cursor : pointer;
font-size : 14px;
font-weight : bold;
} }
.toggleLHP i:hover { .toggleLHP i:hover {
color : ${styles.colors.orange}; color : ${styles.colors.orange};
@ -94,13 +96,15 @@ var css = csjs`
left : 0; left : 0;
} }
.toggleRHP { .toggleRHP {
margin-top : 0.5em; margin : 0.3em;
font-weight : bold; font-weight : bold;
color : ${styles.colors.black}; color : ${styles.colors.black};
right : 0; right : 0;
} }
.toggleRHP i { .toggleRHP i {
cursor : pointer; cursor : pointer;
font-size : 14px;
font-weight : bold;
} }
.toggleRHP i:hover { .toggleRHP i:hover {
color : ${styles.colors.orange}; color : ${styles.colors.orange};

@ -62,6 +62,11 @@ var css = csjs`
} }
.opts_li { .opts_li {
display: block; display: block;
font-weight: bold;
color: ${styles.colors.black};
}
.opts_li:hover {
color: ${styles.colors.orange};
} }
.dragbar { .dragbar {
position : absolute; position : absolute;

@ -1,6 +1,5 @@
/* global Node, requestAnimationFrame */ /* global Node, requestAnimationFrame */
var yo = require('yo-yo') var yo = require('yo-yo')
var csjs = require('csjs-inject')
var javascriptserialize = require('javascript-serialize') var javascriptserialize = require('javascript-serialize')
var jsbeautify = require('js-beautify') var jsbeautify = require('js-beautify')
var type = require('component-type') var type = require('component-type')
@ -10,6 +9,11 @@ var Web3 = require('web3')
var executionContext = require('../../execution-context') var executionContext = require('../../execution-context')
var Dropdown = require('../ui/dropdown') var Dropdown = require('../ui/dropdown')
// -------------- styling ----------------------
var csjs = require('csjs-inject')
var remix = require('ethereum-remix')
var styleGuide = remix.ui.styleGuide
var styles = styleGuide()
var css = csjs` var css = csjs`
.panel { .panel {
@ -38,15 +42,16 @@ var css = csjs`
width : 100%; width : 100%;
padding : 5px; padding : 5px;
} }
.minimize { .toggleTerminal {
margin-left : auto; margin-left : auto;
width : 10px; width : 10px;
cursor : pointer; cursor : pointer;
color : black; color : black;
font-size : 14px;
font-weight : bold;
} }
.clear { .clear {
margin-right : 5px; margin-right : 5px;
font-size : 15px;
cursor : pointer; cursor : pointer;
color : black; color : black;
} }
@ -83,6 +88,7 @@ var css = csjs`
font-family : monospace; font-family : monospace;
font-weight : bold; font-weight : bold;
font-size : large; font-size : large;
color : ${styles.colors.black}
} }
.input { .input {
word-break : break-all; word-break : break-all;
@ -90,8 +96,8 @@ var css = csjs`
font-family : monospace; font-family : monospace;
} }
.filter { .filter {
padding : 3px; ${styles.inputField}
width : 20em; width : 150px;
} }
.dragbarHorizontal { .dragbarHorizontal {
@ -198,7 +204,7 @@ class Terminal {
${self._view.input} ${self._view.input}
</div> </div>
` `
self._view.icon = yo`<i onmouseenter=${hover} onmouseleave=${hover} onmousedown=${minimize} class="${css.minimize} fa fa-angle-double-down"></i>` self._view.icon = yo`<i onmouseenter=${hover} onmouseleave=${hover} onmousedown=${minimize} class="${css.toggleTerminal} fa fa-angle-double-down"></i>`
self._view.dragbar = yo`<div onmousedown=${mousedown} class=${css.dragbarHorizontal}></div>` self._view.dragbar = yo`<div onmousedown=${mousedown} class=${css.dragbarHorizontal}></div>`
self._view.dropdown = self._components.dropdown.render() self._view.dropdown = self._components.dropdown.render()
self._view.bar = yo` self._view.bar = yo`

@ -99,7 +99,7 @@ var css = csjs`
} }
.key { .key {
margin-right: 5px; margin-right: 5px;
color: grey; color: ${styles.colors.black};
text-transform: uppercase; text-transform: uppercase;
width: 100%; width: 100%;
} }
@ -108,22 +108,16 @@ var css = csjs`
width: 100%; width: 100%;
margin-top: 1.5%; margin-top: 1.5%;
} }
.copyDetails { .copyDetails,
.questionMark {
margin-left: 2%; margin-left: 2%;
font-size: 14px;
cursor: pointer; cursor: pointer;
color: ${styles.colors.grey}; color: ${styles.colors.black};
opacity: .3;
} }
.copyDetails:hover { .copyDetails:hover,
opacity: 1; .questionMark:hover {
color: ${styles.colors.lightOrange};
} }
.questionMark {
margin-left: 1%;
font-size: 14px;
color: ${styles.colors.grey};
opacity: .3;
},
.detailsJSON { .detailsJSON {
padding: 8px 0; padding: 8px 0;
background-color: ${styles.colors.white}; background-color: ${styles.colors.white};

@ -2,6 +2,9 @@ var yo = require('yo-yo')
// -------------- styling ---------------------- // -------------- styling ----------------------
var csjs = require('csjs-inject') var csjs = require('csjs-inject')
var remix = require('ethereum-remix')
var styleGuide = remix.ui.styleGuide
var styles = styleGuide()
var css = csjs` var css = csjs`
.debuggerTabView { .debuggerTabView {
@ -9,6 +12,7 @@ var css = csjs`
} }
.debugger { .debugger {
margin-bottom: 1%; margin-bottom: 1%;
${styles.displayBox}
} }
` `

@ -54,13 +54,13 @@ var css = csjs`
min-width: 150px; min-width: 150px;
} }
.copyaddress { .copyaddress {
color: ${styles.colors.blue};
margin-left: 0.5em; margin-left: 0.5em;
margin-top: 0.7em; margin-top: 0.7em;
cursor: pointer; cursor: pointer;
color: ${styles.colors.black};
} }
.copyaddress:hover { .copyaddress:hover {
color: ${styles.colors.grey}; color: ${styles.colors.lightOrange};
} }
.instanceContainer { .instanceContainer {
${styles.displayBox} ${styles.displayBox}

@ -1,18 +1,23 @@
var yo = require('yo-yo') var yo = require('yo-yo')
var csjs = require('csjs-inject')
var EventManager = require('ethereum-remix').lib.EventManager var EventManager = require('ethereum-remix').lib.EventManager
// -------------- styling ----------------------
var csjs = require('csjs-inject')
var remix = require('ethereum-remix')
var styleGuide = remix.ui.styleGuide
var styles = styleGuide()
var css = csjs` var css = csjs`
.dropdown { .dropdown {
${styles.dropdown}
color: : ${styles.colors.black};
overflow : visible;
position : relative; position : relative;
display : flex; display : flex;
flex-direction : column; flex-direction : column;
color : black;
} }
.selectbox { .selectbox {
display : flex; display : flex;
align-items : center; align-items : center;
background-color : lightgrey;
margin : 3px; margin : 3px;
cursor : pointer; cursor : pointer;
} }
@ -32,12 +37,14 @@ var css = csjs`
position : absolute; position : absolute;
display : flex; display : flex;
flex-direction : column; flex-direction : column;
min-width : 30ch; align-items : end;
max-width : 30ch; top : 24px;
top : 21px; left : 0;
left : 10px; width : 250px;
background-color : white; background-color : white;
border : 1px solid black; border : 1px solid ${styles.colors.veryLightGrey};
border-radius : 3px;
border-top : 0;
} }
.option { .option {
margin: 0; margin: 0;

@ -507,25 +507,31 @@ var rightPanel = {
ALL: ALL:
- text: mainText or supportText - text: mainText or supportText
- unify color and hover for all icons (files panel, debuger, toggle etc.) => maybe add to styleguide
COMPILE TAB:
- details => copyToClipboard (same color and hover as other icons)
RUN TAB:
- unify copyToClipboard color and hover
DEBUGGER TAB: DEBUGGER TAB:
- apply ${styles.button} + the rest (copy styling from below) to `eye button` - DropdownPanel.js - refactor css
- apply ${styles.dropdown} to Debugger
- apply ${styles.button} + the rest (copy styling from below) to `eye button`
${styles.button} ${styles.button}
margin: 3px; margin: 3px;
float: right; float: right;
- Put whole debugger in textBox => then we get blue background like on other tabs + we have white background in the textBox so we can make highlighted color same as everywhere else ---
- apply ${styles.dropdown} to Debugger DONE
ALL:
DONE - unify color and hover for all icons (files panel, debuger, toggle etc.)
COMPILE TAB:
DONE - details => copyToClipboard (same color and hover as other icons)
RUN TAB:
DONE - unify copyToClipboard color and hover
DEBUGGER TAB:
DONE - Put whole debugger in textBox => then we get blue background like on other tabs + we have white background in the textBox so we can make highlighted color same as everywhere else
TERMINAL: TERMINAL:
- apply ${styles.dropdown} + other fixes (already made in one PR - where is it?) to dropdown DONE - apply ${styles.dropdown} + other fixes (already made in one PR - where is it?) to dropdown
*/ */

@ -67,14 +67,12 @@ var css = csjs`
display: flex; display: flex;
} }
.copy { .copy {
font-size: 13px;
cursor: pointer; cursor: pointer;
opacity: 0.8;
margin-left: 3%; margin-left: 3%;
color: ${styles.colors.blue}; color: ${styles.colors.black};
} }
.copy:hover{ .copy:hover{
color: ${styles.colors.grey}; color: ${styles.colors.lightOrange};
} }
.buttonsContainer { .buttonsContainer {
margin-top: 2%; margin-top: 2%;

Loading…
Cancel
Save