Unverified Commit 970257e6 authored by yann300's avatar yann300 Committed by GitHub

Merge pull request #1657 from dvdptr/feat/new-theme-david

feat(ui): Add support for a new theme
parents c0dd44a1 2d4abfed
...@@ -27,10 +27,11 @@ const css = csjs` ...@@ -27,10 +27,11 @@ const css = csjs`
} }
.dragbar { .dragbar {
position : absolute; position : absolute;
width : 0.5em; width : ${styles.rightPanel.dragbarWidth};
top : 3em; top : 3em;
bottom : 0; bottom : 0;
cursor : col-resize; cursor : col-resize;
background-color : ${styles.rightPanel.dragbarBackgroundColor};
z-index : 999; z-index : 999;
border-left : 2px solid ${styles.rightPanel.bar_Dragging}; border-left : 2px solid ${styles.rightPanel.bar_Dragging};
} }
......
...@@ -82,7 +82,7 @@ var css = csjs` ...@@ -82,7 +82,7 @@ var css = csjs`
bottom : 0; bottom : 0;
cursor : col-resize; cursor : col-resize;
z-index : 999; z-index : 999;
border-right : 2px solid hsla(215, 81%, 79%, .3); border-right : ${styles.leftPanel.dragbarBorderRight};
} }
.ghostbar { .ghostbar {
width : 3px; width : 3px;
......
...@@ -78,7 +78,7 @@ var css = csjs` ...@@ -78,7 +78,7 @@ var css = csjs`
line-height : 2ch; line-height : 2ch;
padding : 1ch; padding : 1ch;
margin-top : 2ch; margin-top : 2ch;
border-top : 0.07ch solid ${styles.colors.veryLightGrey}; border-top : ${styles.terminal.blockBorderTop};
color : ${styles.appProperties.mainText_Color}; color : ${styles.appProperties.mainText_Color};
} }
.cli { .cli {
......
...@@ -26,7 +26,7 @@ module.exports = class SettingsTab { ...@@ -26,7 +26,7 @@ module.exports = class SettingsTab {
el: null, el: null,
optionVM: null, personal: null, warnPersonalMode: null, generateContractMetadata: null, optionVM: null, personal: null, warnPersonalMode: null, generateContractMetadata: null,
pluginInput: null, versionSelector: null, version: null, pluginInput: null, versionSelector: null, version: null,
theme: { dark: null, light: null }, theme: { dark: null, light: null, clean: null },
plugins: {}, plugins: {},
config: { config: {
general: null, themes: null, general: null, themes: null,
...@@ -66,6 +66,7 @@ module.exports = class SettingsTab { ...@@ -66,6 +66,7 @@ module.exports = class SettingsTab {
self._view.theme.light = yo`<input onchange=${onswitch2lightTheme} class="${css.col1}" name="theme" id="themeLight" type="radio">` self._view.theme.light = yo`<input onchange=${onswitch2lightTheme} class="${css.col1}" name="theme" id="themeLight" type="radio">`
self._view.theme.dark = yo`<input onchange=${onswitch2darkTheme} class="${css.col1}" name="theme" id="themeDark" type="radio">` self._view.theme.dark = yo`<input onchange=${onswitch2darkTheme} class="${css.col1}" name="theme" id="themeDark" type="radio">`
self._view.theme.clean = yo`<input onchange=${onswitch2cleanTheme} class="${css.col1}" name="theme" id="themeClean" type="radio">`
self._view.theme[self.data.currentTheme].setAttribute('checked', 'checked') self._view.theme[self.data.currentTheme].setAttribute('checked', 'checked')
self._view.config.general = yo` self._view.config.general = yo`
...@@ -112,6 +113,10 @@ module.exports = class SettingsTab { ...@@ -112,6 +113,10 @@ module.exports = class SettingsTab {
${self._view.theme.dark} ${self._view.theme.dark}
<label for="themeDark">Dark Theme</label> <label for="themeDark">Dark Theme</label>
</div> </div>
<div class="${css.crow}">
${self._view.theme.clean}
<label for="themeClean">Clean Theme</label>
</div>
</div>` </div>`
self._view.config.plugins = yo`<div></div>` self._view.config.plugins = yo`<div></div>`
self._view.config.plugin = yo` self._view.config.plugin = yo`
...@@ -195,6 +200,10 @@ module.exports = class SettingsTab { ...@@ -195,6 +200,10 @@ module.exports = class SettingsTab {
styleGuide.switchTheme('light') styleGuide.switchTheme('light')
window.location.reload() window.location.reload()
} }
function onswitch2cleanTheme (event) {
styleGuide.switchTheme('clean')
window.location.reload()
}
function onchangePersonal (event) { function onchangePersonal (event) {
self._deps.config.set('settings/personal-mode', !self._deps.config.get('settings/personal-mode')) self._deps.config.set('settings/personal-mode', !self._deps.config.get('settings/personal-mode'))
} }
......
...@@ -130,15 +130,15 @@ var css = csjs` ...@@ -130,15 +130,15 @@ var css = csjs`
${styles.rightPanel.runTab.button_transaction} ${styles.rightPanel.runTab.button_transaction}
} }
.atAddress { .atAddress {
${styles.rightPanel.runTab.button_atAddress} margin: 0;
min-width: 100px; min-width: 100px;
width: 100px; width: 100px;
font-size: 10px; font-size: 10px;
margin: 0;
word-break: inherit; word-break: inherit;
border-top-right-radius: 0; border-top-right-radius: 0;
border-bottom-right-radius: 0; border-bottom-right-radius: 0;
border-right: 0; border-right: 0;
${styles.rightPanel.runTab.button_atAddress}
} }
.atAddressSect { .atAddressSect {
margin-top: 6px; margin-top: 6px;
......
...@@ -411,6 +411,7 @@ function styleGuide () { ...@@ -411,6 +411,7 @@ function styleGuide () {
bar_Ghost: appProperties.ghostBar, bar_Ghost: appProperties.ghostBar,
bar_Dragging: appProperties.draggingBar, bar_Dragging: appProperties.draggingBar,
dragbarBorderRight: '2px solid hsla(215, 81%, 79%, .3)',
icon_Color_Menu: appProperties.icon_Color, icon_Color_Menu: appProperties.icon_Color,
icon_HoverColor_Menu: appProperties.icon_HoverColor, icon_HoverColor_Menu: appProperties.icon_HoverColor,
...@@ -460,6 +461,8 @@ function styleGuide () { ...@@ -460,6 +461,8 @@ function styleGuide () {
text_Regular_TransactionLog: appProperties.supportText_Color, text_Regular_TransactionLog: appProperties.supportText_Color,
text_Button: appProperties.oppositeText_Color, text_Button: appProperties.oppositeText_Color,
blockBorderTop: '0.07ch solid ' + cssProperties.colors.veryLightGrey,
icon_Color_Log_Succeed: appProperties.success_BorderColor, icon_Color_Log_Succeed: appProperties.success_BorderColor,
icon_Color_Log_Failed: appProperties.errorText_Color, icon_Color_Log_Failed: appProperties.errorText_Color,
icon_BackgroundColor_Log_Call: appProperties.infoText_Color, icon_BackgroundColor_Log_Call: appProperties.infoText_Color,
...@@ -514,6 +517,8 @@ function styleGuide () { ...@@ -514,6 +517,8 @@ function styleGuide () {
bar_Ghost: appProperties.ghostBar, bar_Ghost: appProperties.ghostBar,
bar_Dragging: appProperties.draggingBar, bar_Dragging: appProperties.draggingBar,
dragbarWidth: '0.5rem',
dragbarBackgroundColor: '',
icon_Color_TogglePanel: appProperties.icon_Color, icon_Color_TogglePanel: appProperties.icon_Color,
icon_HoverColor_TogglePanel: appProperties.icon_HoverColor, icon_HoverColor_TogglePanel: appProperties.icon_HoverColor,
......
This diff is collapsed.
...@@ -418,6 +418,7 @@ function styleGuideDark () { ...@@ -418,6 +418,7 @@ function styleGuideDark () {
bar_Ghost: appProperties.ghostBar, bar_Ghost: appProperties.ghostBar,
bar_Dragging: appProperties.draggingBar, bar_Dragging: appProperties.draggingBar,
dragbarBorderRight: '2px solid hsla(215, 81%, 79%, .3)',
icon_Color_Menu: appProperties.icon_Color, icon_Color_Menu: appProperties.icon_Color,
icon_HoverColor_Menu: appProperties.icon_HoverColor, icon_HoverColor_Menu: appProperties.icon_HoverColor,
...@@ -467,6 +468,8 @@ function styleGuideDark () { ...@@ -467,6 +468,8 @@ function styleGuideDark () {
text_Regular_TransactionLog: appProperties.supportText_Color, text_Regular_TransactionLog: appProperties.supportText_Color,
text_Button: appProperties.oppositeText_Color, text_Button: appProperties.oppositeText_Color,
blockBorderTop: '0.07ch solid ' + cssProperties.colors.veryLightGrey,
icon_Color_TogglePanel: appProperties.icon_Color, icon_Color_TogglePanel: appProperties.icon_Color,
icon_HoverColor_TogglePanel: appProperties.icon_HoverColor, icon_HoverColor_TogglePanel: appProperties.icon_HoverColor,
icon_Color_Menu: appProperties.icon_Color, icon_Color_Menu: appProperties.icon_Color,
...@@ -516,6 +519,8 @@ function styleGuideDark () { ...@@ -516,6 +519,8 @@ function styleGuideDark () {
bar_Ghost: appProperties.ghostBar, bar_Ghost: appProperties.ghostBar,
bar_Dragging: appProperties.draggingBar, bar_Dragging: appProperties.draggingBar,
dragbarWidth: '0.5rem',
dragbarBackgroundColor: '',
icon_Color_TogglePanel: appProperties.icon_Color, icon_Color_TogglePanel: appProperties.icon_Color,
icon_HoverColor_TogglePanel: appProperties.icon_HoverColor, icon_HoverColor_TogglePanel: appProperties.icon_HoverColor,
......
var styleGuideLight = require('./style-guide') var styleGuideLight = require('./style-guide')
var styleGuideDark = require('./styleGuideDark') var styleGuideDark = require('./styleGuideDark')
var styleGuideClean = require('./styleGuideClean')
var Storage = require('remix-lib').Storage var Storage = require('remix-lib').Storage
module.exports = { module.exports = {
chooser: function () { chooser: function () {
...@@ -8,6 +10,8 @@ module.exports = { ...@@ -8,6 +10,8 @@ module.exports = {
if (themeStorage.exists('theme')) { if (themeStorage.exists('theme')) {
if (themeStorage.get('theme') === 'dark') { if (themeStorage.get('theme') === 'dark') {
return styleGuideDark() return styleGuideDark()
} else if (themeStorage.get('theme') === 'clean') {
return styleGuideClean()
} else { } else {
return styleGuideLight() return styleGuideLight()
} }
...@@ -23,6 +27,8 @@ module.exports = { ...@@ -23,6 +27,8 @@ module.exports = {
return styleGuideDark() return styleGuideDark()
} else if (theme === 'light') { } else if (theme === 'light') {
return styleGuideLight() return styleGuideLight()
} else if (theme === 'clean') {
return styleGuideClean()
} else { } else {
return styleGuideLight() return styleGuideLight()
} }
......
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