2022-10-30 16:56:26 +00:00
|
|
|
import { memo } from 'react';
|
2021-09-10 15:38:53 +00:00
|
|
|
import variables from 'modules/variables';
|
2022-04-07 09:25:01 +00:00
|
|
|
import { MdClose, MdRestartAlt } from 'react-icons/md';
|
2021-08-28 14:34:12 +00:00
|
|
|
import { setDefaultSettings } from 'modules/helpers/settings';
|
2022-04-24 20:12:49 +00:00
|
|
|
import Tooltip from '../../../helpers/tooltip/Tooltip';
|
2021-03-31 11:21:37 +00:00
|
|
|
|
2022-10-30 16:56:26 +00:00
|
|
|
function ResetModal({ modalClose }) {
|
2021-04-17 20:38:16 +00:00
|
|
|
const reset = () => {
|
2021-09-28 22:04:04 +00:00
|
|
|
variables.stats.postEvent('setting', 'Reset');
|
2021-08-14 19:10:48 +00:00
|
|
|
setDefaultSettings('reset');
|
2021-04-17 20:38:16 +00:00
|
|
|
window.location.reload();
|
2021-07-18 09:43:25 +00:00
|
|
|
};
|
2021-04-17 20:38:16 +00:00
|
|
|
|
2021-03-19 20:18:57 +00:00
|
|
|
return (
|
2022-04-24 20:12:49 +00:00
|
|
|
<div className="smallModal">
|
|
|
|
<div className="shareHeader">
|
2022-05-11 15:09:26 +00:00
|
|
|
<span className="title">
|
2022-08-26 09:45:32 +00:00
|
|
|
{variables.getMessage('modals.main.settings.sections.advanced.reset_modal.title')}
|
2022-05-11 15:09:26 +00:00
|
|
|
</span>
|
2022-06-03 20:18:47 +00:00
|
|
|
<Tooltip
|
2022-08-26 09:45:32 +00:00
|
|
|
title={variables.getMessage('modals.main.settings.sections.advanced.reset_modal.cancel')}
|
2022-06-03 20:18:47 +00:00
|
|
|
>
|
2022-04-24 20:12:49 +00:00
|
|
|
<div className="close" onClick={modalClose}>
|
|
|
|
<MdClose />
|
|
|
|
</div>
|
|
|
|
</Tooltip>
|
|
|
|
</div>
|
2022-04-08 13:48:36 +00:00
|
|
|
<span className="title">
|
2022-08-26 10:44:24 +00:00
|
|
|
{variables.getMessage('modals.main.settings.sections.advanced.reset_modal.question')}
|
2022-04-08 13:48:36 +00:00
|
|
|
</span>
|
2022-04-24 20:12:49 +00:00
|
|
|
<span className="subtitle">
|
2022-08-26 10:44:24 +00:00
|
|
|
{variables.getMessage('modals.main.settings.sections.advanced.reset_modal.information')}
|
2022-04-08 13:48:36 +00:00
|
|
|
</span>
|
|
|
|
<div className="resetFooter">
|
2022-05-11 15:09:26 +00:00
|
|
|
<button className="textButton" onClick={modalClose}>
|
2022-04-08 13:48:36 +00:00
|
|
|
<MdClose />
|
2022-08-26 09:45:32 +00:00
|
|
|
{variables.getMessage('modals.main.settings.sections.advanced.reset_modal.cancel')}
|
2021-07-06 18:38:20 +00:00
|
|
|
</button>
|
2022-04-08 13:48:36 +00:00
|
|
|
<button onClick={() => reset()}>
|
|
|
|
<MdRestartAlt />
|
2022-08-26 09:45:32 +00:00
|
|
|
{variables.getMessage('modals.main.settings.buttons.reset')}
|
2021-07-06 18:38:20 +00:00
|
|
|
</button>
|
2021-03-19 20:18:57 +00:00
|
|
|
</div>
|
2022-04-08 13:48:36 +00:00
|
|
|
</div>
|
2021-03-19 20:18:57 +00:00
|
|
|
);
|
|
|
|
}
|
2022-10-30 16:56:26 +00:00
|
|
|
|
2022-11-06 11:59:59 +00:00
|
|
|
export default memo(ResetModal);
|