mirror of
https://codeberg.org/yeentown/barkey
synced 2024-11-26 02:55:30 +00:00
View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/658 Closes #584 Approved-by: Marie <github@yuugi.dev> Approved-by: dakkar <dakkar@thenautilus.net>
This commit is contained in:
commit
5f7730bd5c
1 changed files with 15 additions and 4 deletions
|
@ -630,11 +630,22 @@ 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,
|
||||||
|
primary: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 'no',
|
||||||
|
text: i18n.ts.no,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}).then(({ result }) => {
|
||||||
|
if (result !== 'yes') {
|
||||||
insertTextAtCursor(textareaEl.value, paste);
|
insertTextAtCursor(textareaEl.value, paste);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue