update to metro theme and theming

pull/1/head
Rob Stupay 7 years ago committed by yann300
parent b9c7f7cf63
commit 6a979dfc03
  1. 38
      src/app/editor/editor.js
  2. 3
      src/app/panels/righthand-panel.js
  3. 2
      src/app/panels/terminal.js
  4. 2
      src/app/tabs/run-tab.js
  5. 3
      src/app/tabs/tabbed-menu.js
  6. 7
      src/app/ui/modaldialog.js
  7. 55
      src/universal-dapp.js

@ -5,15 +5,6 @@ var yo = require('yo-yo')
var csjs = require('csjs-inject') var csjs = require('csjs-inject')
var ace = require('brace') var ace = require('brace')
// var aceCss = editor.setTheme("bace/theme/twilight");
// require('brace/theme/solarized_dark')
// require('brace/theme/clouds_midnight')
// require('brace/theme/pastel_on_dark')
// require('brace/theme/tomorrow_night')
require('brace/theme/tomorrow_night_blue')
// require('brace/theme/tomorrow_night_eighties')
// require('brace/theme/twilight')
var Range = ace.acequire('ace/range').Range var Range = ace.acequire('ace/range').Range
require('brace/ext/language_tools') require('brace/ext/language_tools')
require('brace/ext/searchbox') require('brace/ext/searchbox')
@ -22,6 +13,24 @@ require('./mode-solidity.js')
var styleGuide = remixLib.ui.styleGuide var styleGuide = remixLib.ui.styleGuide
var styles = styleGuide() var styles = styleGuide()
function setTheme (cb) {
if (styles.appProperties.aceTheme) {
cb('brace/theme/', styles.appProperties.aceTheme)
}
}
setTheme((path, theme) => {
// require(path + theme)
require('brace/theme/tomorrow_night_blue')
})
// editor.setTheme(styleguide.aceTheme) ==> where styleguide.aceTheme is 'ace/theme/tomorrow_night_blue'
// var themeIs = 'brace/theme/' + styles.appProperties.aceTheme
// var themeIs = 'brace/theme/' + 'tomorrow_night_blue'
// console.log(themeIs)
// require(`${themeIs}`)
// require('brace/theme/tomorrow_night_blue')
var css = csjs` var css = csjs`
.ace-editor { .ace-editor {
background-color : ${styles.editor.backgroundColor_Editor}; background-color : ${styles.editor.backgroundColor_Editor};
@ -64,13 +73,10 @@ function Editor (opts = {}) {
var self = this var self = this
var el = yo`<div id="input"></div>` var el = yo`<div id="input"></div>`
var editor = ace.edit(el) var editor = ace.edit(el)
// editor.setTheme('ace/theme/solarized_dark') if (styles.appProperties.aceTheme) {
// editor.setTheme('ace/theme/clouds_midnight') editor.setTheme('ace/theme/' + styles.appProperties.aceTheme)
// editor.setTheme('ace/theme/pastel_on_dark') }
// editor.setTheme('ace/theme/tomorrow_night')
editor.setTheme('ace/theme/tomorrow_night_blue')
// editor.setTheme('ace/theme/tomorrow_night_eighties')
// editor.setTheme('ace/theme/twilight')
ace.acequire('ace/ext/language_tools') ace.acequire('ace/ext/language_tools')
editor.setOptions({ editor.setOptions({
enableBasicAutocompletion: true, enableBasicAutocompletion: true,

@ -42,6 +42,9 @@ var css = csjs`
#optionViews .hide { #optionViews .hide {
display: none; display: none;
} }
a {
color: ${styles.rightPanel.text_link};
}
.menu { .menu {
display: flex; display: flex;
background-color: ${styles.rightPanel.BackgroundColor_Pre}; background-color: ${styles.rightPanel.BackgroundColor_Pre};

@ -76,7 +76,7 @@ var css = csjs`
} }
.terminal::after { .terminal::after {
content : ""; content : "";
background-image : url(assets/img/remix-redesign-white-512w_v0.1.gif); background-image : url(assets/img/remix_logo_white_512x512.svg);
opacity : .1; opacity : .1;
top : 15%; top : 15%;
left : 33%; left : 33%;

@ -113,7 +113,7 @@ var css = csjs`
${styles.rightPanel.runTab.box_Instance} ${styles.rightPanel.runTab.box_Instance}
font-style: italic; font-style: italic;
} }
.pendingTxsText { iElements .pendingTxsText {
${styles.rightPanel.runTab.borderBox_Instance} ${styles.rightPanel.runTab.borderBox_Instance}
font-style: italic; font-style: italic;
} }

@ -9,8 +9,9 @@ var styles = styleGuide()
module.exports = tabbedMenu module.exports = tabbedMenu
var css = csjs` var css = csjs`
.active { li.active {
background-color: ${styles.rightPanel.backgroundColor_Tab}; background-color: ${styles.rightPanel.backgroundColor_Tab};
color: ${styles.appProperties.mainText_Color};
} }
` `

@ -26,9 +26,16 @@ var css = csjs`
} }
.modalBody { .modalBody {
background-color: ${styles.remix.modalDialog_BackgroundColor_Primary}; background-color: ${styles.remix.modalDialog_BackgroundColor_Primary};
color: ${styles.remix.modalDialog_text_Primary};
padding: 1.5em; padding: 1.5em;
line-height: 1.5em; line-height: 1.5em;
} }
.modalBody em{
color: ${styles.remix.modalDialog_text_Em};
}
.modalBody a{
color: ${styles.remix.modalDialog_text_Link};
}
.modalFooter { .modalFooter {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;

@ -34,7 +34,7 @@ var css = csjs`
align-items: center; align-items: center;
font-size: 11px; font-size: 11px;
height: 30px; height: 30px;
width: 100%; width: 97%;
overflow: hidden; overflow: hidden;
word-break: break-word; word-break: break-word;
line-height: initial; line-height: initial;
@ -56,7 +56,7 @@ var css = csjs`
.instance { .instance {
${styles.rightPanel.runTab.box_Instance}; ${styles.rightPanel.runTab.box_Instance};
margin-bottom: 10px; margin-bottom: 10px;
padding: 10px 15px 6px 15px; padding: 10px 15px 15px 15px;
} }
.instance .title:before { .instance .title:before {
content: "\\25BE"; content: "\\25BE";
@ -100,35 +100,44 @@ var css = csjs`
width: 75%; width: 75%;
padding: .36em; padding: .36em;
} }
// .call {
// background-color: ${styles.colors.lightRed};
// border-color: ${styles.colors.lightRed};
// }
// .constant .call {
// background-color: ${styles.colors.lightBlue};
// border-color: ${styles.colors.lightBlue};
// width: 25%;
// outline: none;
// }
// .payable .call {
// background-color: ${styles.colors.red};
// border-color: ${styles.colors.red};
// width: 25%;
// }
.contractProperty button { .contractProperty button {
border-radius : 3px; ${styles.rightPanel.runTab.button_Create}
border : .3px solid #dddddd; min-width: 100px;
cursor : pointer; width: 100px;
min-height : 25px; font-size: 10px;
max-height : 25px; margin:0;
padding : 3px; word-break: inherit;
min-width : 100px;
width : 25%;
font-size : 10px;
} }
.contractProperty button:disabled { .contractProperty button:disabled {
cursor: not-allowed; cursor: not-allowed;
background-color: white; background-color: white;
border-color: lightgray; border-color: lightgray;
} }
.call { .contractProperty.constant button {
background-color: ${styles.colors.blueFairyDust}; ${styles.rightPanel.runTab.button_Constant}
border-color: ${styles.colors.blueFairyDust}; min-width: 100px;
} width: 100px;
.constant .call { font-size: 10px;
background-color: ${styles.colors.greenZing}; margin:0;
width: 25%; word-break: inherit;
outline: none; outline: none;
} width: inherit;
.payable .call {
background-color: ${styles.colors.red};
border-color: ${styles.colors.red};
width: 25%;
} }
.contractProperty input { .contractProperty input {
display: none; display: none;

Loading…
Cancel
Save