wip : email-pj-defunt
This commit is contained in:
parent
d115f2be5d
commit
2e177f815d
@ -63,6 +63,10 @@ return [
|
|||||||
['name' => 'settings#setConfig', 'url' => '/v1/config/{key}', 'verb' => 'POST'],
|
['name' => 'settings#setConfig', 'url' => '/v1/config/{key}', 'verb' => 'POST'],
|
||||||
// Tools
|
// Tools
|
||||||
['name' => 'email#sendEmailPublicLink', 'url' => '/v1/public/sendmail', 'verb' => 'POST'],
|
['name' => 'email#sendEmailPublicLink', 'url' => '/v1/public/sendmail', 'verb' => 'POST'],
|
||||||
|
|
||||||
|
//Email box
|
||||||
|
['name' => 'emailBox#loadEmailboxMessage', 'url' => '/load-email-box', 'verb' => 'GET'],
|
||||||
|
['name' => 'emailBox#loadEmailboxAttachement', 'url' => '/load-email-attachement/{messageId}', 'verb' => 'GET'],
|
||||||
],
|
],
|
||||||
'resources' => [
|
'resources' => [
|
||||||
'appointmentConfig' => ['url' => '/v1/appointment_configs']
|
'appointmentConfig' => ['url' => '/v1/appointment_configs']
|
||||||
|
|||||||
@ -1322,7 +1322,7 @@ function b(n) {
|
|||||||
/******/ // This function allow to reference async chunks
|
/******/ // This function allow to reference async chunks
|
||||||
/******/ __webpack_require__.u = (chunkId) => {
|
/******/ __webpack_require__.u = (chunkId) => {
|
||||||
/******/ // return url for filenames based on template
|
/******/ // return url for filenames based on template
|
||||||
/******/ return "calendar-" + chunkId + ".js?v=" + {"vendors-node_modules_nextcloud_capabilities_dist_index_js-node_modules_nextcloud_vue-select_d-877981":"741d92f5ec54d0c1ff41","vendors-node_modules_vue_dist_vue_runtime_esm_js":"7e3171593bdc0f62040b","vendors-node_modules_nextcloud_cdav-library_dist_dist_js-node_modules_nextcloud_logger_dist_i-36c16b":"c3b3db23da041c717fc1","vendors-node_modules_webdav_dist_web_index_js":"454da8f908d41b47c607","vendors-node_modules_vue-material-design-icons_CalendarBlankOutline_vue-node_modules_nextclou-4adead":"01a7eb6779cc0e417f44","vendors-node_modules_nextcloud_vue-dashboard_dist_vue-dashboard_js-node_modules_css-loader_di-9e6f3d":"c2bd3081c493a88308a2","src_models_rfcProps_js-src_services_caldavService_js-src_services_talkService_js-src_services-8a2790":"94fac30d128df46a89a6","src_store_index_js":"276ff6be1cb450405b79","src_fullcalendar_eventSources_eventSourceFunction_js-src_utils_moment_js-data_image_svg_xml_3-b73258":"740a2859d1f364b508c1","dashboard-lazy":"60b7f707e08fff04c7a1","vendors-node_modules_vue-material-design-icons_CalendarBlank_vue-node_modules_vue-material-de-e2c1f8":"0658eb6db50a09dd2afe","vendors-node_modules_path-browserify_index_js-node_modules_nextcloud_dialogs_dist_chunks_Dial-e0595f":"e0f3178442f3c9eb35e1","node_modules_nextcloud_dialogs_dist_legacy_mjs":"8be838e4c6e9aae56c87","vendors-node_modules_nextcloud_dialogs_dist_chunks_FilePicker-8ibBgPg__mjs":"ea54a36450de178d1141","vendors-node_modules_moment_locale_af_js-node_modules_moment_locale_ar-dz_js-node_modules_mom-582c96":"ce1bed825f57dd1d117a","node_modules_moment_locale_sync_recursive_":"4bc2c39c5e0ff182c2e3"}[chunkId] + "";
|
/******/ return "calendar-" + chunkId + ".js?v=" + {"vendors-node_modules_nextcloud_capabilities_dist_index_js-node_modules_nextcloud_vue-select_d-877981":"741d92f5ec54d0c1ff41","vendors-node_modules_vue_dist_vue_runtime_esm_js":"7e3171593bdc0f62040b","vendors-node_modules_nextcloud_cdav-library_dist_dist_js-node_modules_nextcloud_logger_dist_i-36c16b":"c3b3db23da041c717fc1","vendors-node_modules_webdav_dist_web_index_js":"454da8f908d41b47c607","vendors-node_modules_vue-material-design-icons_CalendarBlankOutline_vue-node_modules_nextclou-4adead":"01a7eb6779cc0e417f44","vendors-node_modules_nextcloud_vue-dashboard_dist_vue-dashboard_js-node_modules_css-loader_di-9e6f3d":"c2bd3081c493a88308a2","src_models_rfcProps_js-src_services_caldavService_js-src_services_talkService_js-src_services-8a2790":"94fac30d128df46a89a6","src_store_index_js":"256e15d8889d4ef4234b","src_fullcalendar_eventSources_eventSourceFunction_js-src_utils_moment_js-data_image_svg_xml_3-b73258":"740a2859d1f364b508c1","dashboard-lazy":"60b7f707e08fff04c7a1","vendors-node_modules_vue-material-design-icons_CalendarBlank_vue-node_modules_vue-material-de-e2c1f8":"0658eb6db50a09dd2afe","vendors-node_modules_path-browserify_index_js-node_modules_nextcloud_dialogs_dist_chunks_Dial-e0595f":"e0f3178442f3c9eb35e1","node_modules_nextcloud_dialogs_dist_legacy_mjs":"8be838e4c6e9aae56c87","vendors-node_modules_nextcloud_dialogs_dist_chunks_FilePicker-8ibBgPg__mjs":"ea54a36450de178d1141","vendors-node_modules_moment_locale_af_js-node_modules_moment_locale_ar-dz_js-node_modules_mom-582c96":"ce1bed825f57dd1d117a","node_modules_moment_locale_sync_recursive_":"4bc2c39c5e0ff182c2e3"}[chunkId] + "";
|
||||||
/******/ };
|
/******/ };
|
||||||
/******/ })();
|
/******/ })();
|
||||||
/******/
|
/******/
|
||||||
@ -1580,4 +1580,4 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||||||
|
|
||||||
/******/ })()
|
/******/ })()
|
||||||
;
|
;
|
||||||
//# sourceMappingURL=calendar-dashboard.js.map?v=ea575d366c0a35d0da21
|
//# sourceMappingURL=calendar-dashboard.js.map?v=76085d55951f19ac3dcc
|
||||||
File diff suppressed because one or more lines are too long
@ -7655,16 +7655,22 @@ __webpack_require__.r(__webpack_exports__);
|
|||||||
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
||||||
/* harmony export */ });
|
/* harmony export */ });
|
||||||
/* harmony import */ var _nextcloud_vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @nextcloud/vue */ "./node_modules/@nextcloud/vue/dist/index.mjs");
|
/* harmony import */ var _nextcloud_vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @nextcloud/vue */ "./node_modules/@nextcloud/vue/dist/index.mjs");
|
||||||
/* harmony import */ var vue_material_design_icons_Upload_vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vue-material-design-icons/Upload.vue */ "./node_modules/vue-material-design-icons/Upload.vue");
|
/* harmony import */ var _nextcloud_axios__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @nextcloud/axios */ "./node_modules/@nextcloud/axios/dist/index.es.mjs");
|
||||||
/* harmony import */ var vue_material_design_icons_Close_vue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! vue-material-design-icons/Close.vue */ "./node_modules/vue-material-design-icons/Close.vue");
|
/* harmony import */ var vue_material_design_icons_Upload_vue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! vue-material-design-icons/Upload.vue */ "./node_modules/vue-material-design-icons/Upload.vue");
|
||||||
/* harmony import */ var vue_material_design_icons_Folder_vue__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! vue-material-design-icons/Folder.vue */ "./node_modules/vue-material-design-icons/Folder.vue");
|
/* harmony import */ var vue_material_design_icons_Close_vue__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! vue-material-design-icons/Close.vue */ "./node_modules/vue-material-design-icons/Close.vue");
|
||||||
/* harmony import */ var vue_material_design_icons_Paperclip_vue__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! vue-material-design-icons/Paperclip.vue */ "./node_modules/vue-material-design-icons/Paperclip.vue");
|
/* harmony import */ var vue_material_design_icons_Folder_vue__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! vue-material-design-icons/Folder.vue */ "./node_modules/vue-material-design-icons/Folder.vue");
|
||||||
/* harmony import */ var vue_material_design_icons_Plus_vue__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! vue-material-design-icons/Plus.vue */ "./node_modules/vue-material-design-icons/Plus.vue");
|
/* harmony import */ var vue_material_design_icons_Paperclip_vue__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! vue-material-design-icons/Paperclip.vue */ "./node_modules/vue-material-design-icons/Paperclip.vue");
|
||||||
/* harmony import */ var _nextcloud_router__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @nextcloud/router */ "./node_modules/@nextcloud/router/dist/index.mjs");
|
/* harmony import */ var vue_material_design_icons_Plus_vue__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! vue-material-design-icons/Plus.vue */ "./node_modules/vue-material-design-icons/Plus.vue");
|
||||||
/* harmony import */ var _nextcloud_dialogs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @nextcloud/dialogs */ "./node_modules/@nextcloud/dialogs/dist/index.mjs");
|
/* harmony import */ var vue_material_design_icons_Email_vue__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! vue-material-design-icons/Email.vue */ "./node_modules/vue-material-design-icons/Email.vue");
|
||||||
/* harmony import */ var _utils_logger_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../utils/logger.js */ "./src/utils/logger.js");
|
/* harmony import */ var vue_material_design_icons_ArrowLeft_vue__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! vue-material-design-icons/ArrowLeft.vue */ "./node_modules/vue-material-design-icons/ArrowLeft.vue");
|
||||||
/* harmony import */ var _services_attachmentService_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../services/attachmentService.js */ "./src/services/attachmentService.js");
|
/* harmony import */ var _nextcloud_router__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @nextcloud/router */ "./node_modules/@nextcloud/router/dist/index.mjs");
|
||||||
/* harmony import */ var webdav__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! webdav */ "./node_modules/webdav/dist/web/index.js");
|
/* harmony import */ var _nextcloud_dialogs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @nextcloud/dialogs */ "./node_modules/@nextcloud/dialogs/dist/index.mjs");
|
||||||
|
/* harmony import */ var _utils_logger_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../utils/logger.js */ "./src/utils/logger.js");
|
||||||
|
/* harmony import */ var _services_attachmentService_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../services/attachmentService.js */ "./src/services/attachmentService.js");
|
||||||
|
/* harmony import */ var webdav__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! webdav */ "./node_modules/webdav/dist/web/index.js");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -7682,12 +7688,17 @@ __webpack_require__.r(__webpack_exports__);
|
|||||||
NcListItem: _nextcloud_vue__WEBPACK_IMPORTED_MODULE_0__.NcListItem,
|
NcListItem: _nextcloud_vue__WEBPACK_IMPORTED_MODULE_0__.NcListItem,
|
||||||
NcActions: _nextcloud_vue__WEBPACK_IMPORTED_MODULE_0__.NcActions,
|
NcActions: _nextcloud_vue__WEBPACK_IMPORTED_MODULE_0__.NcActions,
|
||||||
NcActionButton: _nextcloud_vue__WEBPACK_IMPORTED_MODULE_0__.NcActionButton,
|
NcActionButton: _nextcloud_vue__WEBPACK_IMPORTED_MODULE_0__.NcActionButton,
|
||||||
Upload: vue_material_design_icons_Upload_vue__WEBPACK_IMPORTED_MODULE_1__["default"],
|
Upload: vue_material_design_icons_Upload_vue__WEBPACK_IMPORTED_MODULE_2__["default"],
|
||||||
Close: vue_material_design_icons_Close_vue__WEBPACK_IMPORTED_MODULE_2__["default"],
|
Close: vue_material_design_icons_Close_vue__WEBPACK_IMPORTED_MODULE_3__["default"],
|
||||||
Folder: vue_material_design_icons_Folder_vue__WEBPACK_IMPORTED_MODULE_3__["default"],
|
Folder: vue_material_design_icons_Folder_vue__WEBPACK_IMPORTED_MODULE_4__["default"],
|
||||||
Paperclip: vue_material_design_icons_Paperclip_vue__WEBPACK_IMPORTED_MODULE_4__["default"],
|
Paperclip: vue_material_design_icons_Paperclip_vue__WEBPACK_IMPORTED_MODULE_5__["default"],
|
||||||
Plus: vue_material_design_icons_Plus_vue__WEBPACK_IMPORTED_MODULE_5__["default"],
|
Plus: vue_material_design_icons_Plus_vue__WEBPACK_IMPORTED_MODULE_6__["default"],
|
||||||
NcDialog: _nextcloud_vue__WEBPACK_IMPORTED_MODULE_0__.NcDialog
|
NcDialog: _nextcloud_vue__WEBPACK_IMPORTED_MODULE_0__.NcDialog,
|
||||||
|
NcModal: _nextcloud_vue__WEBPACK_IMPORTED_MODULE_0__.NcModal,
|
||||||
|
NcButton: _nextcloud_vue__WEBPACK_IMPORTED_MODULE_0__.NcButton,
|
||||||
|
Email: vue_material_design_icons_Email_vue__WEBPACK_IMPORTED_MODULE_7__["default"],
|
||||||
|
ArrowLeft: vue_material_design_icons_ArrowLeft_vue__WEBPACK_IMPORTED_MODULE_8__["default"],
|
||||||
|
NcAvatar: _nextcloud_vue__WEBPACK_IMPORTED_MODULE_0__.NcAvatar
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
calendarObjectInstance: {
|
calendarObjectInstance: {
|
||||||
@ -7704,7 +7715,13 @@ __webpack_require__.r(__webpack_exports__);
|
|||||||
uploading: false,
|
uploading: false,
|
||||||
showOpenConfirmation: false,
|
showOpenConfirmation: false,
|
||||||
openConfirmationMessage: '',
|
openConfirmationMessage: '',
|
||||||
openConfirmationButtons: []
|
openConfirmationButtons: [],
|
||||||
|
showModal: false,
|
||||||
|
showAttachmentsSection: false,
|
||||||
|
loadingDataEmailBox: false,
|
||||||
|
mailBoxData: [],
|
||||||
|
mailAttachments: [],
|
||||||
|
loadingText: 'Chargement ...'
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -7729,10 +7746,10 @@ __webpack_require__.r(__webpack_exports__);
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
async openFilesModal() {
|
async openFilesModal() {
|
||||||
const picker = (0,_nextcloud_dialogs__WEBPACK_IMPORTED_MODULE_7__.getFilePickerBuilder)(t('calendar', 'Choose a file to add as attachment')).setMultiSelect(false).allowDirectories(true).addButton({
|
const picker = (0,_nextcloud_dialogs__WEBPACK_IMPORTED_MODULE_10__.getFilePickerBuilder)(t('calendar', 'Choose a file to add as attachment')).setMultiSelect(false).allowDirectories(true).addButton({
|
||||||
label: t('calendar', 'Pick'),
|
label: t('calendar', 'Pick'),
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
callback: nodes => _utils_logger_js__WEBPACK_IMPORTED_MODULE_8__["default"].debug('Picked attachment', {
|
callback: nodes => _utils_logger_js__WEBPACK_IMPORTED_MODULE_11__["default"].debug('Picked attachment', {
|
||||||
nodes
|
nodes
|
||||||
})
|
})
|
||||||
}).build();
|
}).build();
|
||||||
@ -7741,11 +7758,11 @@ __webpack_require__.r(__webpack_exports__);
|
|||||||
if (!this.isDuplicateAttachment(filename)) {
|
if (!this.isDuplicateAttachment(filename)) {
|
||||||
var _davRes$multistatus;
|
var _davRes$multistatus;
|
||||||
// TODO do not share Move this to PHP
|
// TODO do not share Move this to PHP
|
||||||
const data = await (0,_services_attachmentService_js__WEBPACK_IMPORTED_MODULE_9__.getFileInfo)(filename, this.currentUser.dav.userId);
|
const data = await (0,_services_attachmentService_js__WEBPACK_IMPORTED_MODULE_12__.getFileInfo)(filename, this.currentUser.dav.userId);
|
||||||
const davRes = await (0,webdav__WEBPACK_IMPORTED_MODULE_10__.parseXML)(data);
|
const davRes = await (0,webdav__WEBPACK_IMPORTED_MODULE_13__.parseXML)(data);
|
||||||
const davRespObj = davRes === null || davRes === void 0 || (_davRes$multistatus = davRes.multistatus) === null || _davRes$multistatus === void 0 || (_davRes$multistatus = _davRes$multistatus.response[0]) === null || _davRes$multistatus === void 0 || (_davRes$multistatus = _davRes$multistatus.propstat) === null || _davRes$multistatus === void 0 ? void 0 : _davRes$multistatus.prop;
|
const davRespObj = davRes === null || davRes === void 0 || (_davRes$multistatus = davRes.multistatus) === null || _davRes$multistatus === void 0 || (_davRes$multistatus = _davRes$multistatus.response[0]) === null || _davRes$multistatus === void 0 || (_davRes$multistatus = _davRes$multistatus.propstat) === null || _davRes$multistatus === void 0 ? void 0 : _davRes$multistatus.prop;
|
||||||
davRespObj.fileName = filename;
|
davRespObj.fileName = filename;
|
||||||
davRespObj.url = (0,_nextcloud_router__WEBPACK_IMPORTED_MODULE_6__.generateUrl)("/f/".concat(davRespObj.fileid));
|
davRespObj.url = (0,_nextcloud_router__WEBPACK_IMPORTED_MODULE_9__.generateUrl)("/f/".concat(davRespObj.fileid));
|
||||||
davRespObj.value = davRespObj.url;
|
davRespObj.value = davRespObj.url;
|
||||||
this.addAttachmentWithProperty(this.calendarObjectInstance, davRespObj);
|
this.addAttachmentWithProperty(this.calendarObjectInstance, davRespObj);
|
||||||
}
|
}
|
||||||
@ -7754,7 +7771,7 @@ __webpack_require__.r(__webpack_exports__);
|
|||||||
isDuplicateAttachment(path) {
|
isDuplicateAttachment(path) {
|
||||||
return this.attachments.find(attachment => {
|
return this.attachments.find(attachment => {
|
||||||
if (attachment.fileName === path) {
|
if (attachment.fileName === path) {
|
||||||
(0,_nextcloud_dialogs__WEBPACK_IMPORTED_MODULE_7__.showError)(t('calendar', 'Attachment {name} already exist!', {
|
(0,_nextcloud_dialogs__WEBPACK_IMPORTED_MODULE_10__.showError)(t('calendar', 'Attachment {name} already exist!', {
|
||||||
name: this.getBaseName(path)
|
name: this.getBaseName(path)
|
||||||
}));
|
}));
|
||||||
return true;
|
return true;
|
||||||
@ -7768,24 +7785,24 @@ __webpack_require__.r(__webpack_exports__);
|
|||||||
async onLocalAttachmentSelected(e) {
|
async onLocalAttachmentSelected(e) {
|
||||||
try {
|
try {
|
||||||
const attachmentsFolder = await this.$store.dispatch('createAttachmentsFolder');
|
const attachmentsFolder = await this.$store.dispatch('createAttachmentsFolder');
|
||||||
const attachments = await (0,_services_attachmentService_js__WEBPACK_IMPORTED_MODULE_9__.uploadLocalAttachment)(attachmentsFolder, Array.from(e.target.files), this.currentUser.dav, this.attachments);
|
const attachments = await (0,_services_attachmentService_js__WEBPACK_IMPORTED_MODULE_12__.uploadLocalAttachment)(attachmentsFolder, Array.from(e.target.files), this.currentUser.dav);
|
||||||
// TODO do not share file, move to PHP
|
// TODO do not share file, move to PHP
|
||||||
attachments.map(async attachment => {
|
attachments.map(async attachment => {
|
||||||
var _davRes$multistatus2;
|
var _davRes$multistatus2;
|
||||||
const data = await (0,_services_attachmentService_js__WEBPACK_IMPORTED_MODULE_9__.getFileInfo)("".concat(attachmentsFolder, "/").concat(attachment.path), this.currentUser.dav.userId);
|
const data = await (0,_services_attachmentService_js__WEBPACK_IMPORTED_MODULE_12__.getFileInfo)("".concat(attachmentsFolder, "/").concat(attachment.path), this.currentUser.dav.userId);
|
||||||
const davRes = await (0,webdav__WEBPACK_IMPORTED_MODULE_10__.parseXML)(data);
|
const davRes = await (0,webdav__WEBPACK_IMPORTED_MODULE_13__.parseXML)(data);
|
||||||
const davRespObj = davRes === null || davRes === void 0 || (_davRes$multistatus2 = davRes.multistatus) === null || _davRes$multistatus2 === void 0 || (_davRes$multistatus2 = _davRes$multistatus2.response[0]) === null || _davRes$multistatus2 === void 0 || (_davRes$multistatus2 = _davRes$multistatus2.propstat) === null || _davRes$multistatus2 === void 0 ? void 0 : _davRes$multistatus2.prop;
|
const davRespObj = davRes === null || davRes === void 0 || (_davRes$multistatus2 = davRes.multistatus) === null || _davRes$multistatus2 === void 0 || (_davRes$multistatus2 = _davRes$multistatus2.response[0]) === null || _davRes$multistatus2 === void 0 || (_davRes$multistatus2 = _davRes$multistatus2.propstat) === null || _davRes$multistatus2 === void 0 ? void 0 : _davRes$multistatus2.prop;
|
||||||
davRespObj.fileName = attachment.path;
|
davRespObj.fileName = attachment.path;
|
||||||
davRespObj.url = (0,_nextcloud_router__WEBPACK_IMPORTED_MODULE_6__.generateUrl)("/f/".concat(davRespObj.fileid));
|
davRespObj.url = (0,_nextcloud_router__WEBPACK_IMPORTED_MODULE_9__.generateUrl)("/f/".concat(davRespObj.fileid));
|
||||||
davRespObj.value = davRespObj.url;
|
davRespObj.value = davRespObj.url;
|
||||||
this.addAttachmentWithProperty(this.calendarObjectInstance, davRespObj);
|
this.addAttachmentWithProperty(this.calendarObjectInstance, davRespObj);
|
||||||
});
|
});
|
||||||
e.target.value = '';
|
e.target.value = '';
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
_utils_logger_js__WEBPACK_IMPORTED_MODULE_8__["default"].error('Could not upload attachment(s)', {
|
_utils_logger_js__WEBPACK_IMPORTED_MODULE_11__["default"].error('Could not upload attachment(s)', {
|
||||||
error
|
error
|
||||||
});
|
});
|
||||||
(0,_nextcloud_dialogs__WEBPACK_IMPORTED_MODULE_7__.showError)(t('calendar', 'Could not upload attachment(s)'));
|
(0,_nextcloud_dialogs__WEBPACK_IMPORTED_MODULE_10__.showError)(t('calendar', 'Could not upload attachment(s)'));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getIcon(mime) {
|
getIcon(mime) {
|
||||||
@ -7793,7 +7810,7 @@ __webpack_require__.r(__webpack_exports__);
|
|||||||
},
|
},
|
||||||
getPreview(attachment) {
|
getPreview(attachment) {
|
||||||
if (attachment.xNcHasPreview) {
|
if (attachment.xNcHasPreview) {
|
||||||
return (0,_nextcloud_router__WEBPACK_IMPORTED_MODULE_6__.generateUrl)("/core/preview?fileId=".concat(attachment.xNcFileId, "&x=100&y=100&a=0"));
|
return (0,_nextcloud_router__WEBPACK_IMPORTED_MODULE_9__.generateUrl)("/core/preview?fileId=".concat(attachment.xNcFileId, "&x=100&y=100&a=0"));
|
||||||
}
|
}
|
||||||
return attachment.formatType ? OC.MimeType.getIconUrl(attachment.formatType) : OC.MimeType.getIconUrl('folder');
|
return attachment.formatType ? OC.MimeType.getIconUrl(attachment.formatType) : OC.MimeType.getIconUrl('folder');
|
||||||
},
|
},
|
||||||
@ -7803,14 +7820,14 @@ __webpack_require__.r(__webpack_exports__);
|
|||||||
openFile(rawUrl) {
|
openFile(rawUrl) {
|
||||||
let url;
|
let url;
|
||||||
try {
|
try {
|
||||||
url = new URL(rawUrl, (0,_nextcloud_router__WEBPACK_IMPORTED_MODULE_6__.getBaseUrl)());
|
url = new URL(rawUrl, (0,_nextcloud_router__WEBPACK_IMPORTED_MODULE_9__.getBaseUrl)());
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
_utils_logger_js__WEBPACK_IMPORTED_MODULE_8__["default"].error("Refusing to open invalid URL: ".concat(rawUrl), {
|
_utils_logger_js__WEBPACK_IMPORTED_MODULE_11__["default"].error("Refusing to open invalid URL: ".concat(rawUrl), {
|
||||||
error
|
error
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const baseUrl = new URL((0,_nextcloud_router__WEBPACK_IMPORTED_MODULE_6__.getBaseUrl)());
|
const baseUrl = new URL((0,_nextcloud_router__WEBPACK_IMPORTED_MODULE_9__.getBaseUrl)());
|
||||||
if (url.href.startsWith(baseUrl.href)) {
|
if (url.href.startsWith(baseUrl.href)) {
|
||||||
// URL belongs to this instance and is safe
|
// URL belongs to this instance and is safe
|
||||||
window.open(url.href, '_blank', 'noopener noreferrer');
|
window.open(url.href, '_blank', 'noopener noreferrer');
|
||||||
@ -7835,6 +7852,106 @@ __webpack_require__.r(__webpack_exports__);
|
|||||||
}
|
}
|
||||||
}];
|
}];
|
||||||
this.showOpenConfirmation = true;
|
this.showOpenConfirmation = true;
|
||||||
|
},
|
||||||
|
async openEmailBoxModal() {
|
||||||
|
this.loadingText = 'Chargement des emails ...';
|
||||||
|
this.showModal = true;
|
||||||
|
this.loadingDataEmailBox = true;
|
||||||
|
await this.loadEmailsBox();
|
||||||
|
this.loadingDataEmailBox = false;
|
||||||
|
},
|
||||||
|
async getAttachments(mail) {
|
||||||
|
this.loadingText = 'Chargement des attachements ...';
|
||||||
|
this.loadingDataEmailBox = true;
|
||||||
|
this.showAttachmentsSection = true;
|
||||||
|
this.mailAttachments = [];
|
||||||
|
await this.loadAttachments(mail);
|
||||||
|
this.loadingDataEmailBox = false;
|
||||||
|
},
|
||||||
|
async pickEmailAttachement(attachement) {
|
||||||
|
this.loadingText = 'Ajout de l\'attachement encours ...';
|
||||||
|
this.loadingDataEmailBox = true;
|
||||||
|
await this.pickEmailAttachementTodavFile(attachement);
|
||||||
|
this.closeMailBoxModal();
|
||||||
|
this.resetMailBoxModal();
|
||||||
|
},
|
||||||
|
resetMailBoxModal() {
|
||||||
|
this.mailBoxData = [];
|
||||||
|
this.mailAttachments = [];
|
||||||
|
this.showModal = false;
|
||||||
|
this.showAttachmentsSection = false;
|
||||||
|
this.loadingDataEmailBox = false;
|
||||||
|
this.loadingText = 'Chargement ...';
|
||||||
|
},
|
||||||
|
displayAttachmentsSection() {
|
||||||
|
this.showAttachmentsSection = false;
|
||||||
|
this.loadingDataEmailBox = false;
|
||||||
|
},
|
||||||
|
closeMailBoxModal() {
|
||||||
|
this.showModal = false;
|
||||||
|
this.showAttachmentsSection = false;
|
||||||
|
this.loadingDataEmailBox = false;
|
||||||
|
this.loadingText = 'Chargement ...';
|
||||||
|
},
|
||||||
|
async loadEmailsBox() {
|
||||||
|
let withSync = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
||||||
|
const ajaxUrl = (0,_nextcloud_router__WEBPACK_IMPORTED_MODULE_9__.generateUrl)('/apps/calendar/load-email-box');
|
||||||
|
await _nextcloud_axios__WEBPACK_IMPORTED_MODULE_1__["default"].get(ajaxUrl, {
|
||||||
|
params: {
|
||||||
|
withSync
|
||||||
|
}
|
||||||
|
}).then(response => {
|
||||||
|
this.mailBoxData = response.data;
|
||||||
|
}).catch(error => {
|
||||||
|
console.log(error);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
async loadAttachments(mail) {
|
||||||
|
//TODO
|
||||||
|
// if (!this.hasAttachements(mail)) {
|
||||||
|
// this.mailAttachments = [] ;
|
||||||
|
// this.loadingDataEmailBox = false
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
const ajaxUrl = (0,_nextcloud_router__WEBPACK_IMPORTED_MODULE_9__.generateUrl)('/apps/calendar/load-email-attachement/' + mail.databaseId);
|
||||||
|
await _nextcloud_axios__WEBPACK_IMPORTED_MODULE_1__["default"].get(ajaxUrl).then(response => {
|
||||||
|
console.log(response.data);
|
||||||
|
this.mailAttachments = response.data.attachments;
|
||||||
|
}).catch(error => {
|
||||||
|
console.log(error);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
async pickEmailAttachementTodavFile(attachement) {
|
||||||
|
var _davRes$multistatus3;
|
||||||
|
const attachmentsFolder = await this.$store.dispatch('createAttachmentsFolder');
|
||||||
|
const attachment = await (0,_services_attachmentService_js__WEBPACK_IMPORTED_MODULE_12__.uploadRemoteFile)(attachmentsFolder, attachement.downloadUrl, attachement.fileName, this.currentUser.dav);
|
||||||
|
// TODO do not share file, move to PHP
|
||||||
|
const data = await (0,_services_attachmentService_js__WEBPACK_IMPORTED_MODULE_12__.getFileInfo)("".concat(attachmentsFolder, "/").concat(attachment.path), this.currentUser.dav.userId);
|
||||||
|
const davRes = await (0,webdav__WEBPACK_IMPORTED_MODULE_13__.parseXML)(data);
|
||||||
|
const davRespObj = davRes === null || davRes === void 0 || (_davRes$multistatus3 = davRes.multistatus) === null || _davRes$multistatus3 === void 0 || (_davRes$multistatus3 = _davRes$multistatus3.response[0]) === null || _davRes$multistatus3 === void 0 || (_davRes$multistatus3 = _davRes$multistatus3.propstat) === null || _davRes$multistatus3 === void 0 ? void 0 : _davRes$multistatus3.prop;
|
||||||
|
davRespObj.fileName = attachment.path;
|
||||||
|
davRespObj.url = (0,_nextcloud_router__WEBPACK_IMPORTED_MODULE_9__.generateUrl)("/f/".concat(davRespObj.fileid));
|
||||||
|
davRespObj.value = davRespObj.url;
|
||||||
|
this.addAttachmentWithProperty(this.calendarObjectInstance, davRespObj);
|
||||||
|
},
|
||||||
|
getLabelEmailBox() {
|
||||||
|
let from = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
||||||
|
if (from.length) {
|
||||||
|
var _from$0$label;
|
||||||
|
return (_from$0$label = from[0].label) !== null && _from$0$label !== void 0 ? _from$0$label : from[0].email;
|
||||||
|
}
|
||||||
|
return '';
|
||||||
|
},
|
||||||
|
getSubstringText() {
|
||||||
|
let text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
||||||
|
let length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 20;
|
||||||
|
if (text.length < length) {
|
||||||
|
return text;
|
||||||
|
}
|
||||||
|
return text.substring(0, length) + '...';
|
||||||
|
},
|
||||||
|
hasAttachements(mail) {
|
||||||
|
return mail.flags.hasAttachments;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -18225,7 +18342,22 @@ var render = function render() {
|
|||||||
},
|
},
|
||||||
proxy: true
|
proxy: true
|
||||||
}], null, false, 1329850251)
|
}], null, false, 1329850251)
|
||||||
}, [_vm._v("\n\t\t\t\t" + _vm._s(_vm.t("calendar", "Upload from device")) + "\n\t\t\t")])], 1) : _vm._e()], 1), _vm._v(" "), _vm.attachments.length > 0 ? _c("div", [_c("ul", {
|
}, [_vm._v("\n\t\t\t\t" + _vm._s(_vm.t("calendar", "Upload from device")) + "\n\t\t\t")]), _vm._v(" "), _c("NcActionButton", {
|
||||||
|
on: {
|
||||||
|
click: _vm.openEmailBoxModal
|
||||||
|
},
|
||||||
|
scopedSlots: _vm._u([{
|
||||||
|
key: "icon",
|
||||||
|
fn: function () {
|
||||||
|
return [_c("Email", {
|
||||||
|
attrs: {
|
||||||
|
size: 20
|
||||||
|
}
|
||||||
|
})];
|
||||||
|
},
|
||||||
|
proxy: true
|
||||||
|
}], null, false, 1680463460)
|
||||||
|
}, [_vm._v("\n\t\t\t\t" + _vm._s(_vm.t("calendar", "Depuis un email")) + "\n\t\t\t")])], 1) : _vm._e()], 1), _vm._v(" "), _vm.attachments.length > 0 ? _c("div", [_c("ul", {
|
||||||
staticClass: "attachments-list"
|
staticClass: "attachments-list"
|
||||||
}, _vm._l(_vm.attachments, function (attachment) {
|
}, _vm._l(_vm.attachments, function (attachment) {
|
||||||
return _c("NcListItem", {
|
return _c("NcListItem", {
|
||||||
@ -18289,7 +18421,89 @@ var render = function render() {
|
|||||||
}
|
}
|
||||||
}, [_c("p", {
|
}, [_c("p", {
|
||||||
staticClass: "external-link-message"
|
staticClass: "external-link-message"
|
||||||
}, [_vm._v("\n\t\t\t" + _vm._s(_vm.openConfirmationMessage) + "\n\t\t")])])], 1);
|
}, [_vm._v("\n\t\t\t" + _vm._s(_vm.openConfirmationMessage) + "\n\t\t")])]), _vm._v(" "), _vm.showModal ? _c("NcModal", {
|
||||||
|
attrs: {
|
||||||
|
name: ""
|
||||||
|
},
|
||||||
|
on: {
|
||||||
|
close: _vm.resetMailBoxModal
|
||||||
|
}
|
||||||
|
}, [!_vm.showAttachmentsSection && !_vm.showAttachmentsSection ? _c("div", {
|
||||||
|
staticClass: "modal__content"
|
||||||
|
}, [_c("ul", [_vm._l(_vm.mailBoxData, function (mail) {
|
||||||
|
return _vm.mailBoxData.length > 0 ? [_c("NcListItem", {
|
||||||
|
attrs: {
|
||||||
|
name: _vm.getLabelEmailBox(mail.from) + " : " + _vm.getSubstringText(mail.subject, 30),
|
||||||
|
bold: false,
|
||||||
|
counterType: "outlined"
|
||||||
|
},
|
||||||
|
on: {
|
||||||
|
click: function ($event) {
|
||||||
|
return _vm.getAttachments(mail);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
scopedSlots: _vm._u([{
|
||||||
|
key: "subname",
|
||||||
|
fn: function () {
|
||||||
|
return [_vm._v("\n\t\t\t\t\t\t\t " + _vm._s(_vm.getSubstringText(mail.previewText, 50)) + " \n\t\t\t\t\t\t")];
|
||||||
|
},
|
||||||
|
proxy: true
|
||||||
|
}, _vm.hasAttachements(mail) ? {
|
||||||
|
key: "icon",
|
||||||
|
fn: function () {
|
||||||
|
return [_c("Paperclip", {
|
||||||
|
attrs: {
|
||||||
|
size: 20
|
||||||
|
}
|
||||||
|
})];
|
||||||
|
},
|
||||||
|
proxy: true
|
||||||
|
} : null], null, true)
|
||||||
|
})] : _vm._e();
|
||||||
|
})], 2)]) : _vm._e(), _vm._v(" "), _vm.showAttachmentsSection ? _c("div", {
|
||||||
|
staticClass: "modal__content__attachments"
|
||||||
|
}, [_c("ul", {
|
||||||
|
staticClass: "attachments-list"
|
||||||
|
}, [_c("NcActionButton", {
|
||||||
|
on: {
|
||||||
|
click: function ($event) {
|
||||||
|
return _vm.displayAttachmentsSection();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
scopedSlots: _vm._u([{
|
||||||
|
key: "icon",
|
||||||
|
fn: function () {
|
||||||
|
return [_c("ArrowLeft", {
|
||||||
|
attrs: {
|
||||||
|
size: 20
|
||||||
|
}
|
||||||
|
})];
|
||||||
|
},
|
||||||
|
proxy: true
|
||||||
|
}], null, false, 1821202730)
|
||||||
|
}, [_vm._v("\n\t\t\t\t\tRevenir dans la listes des emails\n\t\t\t\t")]), _vm._v(" "), _vm._l(_vm.mailAttachments, function (attachment) {
|
||||||
|
return !_vm.loadingDataEmailBox && _vm.mailAttachments.length > 0 ? _c("div", {
|
||||||
|
staticClass: "image-list-attachement"
|
||||||
|
}, [_c("div", {
|
||||||
|
staticClass: "image-item-attachement",
|
||||||
|
on: {
|
||||||
|
click: function ($event) {
|
||||||
|
return _vm.pickEmailAttachement(attachment);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, [_c("img", {
|
||||||
|
attrs: {
|
||||||
|
src: attachment.downloadUrl,
|
||||||
|
alt: attachment.fileName
|
||||||
|
}
|
||||||
|
}), _vm._v(" "), _c("label", [_vm._v(_vm._s(attachment.fileName))])])]) : _vm._e();
|
||||||
|
}), _vm._v(" "), !_vm.mailAttachments.length && !_vm.loadingDataEmailBox ? [_c("p", [_vm._v(" Pas d'Attachements")])] : _vm._e()], 2)]) : _vm._e(), _vm._v(" "), _vm.loadingDataEmailBox ? _c("div", {
|
||||||
|
staticClass: "modal__content"
|
||||||
|
}, [_c("p", {
|
||||||
|
staticStyle: {
|
||||||
|
"text-align": "center"
|
||||||
|
}
|
||||||
|
}, [_vm._v(" " + _vm._s(_vm.loadingText))])]) : _vm._e()]) : _vm._e()], 1);
|
||||||
};
|
};
|
||||||
var staticRenderFns = [];
|
var staticRenderFns = [];
|
||||||
render._withStripped = true;
|
render._withStripped = true;
|
||||||
@ -29064,7 +29278,8 @@ __webpack_require__.r(__webpack_exports__);
|
|||||||
/* harmony export */ getFileInfo: () => (/* binding */ getFileInfo),
|
/* harmony export */ getFileInfo: () => (/* binding */ getFileInfo),
|
||||||
/* harmony export */ shareFile: () => (/* binding */ shareFile),
|
/* harmony export */ shareFile: () => (/* binding */ shareFile),
|
||||||
/* harmony export */ shareFileWith: () => (/* binding */ shareFileWith),
|
/* harmony export */ shareFileWith: () => (/* binding */ shareFileWith),
|
||||||
/* harmony export */ uploadLocalAttachment: () => (/* binding */ uploadLocalAttachment)
|
/* harmony export */ uploadLocalAttachment: () => (/* binding */ uploadLocalAttachment),
|
||||||
|
/* harmony export */ uploadRemoteFile: () => (/* binding */ uploadRemoteFile)
|
||||||
/* harmony export */ });
|
/* harmony export */ });
|
||||||
/* harmony import */ var _nextcloud_axios__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @nextcloud/axios */ "./node_modules/@nextcloud/axios/dist/index.es.mjs");
|
/* harmony import */ var _nextcloud_axios__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @nextcloud/axios */ "./node_modules/@nextcloud/axios/dist/index.es.mjs");
|
||||||
/* harmony import */ var _nextcloud_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @nextcloud/router */ "./node_modules/@nextcloud/router/dist/index.mjs");
|
/* harmony import */ var _nextcloud_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @nextcloud/router */ "./node_modules/@nextcloud/router/dist/index.mjs");
|
||||||
@ -29238,7 +29453,39 @@ const uploadLocalAttachment = async function (folder, files, dav, componentAttac
|
|||||||
await Promise.all(promises);
|
await Promise.all(promises);
|
||||||
return attachments;
|
return attachments;
|
||||||
};
|
};
|
||||||
|
const uploadRemoteFile = async function (folder, fileUrl, fileName, dav) {
|
||||||
|
try {
|
||||||
|
// Télécharger le fichier distant
|
||||||
|
const response = await _nextcloud_axios__WEBPACK_IMPORTED_MODULE_0__["default"].get(fileUrl, {
|
||||||
|
responseType: 'blob'
|
||||||
|
});
|
||||||
|
|
||||||
|
// Envoyer le fichier récupéré en PUT vers WebDAV
|
||||||
|
const url = (0,_nextcloud_router__WEBPACK_IMPORTED_MODULE_1__.generateRemoteUrl)("dav/files/".concat(dav.userId, "/").concat(folder, "/").concat(fileName));
|
||||||
|
const uploadResponse = await _nextcloud_axios__WEBPACK_IMPORTED_MODULE_0__["default"].put(url, response.data, {
|
||||||
|
headers: {
|
||||||
|
'Content-Type': response.data.type // Utilise le type MIME du fichier
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (uploadResponse.status === 204 || uploadResponse.status === 201) {
|
||||||
|
(0,_nextcloud_dialogs__WEBPACK_IMPORTED_MODULE_2__.showSuccess)((0,_nextcloud_l10n__WEBPACK_IMPORTED_MODULE_3__.translate)('calendar', 'Attachment {fileName} added!', {
|
||||||
|
fileName: fileName
|
||||||
|
}));
|
||||||
|
return {
|
||||||
|
fileName: fileName,
|
||||||
|
formatType: response.data.type,
|
||||||
|
uri: url,
|
||||||
|
value: url,
|
||||||
|
path: "/".concat(fileName)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
(0,_nextcloud_dialogs__WEBPACK_IMPORTED_MODULE_2__.showError)((0,_nextcloud_l10n__WEBPACK_IMPORTED_MODULE_3__.translate)('calendar', 'An error occurred during uploading file {fileName}', {
|
||||||
|
fileName: fileName
|
||||||
|
}));
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
};
|
||||||
// TODO is shared or not @share-types@
|
// TODO is shared or not @share-types@
|
||||||
const getFileInfo = async function (path, userId) {
|
const getFileInfo = async function (path, userId) {
|
||||||
const url = (0,_nextcloud_router__WEBPACK_IMPORTED_MODULE_1__.generateRemoteUrl)("dav/files/".concat(userId, "/").concat(path));
|
const url = (0,_nextcloud_router__WEBPACK_IMPORTED_MODULE_1__.generateRemoteUrl)("dav/files/".concat(userId, "/").concat(path));
|
||||||
@ -56149,7 +56396,8 @@ __webpack_require__.r(__webpack_exports__);
|
|||||||
|
|
||||||
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
|
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
|
||||||
// Module
|
// Module
|
||||||
___CSS_LOADER_EXPORT___.push([module.id, `.attachments-input[data-v-5efccc46] {
|
___CSS_LOADER_EXPORT___.push([module.id, `@charset "UTF-8";
|
||||||
|
.attachments-input[data-v-5efccc46] {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
.attachments-summary[data-v-5efccc46] {
|
.attachments-summary[data-v-5efccc46] {
|
||||||
@ -56206,6 +56454,35 @@ ___CSS_LOADER_EXPORT___.push([module.id, `.attachments-input[data-v-5efccc46] {
|
|||||||
}
|
}
|
||||||
.external-link-message[data-v-5efccc46] {
|
.external-link-message[data-v-5efccc46] {
|
||||||
overflow-wrap: break-word;
|
overflow-wrap: break-word;
|
||||||
|
}
|
||||||
|
.modal__content[data-v-5efccc46] {
|
||||||
|
margin: 10px;
|
||||||
|
}
|
||||||
|
.modal__content__attachments[data-v-5efccc46] {
|
||||||
|
margin: 10px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.attachments-list[data-v-5efccc46] {
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
.image-list-attachement[data-v-5efccc46] {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-start;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
.image-item-attachement[data-v-5efccc46] {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin: 10px 0;
|
||||||
|
}
|
||||||
|
.image-item-attachement img[data-v-5efccc46] {
|
||||||
|
width: 100px; /* Largeur de l'image */
|
||||||
|
height: auto; /* Hauteur automatique pour garder le ratio */
|
||||||
|
margin-right: 10px; /* Espace entre l'image et la légende */
|
||||||
|
}
|
||||||
|
label[data-v-5efccc46] {
|
||||||
|
font-size: 16px; /* Taille de police pour la légende */
|
||||||
}`, ""]);
|
}`, ""]);
|
||||||
// Exports
|
// Exports
|
||||||
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
||||||
@ -130541,6 +130818,78 @@ __webpack_require__.r(__webpack_exports__);
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "./node_modules/vue-material-design-icons/ArrowLeft.vue":
|
||||||
|
/*!**************************************************************!*\
|
||||||
|
!*** ./node_modules/vue-material-design-icons/ArrowLeft.vue ***!
|
||||||
|
\**************************************************************/
|
||||||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||||
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
||||||
|
/* harmony export */ });
|
||||||
|
/* harmony import */ var _ArrowLeft_vue_vue_type_template_id_b9ea0198__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ArrowLeft.vue?vue&type=template&id=b9ea0198 */ "./node_modules/vue-material-design-icons/ArrowLeft.vue?vue&type=template&id=b9ea0198");
|
||||||
|
/* harmony import */ var _ArrowLeft_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ArrowLeft.vue?vue&type=script&lang=js */ "./node_modules/vue-material-design-icons/ArrowLeft.vue?vue&type=script&lang=js");
|
||||||
|
/* harmony import */ var _vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../vue-loader/lib/runtime/componentNormalizer.js */ "./node_modules/vue-loader/lib/runtime/componentNormalizer.js");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* normalize component */
|
||||||
|
;
|
||||||
|
var component = (0,_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__["default"])(
|
||||||
|
_ArrowLeft_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"],
|
||||||
|
_ArrowLeft_vue_vue_type_template_id_b9ea0198__WEBPACK_IMPORTED_MODULE_0__.render,
|
||||||
|
_ArrowLeft_vue_vue_type_template_id_b9ea0198__WEBPACK_IMPORTED_MODULE_0__.staticRenderFns,
|
||||||
|
false,
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
null
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
/* hot reload */
|
||||||
|
if (false) { var api; }
|
||||||
|
component.options.__file = "node_modules/vue-material-design-icons/ArrowLeft.vue"
|
||||||
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (component.exports);
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "./node_modules/vue-loader/lib/index.js??vue-loader-options!./node_modules/vue-material-design-icons/ArrowLeft.vue?vue&type=script&lang=js":
|
||||||
|
/*!*************************************************************************************************************************************************!*\
|
||||||
|
!*** ./node_modules/vue-loader/lib/index.js??vue-loader-options!./node_modules/vue-material-design-icons/ArrowLeft.vue?vue&type=script&lang=js ***!
|
||||||
|
\*************************************************************************************************************************************************/
|
||||||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||||
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
||||||
|
/* harmony export */ });
|
||||||
|
|
||||||
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
||||||
|
name: "ArrowLeftIcon",
|
||||||
|
emits: ['click'],
|
||||||
|
props: {
|
||||||
|
title: {
|
||||||
|
type: String,
|
||||||
|
},
|
||||||
|
fillColor: {
|
||||||
|
type: String,
|
||||||
|
default: "currentColor"
|
||||||
|
},
|
||||||
|
size: {
|
||||||
|
type: Number,
|
||||||
|
default: 24
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ "./node_modules/vue-material-design-icons/ArrowRightDropCircle.vue":
|
/***/ "./node_modules/vue-material-design-icons/ArrowRightDropCircle.vue":
|
||||||
@ -141323,6 +141672,22 @@ __webpack_require__.r(__webpack_exports__);
|
|||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "./node_modules/vue-material-design-icons/ArrowLeft.vue?vue&type=script&lang=js":
|
||||||
|
/*!**************************************************************************************!*\
|
||||||
|
!*** ./node_modules/vue-material-design-icons/ArrowLeft.vue?vue&type=script&lang=js ***!
|
||||||
|
\**************************************************************************************/
|
||||||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||||
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
||||||
|
/* harmony export */ });
|
||||||
|
/* harmony import */ var _vue_loader_lib_index_js_vue_loader_options_ArrowLeft_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../vue-loader/lib/index.js??vue-loader-options!./ArrowLeft.vue?vue&type=script&lang=js */ "./node_modules/vue-loader/lib/index.js??vue-loader-options!./node_modules/vue-material-design-icons/ArrowLeft.vue?vue&type=script&lang=js");
|
||||||
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_vue_loader_lib_index_js_vue_loader_options_ArrowLeft_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__["default"]);
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
/***/ "./node_modules/vue-material-design-icons/ArrowRightDropCircle.vue?vue&type=script&lang=js":
|
/***/ "./node_modules/vue-material-design-icons/ArrowRightDropCircle.vue?vue&type=script&lang=js":
|
||||||
/*!*************************************************************************************************!*\
|
/*!*************************************************************************************************!*\
|
||||||
!*** ./node_modules/vue-material-design-icons/ArrowRightDropCircle.vue?vue&type=script&lang=js ***!
|
!*** ./node_modules/vue-material-design-icons/ArrowRightDropCircle.vue?vue&type=script&lang=js ***!
|
||||||
@ -142155,6 +142520,23 @@ __webpack_require__.r(__webpack_exports__);
|
|||||||
/* harmony import */ var _vue_loader_lib_loaders_templateLoader_js_ruleSet_1_rules_3_vue_loader_lib_index_js_vue_loader_options_AlertCircle_vue_vue_type_template_id_7b52a7d0__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!../vue-loader/lib/index.js??vue-loader-options!./AlertCircle.vue?vue&type=template&id=7b52a7d0 */ "./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./node_modules/vue-material-design-icons/AlertCircle.vue?vue&type=template&id=7b52a7d0");
|
/* harmony import */ var _vue_loader_lib_loaders_templateLoader_js_ruleSet_1_rules_3_vue_loader_lib_index_js_vue_loader_options_AlertCircle_vue_vue_type_template_id_7b52a7d0__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!../vue-loader/lib/index.js??vue-loader-options!./AlertCircle.vue?vue&type=template&id=7b52a7d0 */ "./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./node_modules/vue-material-design-icons/AlertCircle.vue?vue&type=template&id=7b52a7d0");
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "./node_modules/vue-material-design-icons/ArrowLeft.vue?vue&type=template&id=b9ea0198":
|
||||||
|
/*!********************************************************************************************!*\
|
||||||
|
!*** ./node_modules/vue-material-design-icons/ArrowLeft.vue?vue&type=template&id=b9ea0198 ***!
|
||||||
|
\********************************************************************************************/
|
||||||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||||
|
/* harmony export */ render: () => (/* reexport safe */ _vue_loader_lib_loaders_templateLoader_js_ruleSet_1_rules_3_vue_loader_lib_index_js_vue_loader_options_ArrowLeft_vue_vue_type_template_id_b9ea0198__WEBPACK_IMPORTED_MODULE_0__.render),
|
||||||
|
/* harmony export */ staticRenderFns: () => (/* reexport safe */ _vue_loader_lib_loaders_templateLoader_js_ruleSet_1_rules_3_vue_loader_lib_index_js_vue_loader_options_ArrowLeft_vue_vue_type_template_id_b9ea0198__WEBPACK_IMPORTED_MODULE_0__.staticRenderFns)
|
||||||
|
/* harmony export */ });
|
||||||
|
/* harmony import */ var _vue_loader_lib_loaders_templateLoader_js_ruleSet_1_rules_3_vue_loader_lib_index_js_vue_loader_options_ArrowLeft_vue_vue_type_template_id_b9ea0198__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!../vue-loader/lib/index.js??vue-loader-options!./ArrowLeft.vue?vue&type=template&id=b9ea0198 */ "./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./node_modules/vue-material-design-icons/ArrowLeft.vue?vue&type=template&id=b9ea0198");
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ "./node_modules/vue-material-design-icons/ArrowRightDropCircle.vue?vue&type=template&id=674c29be":
|
/***/ "./node_modules/vue-material-design-icons/ArrowRightDropCircle.vue?vue&type=template&id=674c29be":
|
||||||
@ -143823,6 +144205,75 @@ render._withStripped = true
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./node_modules/vue-material-design-icons/ArrowLeft.vue?vue&type=template&id=b9ea0198":
|
||||||
|
/*!************************************************************************************************************************************************************************************************************************************!*\
|
||||||
|
!*** ./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./node_modules/vue-material-design-icons/ArrowLeft.vue?vue&type=template&id=b9ea0198 ***!
|
||||||
|
\************************************************************************************************************************************************************************************************************************************/
|
||||||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||||
|
/* harmony export */ render: () => (/* binding */ render),
|
||||||
|
/* harmony export */ staticRenderFns: () => (/* binding */ staticRenderFns)
|
||||||
|
/* harmony export */ });
|
||||||
|
var render = function render() {
|
||||||
|
var _vm = this,
|
||||||
|
_c = _vm._self._c
|
||||||
|
return _c(
|
||||||
|
"span",
|
||||||
|
_vm._b(
|
||||||
|
{
|
||||||
|
staticClass: "material-design-icon arrow-left-icon",
|
||||||
|
attrs: {
|
||||||
|
"aria-hidden": _vm.title ? null : true,
|
||||||
|
"aria-label": _vm.title,
|
||||||
|
role: "img",
|
||||||
|
},
|
||||||
|
on: {
|
||||||
|
click: function ($event) {
|
||||||
|
return _vm.$emit("click", $event)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"span",
|
||||||
|
_vm.$attrs,
|
||||||
|
false
|
||||||
|
),
|
||||||
|
[
|
||||||
|
_c(
|
||||||
|
"svg",
|
||||||
|
{
|
||||||
|
staticClass: "material-design-icon__svg",
|
||||||
|
attrs: {
|
||||||
|
fill: _vm.fillColor,
|
||||||
|
width: _vm.size,
|
||||||
|
height: _vm.size,
|
||||||
|
viewBox: "0 0 24 24",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
[
|
||||||
|
_c(
|
||||||
|
"path",
|
||||||
|
{
|
||||||
|
attrs: {
|
||||||
|
d: "M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
[_vm.title ? _c("title", [_vm._v(_vm._s(_vm.title))]) : _vm._e()]
|
||||||
|
),
|
||||||
|
]
|
||||||
|
),
|
||||||
|
]
|
||||||
|
)
|
||||||
|
}
|
||||||
|
var staticRenderFns = []
|
||||||
|
render._withStripped = true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ "./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./node_modules/vue-material-design-icons/ArrowRightDropCircle.vue?vue&type=template&id=674c29be":
|
/***/ "./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./node_modules/vue-material-design-icons/ArrowRightDropCircle.vue?vue&type=template&id=674c29be":
|
||||||
@ -310204,4 +310655,4 @@ appointmentsConfigsStore.addInitialConfigs((0,_nextcloud_initial_state__WEBPACK_
|
|||||||
|
|
||||||
/******/ })()
|
/******/ })()
|
||||||
;
|
;
|
||||||
//# sourceMappingURL=calendar-main.js.map?v=e2db448fb505c0b97453
|
//# sourceMappingURL=calendar-main.js.map?v=410f05104d20a2faec06
|
||||||
File diff suppressed because one or more lines are too long
@ -8865,7 +8865,7 @@ window._registerCustomPickerElement = _;
|
|||||||
/******/ // This function allow to reference async chunks
|
/******/ // This function allow to reference async chunks
|
||||||
/******/ __webpack_require__.u = (chunkId) => {
|
/******/ __webpack_require__.u = (chunkId) => {
|
||||||
/******/ // return url for filenames based on template
|
/******/ // return url for filenames based on template
|
||||||
/******/ return "calendar-" + chunkId + ".js?v=" + {"vendors-node_modules_vue_dist_vue_runtime_esm_js":"7e3171593bdc0f62040b","vendors-node_modules_nextcloud_capabilities_dist_index_js-node_modules_nextcloud_vue-select_d-877981":"741d92f5ec54d0c1ff41","vendors-node_modules_nextcloud_cdav-library_dist_dist_js-node_modules_nextcloud_logger_dist_i-36c16b":"c3b3db23da041c717fc1","vendors-node_modules_vue-material-design-icons_CalendarBlank_vue-node_modules_vue-material-de-e2c1f8":"0658eb6db50a09dd2afe","vendors-node_modules_vue-material-design-icons_CalendarBlankOutline_vue-node_modules_nextclou-4adead":"01a7eb6779cc0e417f44","vendors-node_modules_autosize_dist_autosize_esm_js-node_modules_html-entities_lib_index_js-no-4072c5":"c3527b981de24f56109b","src_models_rfcProps_js-src_services_caldavService_js-src_services_talkService_js-src_services-8a2790":"94fac30d128df46a89a6","src_fullcalendar_eventSources_eventSourceFunction_js-src_utils_moment_js-data_image_svg_xml_3-b73258":"740a2859d1f364b508c1","src_views_Calendar_vue-data_image_svg_xml_3csvg_20xmlns_27http_www_w3_org_2000_svg_27_20heigh-4a4254":"0b6b2228ab6a9dcb591c","vendors-node_modules_webdav_dist_web_index_js":"454da8f908d41b47c607","src_store_index_js":"276ff6be1cb450405b79","vendors-node_modules_path-browserify_index_js-node_modules_nextcloud_dialogs_dist_chunks_Dial-e0595f":"e0f3178442f3c9eb35e1","node_modules_nextcloud_dialogs_dist_legacy_mjs":"8be838e4c6e9aae56c87","vendors-node_modules_nextcloud_dialogs_dist_chunks_FilePicker-8ibBgPg__mjs":"ea54a36450de178d1141","public-calendar-subscription-picker":"0c8b5b050db3beb63d49","vendors-node_modules_moment_locale_af_js-node_modules_moment_locale_ar-dz_js-node_modules_mom-582c96":"ce1bed825f57dd1d117a","node_modules_moment_locale_sync_recursive_":"4bc2c39c5e0ff182c2e3"}[chunkId] + "";
|
/******/ return "calendar-" + chunkId + ".js?v=" + {"vendors-node_modules_vue_dist_vue_runtime_esm_js":"7e3171593bdc0f62040b","vendors-node_modules_nextcloud_capabilities_dist_index_js-node_modules_nextcloud_vue-select_d-877981":"741d92f5ec54d0c1ff41","vendors-node_modules_nextcloud_cdav-library_dist_dist_js-node_modules_nextcloud_logger_dist_i-36c16b":"c3b3db23da041c717fc1","vendors-node_modules_vue-material-design-icons_CalendarBlank_vue-node_modules_vue-material-de-e2c1f8":"0658eb6db50a09dd2afe","vendors-node_modules_vue-material-design-icons_CalendarBlankOutline_vue-node_modules_nextclou-4adead":"01a7eb6779cc0e417f44","vendors-node_modules_autosize_dist_autosize_esm_js-node_modules_html-entities_lib_index_js-no-4072c5":"c3527b981de24f56109b","src_models_rfcProps_js-src_services_caldavService_js-src_services_talkService_js-src_services-8a2790":"94fac30d128df46a89a6","src_fullcalendar_eventSources_eventSourceFunction_js-src_utils_moment_js-data_image_svg_xml_3-b73258":"740a2859d1f364b508c1","src_views_Calendar_vue-data_image_svg_xml_3csvg_20xmlns_27http_www_w3_org_2000_svg_27_20heigh-4a4254":"0baf126227b0fea74ee4","vendors-node_modules_webdav_dist_web_index_js":"454da8f908d41b47c607","src_store_index_js":"256e15d8889d4ef4234b","vendors-node_modules_path-browserify_index_js-node_modules_nextcloud_dialogs_dist_chunks_Dial-e0595f":"e0f3178442f3c9eb35e1","node_modules_nextcloud_dialogs_dist_legacy_mjs":"8be838e4c6e9aae56c87","vendors-node_modules_nextcloud_dialogs_dist_chunks_FilePicker-8ibBgPg__mjs":"ea54a36450de178d1141","public-calendar-subscription-picker":"0c8b5b050db3beb63d49","vendors-node_modules_moment_locale_af_js-node_modules_moment_locale_ar-dz_js-node_modules_mom-582c96":"ce1bed825f57dd1d117a","node_modules_moment_locale_sync_recursive_":"4bc2c39c5e0ff182c2e3"}[chunkId] + "";
|
||||||
/******/ };
|
/******/ };
|
||||||
/******/ })();
|
/******/ })();
|
||||||
/******/
|
/******/
|
||||||
@ -9115,4 +9115,4 @@ __webpack_require__.p = (0,_nextcloud_router__WEBPACK_IMPORTED_MODULE_1__.linkTo
|
|||||||
|
|
||||||
/******/ })()
|
/******/ })()
|
||||||
;
|
;
|
||||||
//# sourceMappingURL=calendar-reference.js.map?v=df693546df64c9b5cce0
|
//# sourceMappingURL=calendar-reference.js.map?v=adaba8c8d3feb02efffe
|
||||||
File diff suppressed because one or more lines are too long
@ -1559,7 +1559,8 @@ __webpack_require__.r(__webpack_exports__);
|
|||||||
/* harmony export */ getFileInfo: () => (/* binding */ getFileInfo),
|
/* harmony export */ getFileInfo: () => (/* binding */ getFileInfo),
|
||||||
/* harmony export */ shareFile: () => (/* binding */ shareFile),
|
/* harmony export */ shareFile: () => (/* binding */ shareFile),
|
||||||
/* harmony export */ shareFileWith: () => (/* binding */ shareFileWith),
|
/* harmony export */ shareFileWith: () => (/* binding */ shareFileWith),
|
||||||
/* harmony export */ uploadLocalAttachment: () => (/* binding */ uploadLocalAttachment)
|
/* harmony export */ uploadLocalAttachment: () => (/* binding */ uploadLocalAttachment),
|
||||||
|
/* harmony export */ uploadRemoteFile: () => (/* binding */ uploadRemoteFile)
|
||||||
/* harmony export */ });
|
/* harmony export */ });
|
||||||
/* harmony import */ var _nextcloud_axios__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @nextcloud/axios */ "./node_modules/@nextcloud/axios/dist/index.es.mjs");
|
/* harmony import */ var _nextcloud_axios__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @nextcloud/axios */ "./node_modules/@nextcloud/axios/dist/index.es.mjs");
|
||||||
/* harmony import */ var _nextcloud_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @nextcloud/router */ "./node_modules/@nextcloud/router/dist/index.mjs");
|
/* harmony import */ var _nextcloud_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @nextcloud/router */ "./node_modules/@nextcloud/router/dist/index.mjs");
|
||||||
@ -1733,7 +1734,39 @@ const uploadLocalAttachment = async function (folder, files, dav, componentAttac
|
|||||||
await Promise.all(promises);
|
await Promise.all(promises);
|
||||||
return attachments;
|
return attachments;
|
||||||
};
|
};
|
||||||
|
const uploadRemoteFile = async function (folder, fileUrl, fileName, dav) {
|
||||||
|
try {
|
||||||
|
// Télécharger le fichier distant
|
||||||
|
const response = await _nextcloud_axios__WEBPACK_IMPORTED_MODULE_0__["default"].get(fileUrl, {
|
||||||
|
responseType: 'blob'
|
||||||
|
});
|
||||||
|
|
||||||
|
// Envoyer le fichier récupéré en PUT vers WebDAV
|
||||||
|
const url = (0,_nextcloud_router__WEBPACK_IMPORTED_MODULE_1__.generateRemoteUrl)("dav/files/".concat(dav.userId, "/").concat(folder, "/").concat(fileName));
|
||||||
|
const uploadResponse = await _nextcloud_axios__WEBPACK_IMPORTED_MODULE_0__["default"].put(url, response.data, {
|
||||||
|
headers: {
|
||||||
|
'Content-Type': response.data.type // Utilise le type MIME du fichier
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (uploadResponse.status === 204 || uploadResponse.status === 201) {
|
||||||
|
(0,_nextcloud_dialogs__WEBPACK_IMPORTED_MODULE_2__.showSuccess)((0,_nextcloud_l10n__WEBPACK_IMPORTED_MODULE_3__.translate)('calendar', 'Attachment {fileName} added!', {
|
||||||
|
fileName: fileName
|
||||||
|
}));
|
||||||
|
return {
|
||||||
|
fileName: fileName,
|
||||||
|
formatType: response.data.type,
|
||||||
|
uri: url,
|
||||||
|
value: url,
|
||||||
|
path: "/".concat(fileName)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
(0,_nextcloud_dialogs__WEBPACK_IMPORTED_MODULE_2__.showError)((0,_nextcloud_l10n__WEBPACK_IMPORTED_MODULE_3__.translate)('calendar', 'An error occurred during uploading file {fileName}', {
|
||||||
|
fileName: fileName
|
||||||
|
}));
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
};
|
||||||
// TODO is shared or not @share-types@
|
// TODO is shared or not @share-types@
|
||||||
const getFileInfo = async function (path, userId) {
|
const getFileInfo = async function (path, userId) {
|
||||||
const url = (0,_nextcloud_router__WEBPACK_IMPORTED_MODULE_1__.generateRemoteUrl)("dav/files/".concat(userId, "/").concat(path));
|
const url = (0,_nextcloud_router__WEBPACK_IMPORTED_MODULE_1__.generateRemoteUrl)("dav/files/".concat(userId, "/").concat(path));
|
||||||
@ -8190,4 +8223,4 @@ function getLinkToConfig(key) {
|
|||||||
/***/ })
|
/***/ })
|
||||||
|
|
||||||
}]);
|
}]);
|
||||||
//# sourceMappingURL=calendar-src_store_index_js.js.map?v=276ff6be1cb450405b79
|
//# sourceMappingURL=calendar-src_store_index_js.js.map?v=256e15d8889d4ef4234b
|
||||||
File diff suppressed because one or more lines are too long
@ -27393,4 +27393,4 @@ module.exports = "data:image/svg+xml,%3csvg%20xmlns=%27http://www.w3.org/2000/sv
|
|||||||
/***/ })
|
/***/ })
|
||||||
|
|
||||||
}]);
|
}]);
|
||||||
//# sourceMappingURL=calendar-src_views_Calendar_vue-data_image_svg_xml_3csvg_20xmlns_27http_www_w3_org_2000_svg_27_20heigh-4a4254.js.map?v=0b6b2228ab6a9dcb591c
|
//# sourceMappingURL=calendar-src_views_Calendar_vue-data_image_svg_xml_3csvg_20xmlns_27http_www_w3_org_2000_svg_27_20heigh-4a4254.js.map?v=0baf126227b0fea74ee4
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
199
calendar/lib/Controller/EmailBoxController.php
Normal file
199
calendar/lib/Controller/EmailBoxController.php
Normal file
@ -0,0 +1,199 @@
|
|||||||
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace OCA\Calendar\Controller;
|
||||||
|
|
||||||
|
use OCP\IRequest;
|
||||||
|
use Horde_Imap_Client;
|
||||||
|
use OCP\IURLGenerator;
|
||||||
|
use OCP\AppFramework\Http;
|
||||||
|
use OCP\AppFramework\Controller;
|
||||||
|
use OCP\Files\IMimeTypeDetector;
|
||||||
|
use OCA\Mail\Contracts\IMailSearch;
|
||||||
|
use OCP\AppFramework\Http\Response;
|
||||||
|
use OCA\Mail\Contracts\IMailManager;
|
||||||
|
use OCA\Mail\IMAP\IMAPClientFactory;
|
||||||
|
use OCA\Mail\Service\AccountService;
|
||||||
|
use OCA\Mail\Service\Sync\SyncService;
|
||||||
|
use OCP\AppFramework\Http\JSONResponse;
|
||||||
|
use OCA\Mail\Contracts\IUserPreferences;
|
||||||
|
use OCP\AppFramework\Db\DoesNotExistException;
|
||||||
|
|
||||||
|
class EmailBoxController extends Controller {
|
||||||
|
private ?string $currentUserId;
|
||||||
|
|
||||||
|
|
||||||
|
private IMailManager $mailManager;
|
||||||
|
|
||||||
|
private IUserPreferences $preferences;
|
||||||
|
|
||||||
|
private IMailSearch $mailSearch;
|
||||||
|
|
||||||
|
private AccountService $accountService;
|
||||||
|
|
||||||
|
private IURLGenerator $urlGenerator;
|
||||||
|
|
||||||
|
private IMimeTypeDetector $mimeTypeDetector;
|
||||||
|
|
||||||
|
private IMAPClientFactory $clientFactory;
|
||||||
|
|
||||||
|
private SyncService $syncService;
|
||||||
|
|
||||||
|
public function __construct(string $appName,
|
||||||
|
IRequest $request,
|
||||||
|
?string $UserId,
|
||||||
|
IMailManager $mailManager,
|
||||||
|
IUserPreferences $preferences,
|
||||||
|
IMailSearch $mailSearch,
|
||||||
|
AccountService $accountService,
|
||||||
|
IURLGenerator $urlGenerator,
|
||||||
|
IMimeTypeDetector $mimeTypeDetector,
|
||||||
|
IMAPClientFactory $clientFactory,
|
||||||
|
SyncService $syncService
|
||||||
|
|
||||||
|
) {
|
||||||
|
parent::__construct($appName, $request);
|
||||||
|
$this->currentUserId = $UserId;
|
||||||
|
$this->mailManager = $mailManager;
|
||||||
|
$this->preferences = $preferences;
|
||||||
|
$this->mailSearch = $mailSearch;
|
||||||
|
$this->accountService = $accountService;
|
||||||
|
$this->urlGenerator = $urlGenerator;
|
||||||
|
$this->mimeTypeDetector = $mimeTypeDetector;
|
||||||
|
$this->clientFactory = $clientFactory;
|
||||||
|
$this->syncService = $syncService;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @NoAdminRequired
|
||||||
|
* @NoCSRFRequired
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public function loadEmailboxMessage(): JSONResponse {
|
||||||
|
//TODO
|
||||||
|
$mailboxId = 1;
|
||||||
|
|
||||||
|
$lastMessageTimestamp = null;
|
||||||
|
$init = false;
|
||||||
|
$sortOrder = 'newest';
|
||||||
|
$query = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
$mailbox = $this->mailManager->getMailbox($this->currentUserId, $mailboxId);
|
||||||
|
$account = $this->accountService->find($this->currentUserId, $mailbox->getAccountId());
|
||||||
|
if ($this->request->getParam('withSync')) {
|
||||||
|
$this->syncService->syncMailbox(
|
||||||
|
$account,
|
||||||
|
$mailbox,
|
||||||
|
Horde_Imap_Client::SYNC_NEWMSGSUIDS | Horde_Imap_Client::SYNC_FLAGSUIDS | Horde_Imap_Client::SYNC_VANISHEDUIDS,
|
||||||
|
null,
|
||||||
|
$lastMessageTimestamp,
|
||||||
|
$init,
|
||||||
|
$sortOrder,
|
||||||
|
$query
|
||||||
|
);
|
||||||
|
$mailbox = $this->mailManager->getMailbox($this->currentUserId, $mailboxId);
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (DoesNotExistException $e) {
|
||||||
|
return new JSONResponse([], Http::STATUS_FORBIDDEN);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$order = $this->preferences->getPreference($this->currentUserId, 'sort-order', 'newest') === 'newest' ? 'DESC': 'ASC';
|
||||||
|
return new JSONResponse(
|
||||||
|
$this->mailSearch->findMessages(
|
||||||
|
$account,
|
||||||
|
$mailbox,
|
||||||
|
$order,
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
30,
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @NoAdminRequired
|
||||||
|
* @NoCSRFRequired
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public function loadEmailboxAttachement(int $messageId = 0): Response {
|
||||||
|
//TODO
|
||||||
|
// $messageId = 12818;
|
||||||
|
try {
|
||||||
|
$message = $this->mailManager->getMessage($this->currentUserId, $messageId);
|
||||||
|
$mailbox = $this->mailManager->getMailbox($this->currentUserId, $message->getMailboxId());
|
||||||
|
$account = $this->accountService->find($this->currentUserId, $mailbox->getAccountId());
|
||||||
|
} catch (DoesNotExistException $e) {
|
||||||
|
return new JSONResponse([], Http::STATUS_FORBIDDEN);
|
||||||
|
}
|
||||||
|
$data = [];
|
||||||
|
$client = $this->clientFactory->getClient($account);
|
||||||
|
try {
|
||||||
|
$imapMessage = $this->mailManager->getImapMessage(
|
||||||
|
$client,
|
||||||
|
$account,
|
||||||
|
$mailbox,
|
||||||
|
$message->getUid(), true
|
||||||
|
);
|
||||||
|
$json = $imapMessage->getFullMessage($messageId);
|
||||||
|
} finally {
|
||||||
|
$client->logout();
|
||||||
|
}
|
||||||
|
|
||||||
|
$data['attachments'] = array_map(function ($a) use ($messageId) {
|
||||||
|
return $this->enrichDownloadUrl(
|
||||||
|
$messageId,
|
||||||
|
$a
|
||||||
|
);
|
||||||
|
}, $json['attachments']);
|
||||||
|
return new JSONResponse(($data));
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @param int $id
|
||||||
|
* @param array $attachment
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
private function enrichDownloadUrl(int $id,
|
||||||
|
array $attachment) {
|
||||||
|
$downloadUrl = $this->urlGenerator->linkToRoute('mail.messages.downloadAttachment',
|
||||||
|
[
|
||||||
|
'id' => $id,
|
||||||
|
'attachmentId' => $attachment['id'],
|
||||||
|
]);
|
||||||
|
$downloadUrl = $this->urlGenerator->getAbsoluteURL($downloadUrl);
|
||||||
|
$attachment['downloadUrl'] = $downloadUrl;
|
||||||
|
$attachment['mimeUrl'] = $this->mimeTypeDetector->mimeTypeIcon($attachment['mime']);
|
||||||
|
|
||||||
|
$attachment['isImage'] = $this->attachmentIsImage($attachment);
|
||||||
|
$attachment['isCalendarEvent'] = $this->attachmentIsCalendarEvent($attachment);
|
||||||
|
|
||||||
|
return $attachment;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determines if the content of this attachment is an image
|
||||||
|
*
|
||||||
|
* @param array $attachment
|
||||||
|
*
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
private function attachmentIsImage(array $attachment): bool {
|
||||||
|
return in_array(
|
||||||
|
$attachment['mime'], [
|
||||||
|
'image/jpeg',
|
||||||
|
'image/png',
|
||||||
|
'image/gif'
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param array $attachment
|
||||||
|
*
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
private function attachmentIsCalendarEvent(array $attachment): bool {
|
||||||
|
return in_array($attachment['mime'], ['text/calendar', 'application/ics'], true);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -26,19 +26,24 @@ declare(strict_types=1);
|
|||||||
*/
|
*/
|
||||||
namespace OCA\Calendar\Controller;
|
namespace OCA\Calendar\Controller;
|
||||||
|
|
||||||
use OCP\AppFramework\Controller;
|
|
||||||
use OCP\AppFramework\Http;
|
|
||||||
use OCP\AppFramework\Http\JSONResponse;
|
|
||||||
use OCP\Defaults;
|
|
||||||
use OCP\IConfig;
|
|
||||||
use OCP\IL10N;
|
use OCP\IL10N;
|
||||||
|
use OCP\IConfig;
|
||||||
|
use OCP\Defaults;
|
||||||
use OCP\IRequest;
|
use OCP\IRequest;
|
||||||
use OCP\IURLGenerator;
|
|
||||||
use OCP\IUserManager;
|
use OCP\IUserManager;
|
||||||
use OCP\IUserSession;
|
use OCP\IUserSession;
|
||||||
use OCP\Mail\IEMailTemplate;
|
|
||||||
use OCP\Mail\IMailer;
|
use OCP\Mail\IMailer;
|
||||||
|
use OCP\IURLGenerator;
|
||||||
use OCP\Mail\IMessage;
|
use OCP\Mail\IMessage;
|
||||||
|
use OCP\AppFramework\Http;
|
||||||
|
use OCP\Mail\IEMailTemplate;
|
||||||
|
use OCP\AppFramework\Controller;
|
||||||
|
use OCA\Mail\Contracts\IMailSearch;
|
||||||
|
use OCA\Mail\Contracts\IMailManager;
|
||||||
|
use OCA\Mail\Service\AccountService;
|
||||||
|
use OCP\AppFramework\Http\JSONResponse;
|
||||||
|
use OCA\Mail\Contracts\IUserPreferences;
|
||||||
|
use OCP\AppFramework\Db\DoesNotExistException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class EmailController
|
* Class EmailController
|
||||||
@ -67,6 +72,18 @@ class EmailController extends Controller {
|
|||||||
/** @var IUserManager */
|
/** @var IUserManager */
|
||||||
private $userManager;
|
private $userManager;
|
||||||
|
|
||||||
|
|
||||||
|
private ?string $currentUserId;
|
||||||
|
|
||||||
|
|
||||||
|
private IMailManager $mailManager;
|
||||||
|
|
||||||
|
private IUserPreferences $preferences;
|
||||||
|
|
||||||
|
private IMailSearch $mailSearch;
|
||||||
|
|
||||||
|
private AccountService $accountService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* EmailController constructor.
|
* EmailController constructor.
|
||||||
*
|
*
|
||||||
@ -88,7 +105,15 @@ class EmailController extends Controller {
|
|||||||
IL10N $l10N,
|
IL10N $l10N,
|
||||||
Defaults $defaults,
|
Defaults $defaults,
|
||||||
IURLGenerator $urlGenerator,
|
IURLGenerator $urlGenerator,
|
||||||
IUserManager $userManager) {
|
IUserManager $userManager,
|
||||||
|
?string $UserId,
|
||||||
|
IMailManager $mailManager,
|
||||||
|
IUserPreferences $preferences,
|
||||||
|
IMailSearch $mailSearch,
|
||||||
|
AccountService $accountService,
|
||||||
|
|
||||||
|
|
||||||
|
) {
|
||||||
parent::__construct($appName, $request);
|
parent::__construct($appName, $request);
|
||||||
$this->config = $config;
|
$this->config = $config;
|
||||||
$this->userSession = $userSession;
|
$this->userSession = $userSession;
|
||||||
@ -97,6 +122,11 @@ class EmailController extends Controller {
|
|||||||
$this->defaults = $defaults;
|
$this->defaults = $defaults;
|
||||||
$this->urlGenerator = $urlGenerator;
|
$this->urlGenerator = $urlGenerator;
|
||||||
$this->userManager = $userManager;
|
$this->userManager = $userManager;
|
||||||
|
$this->currentUserId = $UserId;
|
||||||
|
$this->mailManager = $mailManager;
|
||||||
|
$this->preferences = $preferences;
|
||||||
|
$this->mailSearch = $mailSearch;
|
||||||
|
$this->accountService = $accountService;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -226,4 +256,7 @@ class EmailController extends Controller {
|
|||||||
'token' => $token,
|
'token' => $token,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,6 +32,12 @@
|
|||||||
</template>
|
</template>
|
||||||
{{ t('calendar', 'Upload from device') }}
|
{{ t('calendar', 'Upload from device') }}
|
||||||
</NcActionButton>
|
</NcActionButton>
|
||||||
|
<NcActionButton @click="openEmailBoxModal">
|
||||||
|
<template #icon>
|
||||||
|
<Email :size="20" />
|
||||||
|
</template>
|
||||||
|
{{ t('calendar', 'Depuis un email') }}
|
||||||
|
</NcActionButton>
|
||||||
</NcActions>
|
</NcActions>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="attachments.length > 0">
|
<div v-if="attachments.length > 0">
|
||||||
@ -65,6 +71,51 @@
|
|||||||
{{ openConfirmationMessage }}
|
{{ openConfirmationMessage }}
|
||||||
</p>
|
</p>
|
||||||
</NcDialog>
|
</NcDialog>
|
||||||
|
<NcModal v-if="showModal" name="" @close="resetMailBoxModal">
|
||||||
|
|
||||||
|
<div class="modal__content" v-if="!showAttachmentsSection && !showAttachmentsSection">
|
||||||
|
<ul >
|
||||||
|
<template v-if="mailBoxData.length > 0" v-for="mail in mailBoxData">
|
||||||
|
<NcListItem
|
||||||
|
@click="getAttachments(mail)"
|
||||||
|
:name="getLabelEmailBox(mail.from) + ' : ' + getSubstringText(mail.subject, 30) "
|
||||||
|
:bold="false"
|
||||||
|
counterType="outlined">
|
||||||
|
<template #subname>
|
||||||
|
{{ getSubstringText(mail.previewText ,50) }}
|
||||||
|
</template>
|
||||||
|
<template v-if="hasAttachements(mail)" #icon>
|
||||||
|
<Paperclip :size="20" />
|
||||||
|
</template>
|
||||||
|
</NcListItem>
|
||||||
|
</template>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="modal__content__attachments" v-if="showAttachmentsSection">
|
||||||
|
<ul class="attachments-list">
|
||||||
|
<NcActionButton @click="displayAttachmentsSection()">
|
||||||
|
<template #icon>
|
||||||
|
<ArrowLeft :size="20" />
|
||||||
|
</template>
|
||||||
|
Revenir dans la listes des emails
|
||||||
|
</NcActionButton>
|
||||||
|
<div class="image-list-attachement " v-if="!loadingDataEmailBox && mailAttachments.length > 0" v-for="attachment in mailAttachments">
|
||||||
|
<div class="image-item-attachement " @click="pickEmailAttachement(attachment)">
|
||||||
|
<img :src="attachment.downloadUrl" :alt="attachment.fileName ">
|
||||||
|
<label>{{ attachment.fileName }}</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<template v-if="!mailAttachments.length && !loadingDataEmailBox" >
|
||||||
|
<p> Pas d'Attachements</p>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="modal__content" v-if="loadingDataEmailBox" >
|
||||||
|
<p style="text-align: center;"> {{ loadingText }}</p>
|
||||||
|
</div>
|
||||||
|
</NcModal>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -74,13 +125,20 @@ import {
|
|||||||
NcActions,
|
NcActions,
|
||||||
NcActionButton,
|
NcActionButton,
|
||||||
NcDialog,
|
NcDialog,
|
||||||
|
NcModal,
|
||||||
|
NcButton,
|
||||||
|
NcAvatar
|
||||||
} from '@nextcloud/vue'
|
} from '@nextcloud/vue'
|
||||||
|
|
||||||
|
import axios from "@nextcloud/axios";
|
||||||
|
|
||||||
import Upload from 'vue-material-design-icons/Upload.vue'
|
import Upload from 'vue-material-design-icons/Upload.vue'
|
||||||
import Close from 'vue-material-design-icons/Close.vue'
|
import Close from 'vue-material-design-icons/Close.vue'
|
||||||
import Folder from 'vue-material-design-icons/Folder.vue'
|
import Folder from 'vue-material-design-icons/Folder.vue'
|
||||||
import Paperclip from 'vue-material-design-icons/Paperclip.vue'
|
import Paperclip from 'vue-material-design-icons/Paperclip.vue'
|
||||||
import Plus from 'vue-material-design-icons/Plus.vue'
|
import Plus from 'vue-material-design-icons/Plus.vue'
|
||||||
|
import Email from 'vue-material-design-icons/Email.vue'
|
||||||
|
import ArrowLeft from 'vue-material-design-icons/ArrowLeft.vue'
|
||||||
|
|
||||||
import { generateUrl, getBaseUrl } from '@nextcloud/router'
|
import { generateUrl, getBaseUrl } from '@nextcloud/router'
|
||||||
import { getFilePickerBuilder, showError } from '@nextcloud/dialogs'
|
import { getFilePickerBuilder, showError } from '@nextcloud/dialogs'
|
||||||
@ -88,6 +146,7 @@ import logger from '../../../utils/logger.js'
|
|||||||
import {
|
import {
|
||||||
uploadLocalAttachment,
|
uploadLocalAttachment,
|
||||||
getFileInfo,
|
getFileInfo,
|
||||||
|
uploadRemoteFile
|
||||||
} from '../../../services/attachmentService.js'
|
} from '../../../services/attachmentService.js'
|
||||||
import { parseXML } from 'webdav'
|
import { parseXML } from 'webdav'
|
||||||
|
|
||||||
@ -103,6 +162,11 @@ export default {
|
|||||||
Paperclip,
|
Paperclip,
|
||||||
Plus,
|
Plus,
|
||||||
NcDialog,
|
NcDialog,
|
||||||
|
NcModal,
|
||||||
|
NcButton,
|
||||||
|
Email,
|
||||||
|
ArrowLeft,
|
||||||
|
NcAvatar
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
calendarObjectInstance: {
|
calendarObjectInstance: {
|
||||||
@ -120,6 +184,12 @@ export default {
|
|||||||
showOpenConfirmation: false,
|
showOpenConfirmation: false,
|
||||||
openConfirmationMessage: '',
|
openConfirmationMessage: '',
|
||||||
openConfirmationButtons: [],
|
openConfirmationButtons: [],
|
||||||
|
showModal: false,
|
||||||
|
showAttachmentsSection: false,
|
||||||
|
loadingDataEmailBox: false,
|
||||||
|
mailBoxData: [],
|
||||||
|
mailAttachments: [],
|
||||||
|
loadingText: 'Chargement ...',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -185,7 +255,7 @@ export default {
|
|||||||
async onLocalAttachmentSelected(e) {
|
async onLocalAttachmentSelected(e) {
|
||||||
try {
|
try {
|
||||||
const attachmentsFolder = await this.$store.dispatch('createAttachmentsFolder')
|
const attachmentsFolder = await this.$store.dispatch('createAttachmentsFolder')
|
||||||
const attachments = await uploadLocalAttachment(attachmentsFolder, Array.from(e.target.files), this.currentUser.dav, this.attachments)
|
const attachments = await uploadLocalAttachment(attachmentsFolder, Array.from(e.target.files), this.currentUser.dav)
|
||||||
// TODO do not share file, move to PHP
|
// TODO do not share file, move to PHP
|
||||||
attachments.map(async attachment => {
|
attachments.map(async attachment => {
|
||||||
const data = await getFileInfo(`${attachmentsFolder}/${attachment.path}`, this.currentUser.dav.userId)
|
const data = await getFileInfo(`${attachmentsFolder}/${attachment.path}`, this.currentUser.dav.userId)
|
||||||
@ -255,6 +325,101 @@ export default {
|
|||||||
]
|
]
|
||||||
this.showOpenConfirmation = true
|
this.showOpenConfirmation = true
|
||||||
},
|
},
|
||||||
|
async openEmailBoxModal(){
|
||||||
|
this.loadingText = 'Chargement des emails ...'
|
||||||
|
this.showModal = true
|
||||||
|
this.loadingDataEmailBox = true
|
||||||
|
await this.loadEmailsBox()
|
||||||
|
this.loadingDataEmailBox = false
|
||||||
|
},
|
||||||
|
async getAttachments(mail){
|
||||||
|
this.loadingText = 'Chargement des attachements ...'
|
||||||
|
this.loadingDataEmailBox = true
|
||||||
|
this.showAttachmentsSection = true
|
||||||
|
this.mailAttachments = [] ;
|
||||||
|
await this.loadAttachments(mail)
|
||||||
|
this.loadingDataEmailBox = false
|
||||||
|
},
|
||||||
|
async pickEmailAttachement(attachement){
|
||||||
|
this.loadingText = 'Ajout de l\'attachement encours ...'
|
||||||
|
this.loadingDataEmailBox = true
|
||||||
|
await this.pickEmailAttachementTodavFile(attachement)
|
||||||
|
this.closeMailBoxModal()
|
||||||
|
this.resetMailBoxModal()
|
||||||
|
},
|
||||||
|
resetMailBoxModal() {
|
||||||
|
this.mailBoxData = []
|
||||||
|
this.mailAttachments = []
|
||||||
|
this.showModal = false
|
||||||
|
this.showAttachmentsSection = false
|
||||||
|
this.loadingDataEmailBox = false
|
||||||
|
this.loadingText = 'Chargement ...'
|
||||||
|
},
|
||||||
|
displayAttachmentsSection() {
|
||||||
|
this.showAttachmentsSection = false
|
||||||
|
this.loadingDataEmailBox = false
|
||||||
|
},
|
||||||
|
closeMailBoxModal() {
|
||||||
|
this.showModal = false
|
||||||
|
this.showAttachmentsSection = false
|
||||||
|
this.loadingDataEmailBox = false
|
||||||
|
this.loadingText = 'Chargement ...'
|
||||||
|
},
|
||||||
|
async loadEmailsBox(withSync = false) {
|
||||||
|
const ajaxUrl = generateUrl('/apps/calendar/load-email-box')
|
||||||
|
await axios.get(ajaxUrl , { params: { withSync } })
|
||||||
|
.then(response => {
|
||||||
|
this.mailBoxData = response.data
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
console.log(error)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
async loadAttachments(mail) {
|
||||||
|
//TODO
|
||||||
|
// if (!this.hasAttachements(mail)) {
|
||||||
|
// this.mailAttachments = [] ;
|
||||||
|
// this.loadingDataEmailBox = false
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
const ajaxUrl = generateUrl('/apps/calendar/load-email-attachement/' + mail.databaseId)
|
||||||
|
|
||||||
|
await axios.get(ajaxUrl)
|
||||||
|
.then(response => {
|
||||||
|
console.log(response.data)
|
||||||
|
this.mailAttachments = response.data.attachments
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
console.log(error)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
async pickEmailAttachementTodavFile(attachement) {
|
||||||
|
const attachmentsFolder = await this.$store.dispatch('createAttachmentsFolder')
|
||||||
|
const attachment = await uploadRemoteFile(attachmentsFolder, attachement.downloadUrl, attachement.fileName ,this.currentUser.dav)
|
||||||
|
// TODO do not share file, move to PHP
|
||||||
|
const data = await getFileInfo(`${attachmentsFolder}/${attachment.path}`, this.currentUser.dav.userId)
|
||||||
|
const davRes = await parseXML(data)
|
||||||
|
const davRespObj = davRes?.multistatus?.response[0]?.propstat?.prop
|
||||||
|
davRespObj.fileName = attachment.path
|
||||||
|
davRespObj.url = generateUrl(`/f/${davRespObj.fileid}`)
|
||||||
|
davRespObj.value = davRespObj.url
|
||||||
|
this.addAttachmentWithProperty(this.calendarObjectInstance, davRespObj)
|
||||||
|
},
|
||||||
|
getLabelEmailBox(from = []) {
|
||||||
|
if (from.length) {
|
||||||
|
return from[0].label ?? from[0].email
|
||||||
|
}
|
||||||
|
return ''
|
||||||
|
},
|
||||||
|
getSubstringText(text = '' , length = 20) {
|
||||||
|
if (text.length < length) {
|
||||||
|
return text;
|
||||||
|
}
|
||||||
|
return text.substring(0, length) + '...'
|
||||||
|
},
|
||||||
|
hasAttachements(mail) {
|
||||||
|
return mail.flags.hasAttachments;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@ -332,4 +497,38 @@ export default {
|
|||||||
.external-link-message {
|
.external-link-message {
|
||||||
overflow-wrap: break-word;
|
overflow-wrap: break-word;
|
||||||
}
|
}
|
||||||
|
.modal__content {
|
||||||
|
margin: 10px;
|
||||||
|
}
|
||||||
|
.modal__content__attachments {
|
||||||
|
margin: 10px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.attachments-list{
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.image-list-attachement {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-start;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.image-item-attachement {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin: 10px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.image-item-attachement img {
|
||||||
|
width: 100px; /* Largeur de l'image */
|
||||||
|
height: auto; /* Hauteur automatique pour garder le ratio */
|
||||||
|
margin-right: 10px; /* Espace entre l'image et la légende */
|
||||||
|
}
|
||||||
|
|
||||||
|
label {
|
||||||
|
font-size: 16px; /* Taille de police pour la légende */
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -167,7 +167,34 @@ const uploadLocalAttachment = async function(folder, files, dav, componentAttach
|
|||||||
return attachments
|
return attachments
|
||||||
|
|
||||||
}
|
}
|
||||||
|
const uploadRemoteFile = async function(folder , fileUrl, fileName , dav) {
|
||||||
|
try {
|
||||||
|
// Télécharger le fichier distant
|
||||||
|
const response = await axios.get(fileUrl, { responseType: 'blob' });
|
||||||
|
|
||||||
|
// Envoyer le fichier récupéré en PUT vers WebDAV
|
||||||
|
const url = generateRemoteUrl(`dav/files/${dav.userId}/${folder}/${fileName}`)
|
||||||
|
const uploadResponse = await axios.put(url, response.data, {
|
||||||
|
headers: {
|
||||||
|
'Content-Type': response.data.type, // Utilise le type MIME du fichier
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
if (uploadResponse.status === 204 || uploadResponse.status === 201) {
|
||||||
|
showSuccess(t('calendar', 'Attachment {fileName} added!', { fileName: fileName }));
|
||||||
|
return {
|
||||||
|
fileName: fileName,
|
||||||
|
formatType: response.data.type,
|
||||||
|
uri: url,
|
||||||
|
value: url,
|
||||||
|
path: `/${fileName}`,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
showError(t('calendar', 'An error occurred during uploading file {fileName}', { fileName: fileName }));
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
// TODO is shared or not @share-types@
|
// TODO is shared or not @share-types@
|
||||||
const getFileInfo = async function(path, userId) {
|
const getFileInfo = async function(path, userId) {
|
||||||
const url = generateRemoteUrl(`dav/files/${userId}/${path}`)
|
const url = generateRemoteUrl(`dav/files/${userId}/${path}`)
|
||||||
@ -200,4 +227,5 @@ export {
|
|||||||
shareFileWith,
|
shareFileWith,
|
||||||
uploadLocalAttachment,
|
uploadLocalAttachment,
|
||||||
createFolder,
|
createFolder,
|
||||||
|
uploadRemoteFile
|
||||||
}
|
}
|
||||||
|
|||||||
@ -203,5 +203,9 @@ return [
|
|||||||
|
|
||||||
//user groups getUserConnectedGroups
|
//user groups getUserConnectedGroups
|
||||||
['name' => 'page#getUserConnectedGroups', 'url' => '/getUserConnectedGroups', 'verb' => 'GET'],
|
['name' => 'page#getUserConnectedGroups', 'url' => '/getUserConnectedGroups', 'verb' => 'GET'],
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
Loading…
x
Reference in New Issue
Block a user