Commit dcc3ee9e authored by ninabreznik's avatar ninabreznik

Add checkbox to Settings tab

parent f199215c
...@@ -253,6 +253,7 @@ function remixdDialog (tx, self) { ...@@ -253,6 +253,7 @@ function remixdDialog (tx, self) {
function updateConfig (self) { function updateConfig (self) {
self.config.set('doNotShowAgain', !self.config.get('doNotShowAgain')) self.config.set('doNotShowAgain', !self.config.get('doNotShowAgain'))
document.querySelector("#mainNetCheckbox").setAttribute('checked', true)
} }
module.exports = TxRunner module.exports = TxRunner
...@@ -31,7 +31,7 @@ var css = csjs` ...@@ -31,7 +31,7 @@ var css = csjs`
display: flex; display: flex;
overflow: auto; overflow: auto;
clear: both; clear: both;
padding: .5em; padding: .2em;
} }
.checkboxText { .checkboxText {
font-weight: normal; font-weight: normal;
...@@ -42,6 +42,9 @@ var css = csjs` ...@@ -42,6 +42,9 @@ var css = csjs`
.crowNoFlex { .crowNoFlex {
overflow: auto; overflow: auto;
clear: both; clear: both;
}
.attention {
margin-bottom: 1em;
padding: .5em; padding: .5em;
font-weight: bold; font-weight: bold;
} }
...@@ -74,6 +77,9 @@ var css = csjs` ...@@ -74,6 +77,9 @@ var css = csjs`
i.warnIt { i.warnIt {
color: ${styles.appProperties.warningText_Color}; color: ${styles.appProperties.warningText_Color};
} }
.icon {
margin-right: .5em;
}
} }
` `
module.exports = SettingsTab module.exports = SettingsTab
...@@ -97,12 +103,16 @@ function SettingsTab (container, appAPI, appEvents, opts) { ...@@ -97,12 +103,16 @@ function SettingsTab (container, appAPI, appEvents, opts) {
<div class="${css.info}"> <div class="${css.info}">
<div class=${css.title}>General settings</div> <div class=${css.title}>General settings</div>
<div class="${css.crow}"> <div class="${css.crow}">
<div><input id="editorWrap" type="checkbox"></div> <div>${optionVM}</div>
<span class="${css.checkboxText}">Text Wrap</span> <span class="${css.checkboxText}">Always use Ethereum VM at Load</span>
</div> </div>
<div class="${css.crow}"> <div class="${css.crow}">
<div>${optionVM}</div> <div><input id="mainNetCheckbox" onchange=${popupWhenMainNetSelected} type="checkbox"></div>
<span class="${css.checkboxText}">Always use VM at Load</span> <span class="${css.checkboxText}">Don't show confirmation popup when MainNet is selected</span>
</div>
<div class="${css.crow}">
<div><input id="editorWrap" type="checkbox"></div>
<span class="${css.checkboxText}">Text Wrap</span>
</div> </div>
<div class="${css.crow}"> <div class="${css.crow}">
<div><input id="optimize" type="checkbox"></div> <div><input id="optimize" type="checkbox"></div>
...@@ -110,41 +120,39 @@ function SettingsTab (container, appAPI, appEvents, opts) { ...@@ -110,41 +120,39 @@ function SettingsTab (container, appAPI, appEvents, opts) {
</div> </div>
</div> </div>
<div class="${css.info}"> <div class="${css.info}">
<div class=${css.title}>Plugin</div> <div class=${css.title}>Themes</div>
<div class="${css.crowNoFlex}"> <div class=${css.attention}>
<div> <i title="Select the theme" class="${css.icon} fa fa-exclamation-triangle" aria-hidden="true"></i>
<i title="Do not use this feature yet" class="fa fa-exclamation-triangle" aria-hidden="true"></i> <span>Selecting a theme will trigger a page reload</span>
<span> Do not use this alpha feature if you are not sure what you are doing!</span>
</div>
<div>
<textarea rows="4" cols="70" id="plugininput" type="text" class="${css.pluginTextArea}" ></textarea>
<input onclick=${loadPlugin} type="button" value="Load" class="${css.pluginLoad}">
</div>
</div> </div>
</div>
<hr>
<h4 class="${css.heading}">Themes ( Selecting a theme will trigger a page reload )</h4>
<div class="${css.crow}"> <div class="${css.crow}">
<input class="${css.col1}" name="theme" id="themeLight" type="radio"> <input class="${css.col1}" name="theme" id="themeLight" type="checkbox">
<label for="themeLight">Light Theme</label> <label for="themeLight">Light Theme</label>
</div> </div>
<div class="${css.crow}"> <div class="${css.crow}">
<input class="${css.col1}" name="theme" id="themeDark" type="radio"> <input class="${css.col1}" name="theme" id="themeDark" type="checkbox">
<label for="themeDark">Dark Theme</label> <label for="themeDark">Dark Theme</label>
</div> </div>
<hr> </div>
<div class="${css.info}">
<div class=${css.title}>Plugin</div>
<div class="${css.crowNoFlex}"> <div class="${css.crowNoFlex}">
<div>Plugin ( <i title="Do not use this feature yet" class="${css.warnIt} fa fa-exclamation-triangle" aria-hidden="true"></i><span> Do not use this alpha feature if you are not sure what you are doing!</span> ) <div class=${css.attention}>
<i title="Do not use this feature yet" class="${css.icon} fa fa-exclamation-triangle" aria-hidden="true"></i>
<span> Do not use this alpha feature if you are not sure what you are doing!</span>
</div> </div>
<div> <div>
<textarea rows="4" cols="70" id="plugininput" type="text" class="${css.pluginTextArea}" ></textarea> <textarea rows="4" cols="70" id="plugininput" type="text" class="${css.pluginTextArea}" ></textarea>
<br />
<input onclick=${loadPlugin} type="button" value="Load" class="${css.pluginLoad}"> <input onclick=${loadPlugin} type="button" value="Load" class="${css.pluginLoad}">
</div> </div>
</div> </div>
</div> </div>
</div>
` `
function popupWhenMainNetSelected () {
appAPI.config.set('doNotShowAgain', !appAPI.config.get('doNotShowAgain'))
}
function loadPlugin () { function loadPlugin () {
var json = el.querySelector('#plugininput').value var json = el.querySelector('#plugininput').value
......
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