Commit a86f2385 authored by ninabreznik's avatar ninabreznik

Remove spinner from contract tab, add warning msg, moved settings tab to second place

parent 777fcf9e
...@@ -58,10 +58,10 @@ ...@@ -58,10 +58,10 @@
<img id="solIcon" title="Solidity realtime compiler and runtime" src="assets/img/remix_logo_512x512.svg" alt="Solidity realtime compiler and runtime"> <img id="solIcon" title="Solidity realtime compiler and runtime" src="assets/img/remix_logo_512x512.svg" alt="Solidity realtime compiler and runtime">
<ul id="options"> <ul id="options">
<li class="envView" title="Environment">Contract</li> <li class="envView" title="Environment">Contract</li>
<li class="settingsView" title="Settings">Settings</li>
<li class="publishView" title="Publish" >Files</li> <li class="publishView" title="Publish" >Files</li>
<li class="debugView" title="Debugger">Debugger</li> <li class="debugView" title="Debugger">Debugger</li>
<li class="staticanalysisView" title="Static Analysis">Analysis</li> <li class="staticanalysisView" title="Static Analysis">Analysis</li>
<li class="settingsView" title="Settings">Settings</li>
<li id="helpButton"><a href="https://solidity.readthedocs.org" target="_blank" title="Open Documentation">Docs</a></li> <li id="helpButton"><a href="https://solidity.readthedocs.org" target="_blank" title="Open Documentation">Docs</a></li>
</ul> </ul>
</div> </div>
......
var yo = require('yo-yo') var yo = require('yo-yo')
// -------------- styling ----------------------
var csjs = require('csjs-inject') var csjs = require('csjs-inject')
var styleGuide = require('./style-guide')
var styles = styleGuide()
module.exports = loadingSpinner module.exports = loadingSpinner
...@@ -14,7 +17,6 @@ var css = csjs` ...@@ -14,7 +17,6 @@ var css = csjs`
height: 8px; height: 8px;
animation: spin 2s linear infinite; animation: spin 2s linear infinite;
} }
@keyframes spin { @keyframes spin {
0% { transform: rotate(0deg); } 0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); } 100% { transform: rotate(360deg); }
...@@ -26,6 +28,9 @@ function loadingSpinner (cb) { ...@@ -26,6 +28,9 @@ function loadingSpinner (cb) {
cb(function finish () { cb(function finish () {
var p = el.parentElement var p = el.parentElement
if (p) p.removeChild(el) if (p) p.removeChild(el)
var node = document.querySelector('[class^=contractTabView]')
var loadingMsg = document.querySelector('[class^=loadingMsg]')
node.removeChild(loadingMsg)
}) })
} }
return el return el
......
...@@ -74,11 +74,11 @@ function styleGuide () { ...@@ -74,11 +74,11 @@ function styleGuide () {
} }
.warning-text-box { .warning-text-box {
background-color : #E6E5A7; // yellow background-color : hsla(59, 56%, 78%, 0.5); // yellow
line-height : 20px; line-height : 20px;
padding : 1em 1em .5em 1em; padding : 8px 15px;
border-radius : 3px; border-radius : 5px;
box-shadow : rgba(0,0,0,.2) 0 1px 4px; border : .2em dotted #ffbd01; // orange-yellow
margin-bottom : 1em; margin-bottom : 1em;
} }
...@@ -143,6 +143,7 @@ function styleGuide () { ...@@ -143,6 +143,7 @@ function styleGuide () {
return { return {
textBoxL: textBoxes['display-box-L'], textBoxL: textBoxes['display-box-L'],
infoTextBox: textBoxes['info-text-box'], infoTextBox: textBoxes['info-text-box'],
warningTextBox: textBoxes['warning-text-box'],
titleL: texts['title-L'], titleL: texts['title-L'],
titleM: texts['title-M'], titleM: texts['title-M'],
dropdown: buttons['dropdown-menu'], dropdown: buttons['dropdown-menu'],
......
var $ = require('jquery') var $ = require('jquery')
var yo = require('yo-yo')
var csjs = require('csjs-inject')
var styleGuide = require('./style-guide')
var styles = styleGuide()
module.exports = tabbedMenu module.exports = tabbedMenu
function tabbedMenu (compiler, loadingSpinner, self) { function tabbedMenu (compiler, loadingSpinner, self) {
var css = csjs`
.loadingMsg extends ${styles.warningTextBox} {
display: block;
}
`
$('#options li').click(function (ev) { $('#options li').click(function (ev) {
var $el = $(this) var $el = $(this)
selectTab($el) selectTab($el)
...@@ -18,7 +29,9 @@ function tabbedMenu (compiler, loadingSpinner, self) { ...@@ -18,7 +29,9 @@ function tabbedMenu (compiler, loadingSpinner, self) {
compiler.event.register('loadingCompiler', function compilationStarted () { compiler.event.register('loadingCompiler', function compilationStarted () {
var contractTab = document.querySelector('.envView') var contractTab = document.querySelector('.envView')
if (!contractTab.children.length) { if (!contractTab.children.length) {
contractTab.appendChild(loadingSpinner(cb)) var el = document.querySelector('[class^=contractTabView]')
var loadingMsg = yo`<div class=${css.loadingMsg}>Solidity compiler is currently loading. Please wait a moment...</div>`
el.appendChild(loadingMsg)
} }
var settingsTab = document.querySelector('.settingsView') var settingsTab = document.querySelector('.settingsView')
if (!settingsTab.children.length) { if (!settingsTab.children.length) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment