mirror of
https://github.com/mue/mue.git
synced 2026-07-05 15:41:18 +02:00
fix(welcome): Finish button
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import { memo } from 'react';
|
||||
import { MdArrowForwardIos } from 'react-icons/md';
|
||||
import { Button } from 'components/Elements';
|
||||
import variables from 'config/variables';
|
||||
import './preview.scss';
|
||||
|
||||
@@ -13,9 +15,13 @@ function Preview(props) {
|
||||
<div className="preview-mode">
|
||||
<span className="title">{variables.getMessage('modals.main.settings.reminder.title')}</span>
|
||||
<span className="subtitle">{variables.getMessage('modals.welcome.preview.description')}</span>
|
||||
<button onClick={() => setup()}>
|
||||
{variables.getMessage('modals.welcome.preview.continue')}
|
||||
</button>
|
||||
<Button
|
||||
type="settings"
|
||||
onClick={() => setup()}
|
||||
icon={<MdArrowForwardIos />}
|
||||
label={variables.getMessage('modals.welcome.preview.continue')}
|
||||
iconPlacement={'right'}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -92,18 +92,6 @@ export default class Modals extends PureComponent {
|
||||
>
|
||||
<MainModal modalClose={() => this.toggleModal('mainModal', false)} />
|
||||
</Modal>
|
||||
{/*<Modal
|
||||
closeTimeoutMS={300}
|
||||
onRequestClose={() => this.closeWelcome()}
|
||||
isOpen={this.state.welcomeModal}
|
||||
className="Modal welcomemodal mainModal"
|
||||
overlayClassName="Overlay mainModal"
|
||||
shouldCloseOnOverlayClick={false}
|
||||
ariaHideApp={false}
|
||||
>
|
||||
<Welcome modalClose={() => this.closeWelcome()} modalSkip={() => this.previewWelcome()} />
|
||||
</Modal>
|
||||
{this.state.preview && <Preview setup={() => window.location.reload()} />}*/}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ function WelcomeModal() {
|
||||
const nextTab = () => {
|
||||
setDirection(1);
|
||||
if (buttonText === variables.getMessage('modals.welcome.buttons.finish')) {
|
||||
// modalClose();
|
||||
completeSetup();
|
||||
return;
|
||||
}
|
||||
updateTabAndButtonText(currentTab + 1);
|
||||
@@ -108,7 +108,11 @@ function WelcomeModal() {
|
||||
window.location.reload();
|
||||
};
|
||||
|
||||
console.log(localStorage.getItem('showWelcome'));
|
||||
const completeSetup = () => {
|
||||
localStorage.setItem('showWelcome', false);
|
||||
localStorage.setItem('welcomePreview', false);
|
||||
window.location.reload();
|
||||
};
|
||||
|
||||
const Navigation = () => {
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user