mirror of
https://github.com/mue/mue.git
synced 2026-06-11 02:59:06 +02:00
fix: improvements to feedback modal
This commit is contained in:
@@ -3,14 +3,14 @@ import React from 'react';
|
||||
import EventBus from '../../modules/helpers/eventbus';
|
||||
|
||||
import Main from './main/Main';
|
||||
import Feedback from './feedback/Feedback';
|
||||
import Navbar from '../widgets/navbar/Navbar';
|
||||
|
||||
import Modal from 'react-modal';
|
||||
|
||||
// These modals are lazy loaded as the user won't use them every time they open a tab
|
||||
// We used to lazy load the main modal, but doing so broke the main modal open animation on first click
|
||||
// Welcome modal is lazy loaded as the user won't use it every time they open a tab
|
||||
// We used to lazy load the main and feedback modals, but doing so broke the modal open animation on first click
|
||||
const Welcome = React.lazy(() => import('./welcome/Welcome'));
|
||||
const Feedback = React.lazy(() => import('./feedback/Feedback'));
|
||||
const renderLoader = () => <></>;
|
||||
|
||||
export default class Modals extends React.PureComponent {
|
||||
|
||||
@@ -38,7 +38,7 @@ export default class FeedbackModal extends React.PureComponent {
|
||||
});
|
||||
|
||||
await fetch(window.constants.FEEDBACK_FORM, {
|
||||
'method': 'POST'
|
||||
method: 'POST'
|
||||
});
|
||||
|
||||
this.setState({
|
||||
@@ -47,7 +47,7 @@ export default class FeedbackModal extends React.PureComponent {
|
||||
|
||||
setTimeout(() => {
|
||||
this.props.modalClose();
|
||||
}, 3000);
|
||||
}, 5000);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ export default class FeedbackModal extends React.PureComponent {
|
||||
<textarea name='question4' id='questionfour'/>
|
||||
<p className='feedbackerror'>{this.state.questionfourerror}</p>
|
||||
</>
|
||||
{this.state.formsubmit}
|
||||
<p>{this.state.formsubmit}</p>
|
||||
<button onClick={() => this.submitForm()}>{this.language.submit}</button>
|
||||
</>
|
||||
</div>
|
||||
|
||||
@@ -31,10 +31,14 @@
|
||||
border: none;
|
||||
padding: 15px 20px;
|
||||
font-size: 1.5em;
|
||||
background: linear-gradient(90deg, #ffb032 0%, #dd3b67 100%);
|
||||
background: #5352ed;
|
||||
color: #fff;
|
||||
text-transform: uppercase;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
background: rgba(83, 82, 237, 0.8);
|
||||
}
|
||||
}
|
||||
|
||||
input[type=text] {
|
||||
@@ -54,7 +58,8 @@
|
||||
|
||||
textarea {
|
||||
width: 80%;
|
||||
background-color: var(--sidebar);
|
||||
padding: 10px;
|
||||
background-color: var(--sidebar) !important;
|
||||
}
|
||||
|
||||
.feedbackerror {
|
||||
|
||||
Reference in New Issue
Block a user