diff --git a/src/components/modals/welcome/WelcomeSections.jsx b/src/components/modals/welcome/WelcomeSections.jsx index 712c4c33..7410d590 100644 --- a/src/components/modals/welcome/WelcomeSections.jsx +++ b/src/components/modals/welcome/WelcomeSections.jsx @@ -32,6 +32,9 @@ export default class WelcomeSections extends PureComponent { autoClass: 'toggle auto active', lightClass: 'toggle lightTheme', darkClass: 'toggle darkTheme', + // styles + newStyle: 'toggle newStyle active', + legacyStyle: 'toggle legacyStyle', // welcome welcomeImage: 0, // final @@ -52,6 +55,14 @@ export default class WelcomeSections extends PureComponent { loadSettings(true); } + changeStyle(type) { + this.setState({ + newStyle: type === 'new' ? 'toggle newStyle active' : 'toggle newStyle', + legacyStyle: type === 'legacy' ? 'toggle legacyStyle active' : 'toggle legacyStyle', + }); + localStorage.setItem('widgetStyle', type); + } + getSetting(name) { const value = localStorage.getItem(name).replace('false', 'Off').replace('true', 'On'); return value.charAt(0).toUpperCase() + value.slice(1); @@ -159,9 +170,9 @@ export default class WelcomeSections extends PureComponent { Join our Discord Talk with the Mue community and developers - +
@@ -171,9 +182,9 @@ export default class WelcomeSections extends PureComponent { Contribute on GitHub Report bugs, add features or donate
- +
); @@ -234,11 +245,11 @@ export default class WelcomeSections extends PureComponent { Mue currently offers the choice between the legacy styling and the newly released modern styling.
-
this.changeTheme('light')}> +
this.changeStyle('legacy')}> Legacy
-
this.changeTheme('dark')}> +
this.changeStyle('new')}> Modern
diff --git a/src/components/modals/welcome/welcome.scss b/src/components/modals/welcome/welcome.scss index 79564659..c9ca824a 100644 --- a/src/components/modals/welcome/welcome.scss +++ b/src/components/modals/welcome/welcome.scss @@ -132,7 +132,9 @@ margin-top: 25px; .lightTheme, - .darkTheme { + .darkTheme, + .legacyStyle, + .newStyle { width: 40%; padding: 50px; @@ -265,9 +267,16 @@ a.privacy { display: flex; flex-flow: column; } - button { + a { + text-decoration: none; margin-left: auto; - padding: 5px 20px; + padding: 0 20px; @include modal-button(standard); } } + +.toggle.active { + @include themed() { + background-color: t($modal-sidebarActive) !important; + } +} \ No newline at end of file