respect following privacy settings

This commit is contained in:
Hazel K 2024-10-05 18:25:13 -04:00
parent ac1e5a0fb5
commit ca98107eee

View file

@ -630,11 +630,21 @@ async function onPaste(ev: ClipboardEvent) {
if (paste.length > 1000) { if (paste.length > 1000) {
ev.preventDefault(); ev.preventDefault();
os.confirm({ os.actions({
type: 'info', type: 'question',
text: i18n.ts.attachAsFileQuestion, text: i18n.ts.attachAsFileQuestion,
}).then(({ canceled }) => { actions: [
if (canceled) { {
value: 'yes',
text: i18n.ts.yes,
},
{
value: 'no',
text: i18n.ts.no,
},
],
}).then(({ result }) => {
if (result !== 'yes') {
insertTextAtCursor(textareaEl.value, paste); insertTextAtCursor(textareaEl.value, paste);
return; return;
} }