mirror of
https://github.com/mue/mue.git
synced 2026-07-24 01:07:23 +02:00
fix: various welcome modal fixes
- fix links - fix style choice - change how theme selector works
This commit is contained in:
@@ -32,6 +32,9 @@ export default class WelcomeSections extends PureComponent {
|
|||||||
autoClass: 'toggle auto active',
|
autoClass: 'toggle auto active',
|
||||||
lightClass: 'toggle lightTheme',
|
lightClass: 'toggle lightTheme',
|
||||||
darkClass: 'toggle darkTheme',
|
darkClass: 'toggle darkTheme',
|
||||||
|
// styles
|
||||||
|
newStyle: 'toggle newStyle active',
|
||||||
|
legacyStyle: 'toggle legacyStyle',
|
||||||
// welcome
|
// welcome
|
||||||
welcomeImage: 0,
|
welcomeImage: 0,
|
||||||
// final
|
// final
|
||||||
@@ -52,6 +55,14 @@ export default class WelcomeSections extends PureComponent {
|
|||||||
loadSettings(true);
|
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) {
|
getSetting(name) {
|
||||||
const value = localStorage.getItem(name).replace('false', 'Off').replace('true', 'On');
|
const value = localStorage.getItem(name).replace('false', 'Off').replace('true', 'On');
|
||||||
return value.charAt(0).toUpperCase() + value.slice(1);
|
return value.charAt(0).toUpperCase() + value.slice(1);
|
||||||
@@ -159,9 +170,9 @@ export default class WelcomeSections extends PureComponent {
|
|||||||
<span className="title">Join our Discord</span>
|
<span className="title">Join our Discord</span>
|
||||||
<span className="subtitle">Talk with the Mue community and developers</span>
|
<span className="subtitle">Talk with the Mue community and developers</span>
|
||||||
</div>
|
</div>
|
||||||
<button>
|
<a href="https://discord.gg/zv8C9F8">
|
||||||
<MdOpenInNew /> Join
|
<MdOpenInNew /> Join
|
||||||
</button>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div className="welcomeNotice">
|
<div className="welcomeNotice">
|
||||||
<div className="icon">
|
<div className="icon">
|
||||||
@@ -171,9 +182,9 @@ export default class WelcomeSections extends PureComponent {
|
|||||||
<span className="title">Contribute on GitHub</span>
|
<span className="title">Contribute on GitHub</span>
|
||||||
<span className="subtitle">Report bugs, add features or donate</span>
|
<span className="subtitle">Report bugs, add features or donate</span>
|
||||||
</div>
|
</div>
|
||||||
<button>
|
<a href="https://github.com/mue/mue">
|
||||||
<MdOpenInNew /> Open
|
<MdOpenInNew /> Open
|
||||||
</button>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
@@ -234,11 +245,11 @@ export default class WelcomeSections extends PureComponent {
|
|||||||
<span className="subtitle">Mue currently offers the choice between the legacy styling and the newly released modern styling.</span>
|
<span className="subtitle">Mue currently offers the choice between the legacy styling and the newly released modern styling.</span>
|
||||||
<div className="themesToggleArea">
|
<div className="themesToggleArea">
|
||||||
<div className="options">
|
<div className="options">
|
||||||
<div className={this.state.lightClass} onClick={() => this.changeTheme('light')}>
|
<div className={this.state.legacyStyle} onClick={() => this.changeStyle('legacy')}>
|
||||||
<MdArchive />
|
<MdArchive />
|
||||||
<span>Legacy</span>
|
<span>Legacy</span>
|
||||||
</div>
|
</div>
|
||||||
<div className={this.state.darkClass} onClick={() => this.changeTheme('dark')}>
|
<div className={this.state.newStyle} onClick={() => this.changeStyle('new')}>
|
||||||
<MdOutlineWhatshot />
|
<MdOutlineWhatshot />
|
||||||
<span>Modern</span>
|
<span>Modern</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -132,7 +132,9 @@
|
|||||||
margin-top: 25px;
|
margin-top: 25px;
|
||||||
|
|
||||||
.lightTheme,
|
.lightTheme,
|
||||||
.darkTheme {
|
.darkTheme,
|
||||||
|
.legacyStyle,
|
||||||
|
.newStyle {
|
||||||
width: 40%;
|
width: 40%;
|
||||||
padding: 50px;
|
padding: 50px;
|
||||||
|
|
||||||
@@ -265,9 +267,16 @@ a.privacy {
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-flow: column;
|
flex-flow: column;
|
||||||
}
|
}
|
||||||
button {
|
a {
|
||||||
|
text-decoration: none;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
padding: 5px 20px;
|
padding: 0 20px;
|
||||||
@include modal-button(standard);
|
@include modal-button(standard);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.toggle.active {
|
||||||
|
@include themed() {
|
||||||
|
background-color: t($modal-sidebarActive) !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user