fix: link modal button size & email share

Co-authored-by: David Ralph <me@davidcralph.co.uk>
This commit is contained in:
alexsparkes
2024-05-28 20:32:14 +01:00
parent 5bb71fc45c
commit 1772829ec1
3 changed files with 4236 additions and 3512 deletions

View File

@@ -4,6 +4,7 @@ import { useState, memo } from 'react';
import { TextareaAutosize } from '@mui/material';
import { MdAddLink, MdClose } from 'react-icons/md';
import { Tooltip } from 'components/Elements';
import { Button } from 'components/Elements';
function AddModal({ urlError, iconError, addLink, closeModal, edit, editData, editLink }) {
const [name, setName] = useState(edit ? editData.name : '');
@@ -51,26 +52,9 @@ function AddModal({ urlError, iconError, addLink, closeModal, edit, editData, ed
{iconError} {urlError}
</span>
{edit ? (
<button
style={{
height: '16px',
fontSize: '15px',
}}
onClick={() => editLink(editData, name, url, icon)}
>
<MdAddLink /> {variables.getMessage('modals.main.settings.sections.quicklinks.edit')}
</button>
<Button type="settings" onClick={() => editLink(editData, name, url, icon)} icon={<MdAddLink />} label={variables.getMessage('modals.main.settings.sections.quicklinks.edit')} />
) : (
<button
style={{
height: '16px',
fontSize: '15px',
}}
className="btn-settings"
onClick={() => addLink(name, url, icon)}
>
<MdAddLink /> {variables.getMessage('widgets.quicklinks.add')}
</button>
<Button type="settings" onClick={() => addLink(name, url, icon)} icon={<MdAddLink />} label={variables.getMessage('widgets.quicklinks.add')} />
)}
</div>
</div>

View File

@@ -31,7 +31,7 @@ function ShareModal({ modalClose, data }) {
const copyLink = () => {
navigator.clipboard.writeText(data.url);
toast(variables.getMessage('modals.share.copy_link'));
toast(data.startsWith('"') ? variables.getMessage('toasts.quote') : variables.getMessage('toasts.link_copied'));
};
return (
@@ -73,9 +73,9 @@ function ShareModal({ modalClose, data }) {
window
.open(
'mailto:email@example.com?subject=Check%20out%20this%20%on%20%Mue!&body=' +
data.data.name +
data.name +
'on Mue: ' +
data,
data.url,
'_blank',
)
.focus()