mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-12-27 09:36:09 +08: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
|
||||
NAME = 'Nextcloud',
|
||||
VERSION = '2.17',
|
||||
RELEASE = '2023-01-31',
|
||||
VERSION = '2.18',
|
||||
RELEASE = '2023-02-20',
|
||||
CATEGORY = 'Integrations',
|
||||
DESCRIPTION = 'Integrate with Nextcloud v20+',
|
||||
REQUIRED = '2.25.1';
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
let view = e.detail;
|
||||
view.nextcloudAttach = () => {
|
||||
rl.nextcloud.selectFiles().then(files => {
|
||||
let urls = [];
|
||||
files && files.forEach(file => {
|
||||
if (file.name) {
|
||||
let attachment = view.addAttachmentHelper(
|
||||
|
@ -29,10 +30,14 @@
|
|||
}
|
||||
);
|
||||
} else if (file.url) {
|
||||
// TODO: other editors and text/plain
|
||||
view.oEditor.editor.squire.makeLink(file.url);
|
||||
urls.push(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…
Reference in a new issue