mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-05 07:27:04 +03:00
Resolve #981
This commit is contained in:
parent
79edca93ef
commit
cf720e7105
2 changed files with 9 additions and 4 deletions
|
|
@ -4,8 +4,8 @@ class NextcloudPlugin extends \RainLoop\Plugins\AbstractPlugin
|
||||||
{
|
{
|
||||||
const
|
const
|
||||||
NAME = 'Nextcloud',
|
NAME = 'Nextcloud',
|
||||||
VERSION = '2.17',
|
VERSION = '2.18',
|
||||||
RELEASE = '2023-01-31',
|
RELEASE = '2023-02-20',
|
||||||
CATEGORY = 'Integrations',
|
CATEGORY = 'Integrations',
|
||||||
DESCRIPTION = 'Integrate with Nextcloud v20+',
|
DESCRIPTION = 'Integrate with Nextcloud v20+',
|
||||||
REQUIRED = '2.25.1';
|
REQUIRED = '2.25.1';
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
let view = e.detail;
|
let view = e.detail;
|
||||||
view.nextcloudAttach = () => {
|
view.nextcloudAttach = () => {
|
||||||
rl.nextcloud.selectFiles().then(files => {
|
rl.nextcloud.selectFiles().then(files => {
|
||||||
|
let urls = [];
|
||||||
files && files.forEach(file => {
|
files && files.forEach(file => {
|
||||||
if (file.name) {
|
if (file.name) {
|
||||||
let attachment = view.addAttachmentHelper(
|
let attachment = view.addAttachmentHelper(
|
||||||
|
|
@ -29,10 +30,14 @@
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
} else if (file.url) {
|
} else if (file.url) {
|
||||||
// TODO: other editors and text/plain
|
urls.push(file.url);
|
||||||
view.oEditor.editor.squire.makeLink(file.url);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
if (urls.length) {
|
||||||
|
// TODO: other editors and text/plain
|
||||||
|
// https://github.com/the-djmaze/snappymail/issues/981
|
||||||
|
view.oEditor.editor.squire.insertHTML(urls.join("<br>"));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue