@ -31,7 +31,7 @@ var css = csjs`
display : flex ;
overflow : auto ;
clear : both ;
padding : . 5 em ;
padding : . 2 em ;
}
. checkboxText {
font - weight : normal ;
@ -42,6 +42,9 @@ var css = csjs`
. crowNoFlex {
overflow : auto ;
clear : both ;
}
. attention {
margin - bottom : 1 em ;
padding : . 5 em ;
font - weight : bold ;
}
@ -74,6 +77,9 @@ var css = csjs`
i . warnIt {
color : $ { styles . appProperties . warningText _Color } ;
}
. icon {
margin - right : . 5 em ;
}
}
`
module . exports = SettingsTab
@ -97,23 +103,42 @@ function SettingsTab (container, appAPI, appEvents, opts) {
< div class = "${css.info}" >
< div class = $ { css . title } > General settings < / d i v >
< div class = "${css.crow}" >
< div > < input id = "editorWrap" type = "checkbox" > < / d i v >
< span class = "${css.checkboxText}" > Text Wrap < / s p a n >
< div > $ { optionVM } < / d i v >
< span class = "${css.checkboxText}" > Always use Ethereum VM at Load < / s p a n >
< / d i v >
< div class = "${css.crow}" >
< div > $ { optionVM } < / d i v >
< span class = "${css.checkboxText}" > Always use VM at Load < / s p a n >
< div > < input id = "mainNetCheckbox" onchange = $ { popupWhenMainNetSelected } type = "checkbox" > < / d i v >
< span class = "${css.checkboxText}" > Don ' t show confirmation popup when MainNet is selected < / s p a n >
< / d i v >
< div class = "${css.crow}" >
< div > < input id = "editorWrap" type = "checkbox" > < / d i v >
< span class = "${css.checkboxText}" > Text Wrap < / s p a n >
< / d i v >
< div class = "${css.crow}" >
< div > < input id = "optimize" type = "checkbox" > < / d i v >
< span class = "${css.checkboxText}" > Enable Optimization < / s p a n >
< / d i v >
< / d i v >
< div class = "${css.info}" >
< div class = $ { css . title } > Themes < / d i v >
< div class = $ { css . attention } >
< i title = "Select the theme" class = "${css.icon} fa fa-exclamation-triangle" aria - hidden = "true" > < / i >
< span > Selecting a theme will trigger a page reload < / s p a n >
< / d i v >
< div class = "${css.crow}" >
< input class = "${css.col1}" name = "theme" id = "themeLight" type = "checkbox" >
< label for = "themeLight" > Light Theme < / l a b e l >
< / d i v >
< div class = "${css.crow}" >
< input class = "${css.col1}" name = "theme" id = "themeDark" type = "checkbox" >
< label for = "themeDark" > Dark Theme < / l a b e l >
< / d i v >
< / d i v >
< div class = "${css.info}" >
< div class = $ { css . title } > Plugin < / d i v >
< div class = "${css.crowNoFlex}" >
< div >
< i title = "Do not use this feature yet" class = "fa fa-exclamation-triangle" aria - hidden = "true" > < / i >
< 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 ! < / s p a n >
< / d i v >
< div >
@ -122,29 +147,12 @@ function SettingsTab (container, appAPI, appEvents, opts) {
< / d i v >
< / d i v >
< / d i v >
< hr >
< h4 class = "${css.heading}" > Themes ( Selecting a theme will trigger a page reload ) < / h 4 >
< div class = "${css.crow}" >
< input class = "${css.col1}" name = "theme" id = "themeLight" type = "radio" >
< label for = "themeLight" > Light Theme < / l a b e l >
< / d i v >
< div class = "${css.crow}" >
< input class = "${css.col1}" name = "theme" id = "themeDark" type = "radio" >
< label for = "themeDark" > Dark Theme < / l a b e l >
< / d i v >
< hr >
< 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 > < s p a n > D o n o t u s e t h i s a l p h a f e a t u r e i f y o u a r e n o t s u r e w h a t y o u a r e d o i n g ! < / s p a n > )
< / d i v >
< div >
< textarea rows = "4" cols = "70" id = "plugininput" type = "text" class = "${css.pluginTextArea}" > < / t e x t a r e a >
< br / >
< input onclick = $ { loadPlugin } type = "button" value = "Load" class = "${css.pluginLoad}" >
< / d i v >
< / d i v >
< / d i v >
`
function popupWhenMainNetSelected ( ) {
appAPI . config . set ( 'doNotShowAgain' , ! appAPI . config . get ( 'doNotShowAgain' ) )
}
function loadPlugin ( ) {
var json = el . querySelector ( '#plugininput' ) . value