2022-04-11 21:57:07 +00:00
|
|
|
import variables from 'modules/variables';
|
2022-10-30 16:56:26 +00:00
|
|
|
import { useState, memo } from 'react';
|
2022-04-24 20:12:49 +00:00
|
|
|
import { MdAdd, MdClose } from 'react-icons/md';
|
|
|
|
import Tooltip from '../../../../../helpers/tooltip/Tooltip';
|
2021-11-01 13:24:09 +00:00
|
|
|
|
2022-10-30 16:56:26 +00:00
|
|
|
function CustomURLModal({ modalClose, modalCloseOnly }) {
|
2021-11-10 16:20:40 +00:00
|
|
|
const [url, setURL] = useState();
|
2021-11-01 13:24:09 +00:00
|
|
|
|
|
|
|
return (
|
2022-04-24 20:12:49 +00:00
|
|
|
<div className="smallModal">
|
|
|
|
<div className="shareHeader">
|
|
|
|
<span className="title">
|
2022-08-26 09:45:32 +00:00
|
|
|
{variables.getMessage('modals.main.settings.sections.background.source.add_url')}
|
2022-04-24 20:12:49 +00:00
|
|
|
</span>
|
2022-06-03 20:52:37 +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:52:37 +00:00
|
|
|
>
|
2022-04-24 20:12:49 +00:00
|
|
|
<div className="close" onClick={modalCloseOnly}>
|
|
|
|
<MdClose />
|
|
|
|
</div>
|
|
|
|
</Tooltip>
|
|
|
|
</div>
|
|
|
|
<div className="copy">
|
2022-05-11 15:09:26 +00:00
|
|
|
<input
|
|
|
|
type="text"
|
|
|
|
value={url}
|
|
|
|
onChange={(e) => setURL(e.target.value)}
|
|
|
|
varient="outlined"
|
|
|
|
/>
|
2022-06-03 20:52:37 +00:00
|
|
|
<Tooltip
|
2022-08-26 09:45:32 +00:00
|
|
|
title={variables.getMessage('modals.main.settings.sections.background.source.add_url')}
|
2022-06-03 20:52:37 +00:00
|
|
|
placement="top"
|
|
|
|
>
|
2022-04-24 20:12:49 +00:00
|
|
|
<button onClick={() => modalClose(url)}>
|
2022-05-11 15:09:26 +00:00
|
|
|
<MdAdd />
|
2022-04-24 20:12:49 +00:00
|
|
|
</button>
|
|
|
|
</Tooltip>
|
2021-11-01 13:24:09 +00:00
|
|
|
</div>
|
2022-04-24 20:12:49 +00:00
|
|
|
</div>
|
2021-11-01 13:24:09 +00:00
|
|
|
);
|
|
|
|
}
|
2022-10-30 16:56:26 +00:00
|
|
|
|
2022-11-06 11:59:59 +00:00
|
|
|
export default memo(CustomURLModal);
|