diff --git a/Dockerfile b/Dockerfile index 1a4b9a117ee690f2abcc6afa1738975211a32ee4..8f6e2332d1d1348f58a4cf8f3152361bec035f43 100644 --- a/Dockerfile +++ b/Dockerfile @@ -143,6 +143,12 @@ RUN cd ${BASE_DIR} && patch -u ${BASE_DIR}/3rdparty/sabre/vobject/lib/ITip/Broke RUN patch -u ${BASE_DIR}/apps/dav/lib/CalDAV/Reminder/ReminderService.php -i ${TMP_PATCH_DIR}/024-reminder-service-handle-exception.patch RUN patch -u ${BASE_DIR}/apps/theming/lib/Themes/CommonThemeTrait.php -i ${TMP_PATCH_DIR}/026-primary-color-fix.patch +#snappymail patches +RUN cd ${BASE_DIR} && patch -u ${BASE_DIR}/custom_apps/snappymail/plugins/nextcloud/langs/en.ini -i ${TMP_PATCH_DIR}/029-patch_snappymail_add_to_calendar.patch +#RUN cd ${BASE_DIR} && patch -u ${BASE_DIR_OF_DATA}/appdata_snappymail/_data_/_default_/plugins/nextcloud/js/webdav.js -i ${TMP_PATCH_DIR}/030-patch_snappymail_webdavapi.patch +#The path will be ./nextcloud/ecloud_dev_example/volumes/nextcloud/data/appdata_snappymail/_data_/_default_/plugins/nextcloud/js/webdav.js +RUN cd ${BASE_DIR} && patch -u ${BASE_DIR}/custom_apps/snappymail/snappymail/v/${SNAPPY_VERSION}/app/templates/Views/User/MailMessageView.html -i ${TMP_PATCH_DIR}/031-patch_snappymail_open_attachment.patch + RUN rm -rf ${TMP_PATCH_DIR} # Custom theme diff --git a/patches/029-patch_snappymail_add_to_calendar.patch b/patches/029-patch_snappymail_add_to_calendar.patch new file mode 100644 index 0000000000000000000000000000000000000000..77d6b361a7b9be12ed7a4f9914037aeab20c4209 --- /dev/null +++ b/patches/029-patch_snappymail_add_to_calendar.patch @@ -0,0 +1,11 @@ +--- ./custom_apps/snappymail/plugins/nextcloud/langs/en.ini 2023-09-20 08:34:31 ++++ ./custom_apps/snappymail/plugins/nextcloud/langs/en-new.ini 2023-09-20 08:38:33 +@@ -1,7 +1,7 @@ + [NEXTCLOUD] + SAVE_ATTACHMENTS = "Save in Nextcloud" + SAVE_EML = "Save as .eml in Nextcloud" +-SAVE_ICS = "Put in Calendar" ++SAVE_ICS = "Add to calendar" + SELECT_FOLDER = "Select folder" + SELECT_FILES = "Select file(s)" + ATTACH_FILES = "Attach Nextcloud files" diff --git a/patches/030-patch_snappymail_webdavapi.patch b/patches/030-patch_snappymail_webdavapi.patch new file mode 100644 index 0000000000000000000000000000000000000000..a0b2a9a43177a1629f42ebb15b008be8555d47f8 --- /dev/null +++ b/patches/030-patch_snappymail_webdavapi.patch @@ -0,0 +1,67 @@ +--- ./custom_apps/snappymail/plugins/nextcloud/js/webdav.js 2023-09-20 08:34:31 ++++ ./custom_apps/snappymail/plugins/nextcloud/js/webdav-new.js 2023-09-20 08:47:37 +@@ -34,6 +34,7 @@ + + + ++ + + `, + +@@ -343,17 +344,45 @@ + const e = responseList.item(i); + if (getDavElementByTagName(e, 'resourcetype').getElementsByTagNameNS(nsCalDAV, 'calendar').length) { + // && getDavElementsByTagName(getDavElementByTagName(e, 'current-user-privilege-set'), 'write').length) { +- const li = document.createElement('li'), +- btn = document.createElement('button'); +- li.dataset.icon = '📅'; +- li.textContent = getDavElementByTagName(e, 'displayname').textContent; +- btn.href = getDavElementByTagName(e, 'href').textContent +- .replace(pathRegex, '').replace(/\/$/, ''); +- btn.textContent = 'select'; +- btn.className = 'button-vue'; +- btn.style.marginLeft = '1em'; +- li.append(btn); +- this.tree.append(li); ++ const li = document.createElement('li'); ++ li.style.display = 'flex'; ++ // Create the element ++ const span = document.createElement('span'); ++ span.setAttribute('role', 'img'); ++ span.className = 'material-design-icon checkbox-blank-circle-icon'; ++ span.style.fill = getDavElementByTagName(e, 'calendar-color').textContent; ++ span.style.width = '20px'; // Width ++ span.style.height = '20px'; // Height ++ ++ // Create the element ++ const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg'); ++ svg.setAttribute('width', '20'); ++ svg.setAttribute('height', '20'); ++ svg.setAttribute('viewBox', '0 0 24 24'); ++ ++ // Create the element within the element ++ const path = document.createElementNS('http://www.w3.org/2000/svg', 'path'); ++ path.setAttribute('d', 'M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z'); ++ svg.appendChild(path); ++ ++ // Append the element to the element ++ span.appendChild(svg); ++ ++ const button = document.createElement('button'); ++ button.className = 'button-vue'; ++ button.style.backgroundColor = 'transparent'; ++ button.style.border = '0'; ++ button.style.fontSize = 'large'; ++ button.style.padding = '0'; ++ button.style.cursor = 'pointer'; ++ button.textContent = getDavElementByTagName(e, 'displayname').textContent; ++ button.style.color = 'black'; ++ ++ li.appendChild(span); ++ li.appendChild(button); ++ ++ // Assuming 'this.tree' is a reference to the parent element where you want to append the 'li' element. ++ this.tree.appendChild(li); + } + } + }) diff --git a/patches/031-patch_snappymail_open_attachment.patch b/patches/031-patch_snappymail_open_attachment.patch new file mode 100644 index 0000000000000000000000000000000000000000..c9603a05d3f5375d9b4c951be2a70afb4d339826 --- /dev/null +++ b/patches/031-patch_snappymail_open_attachment.patch @@ -0,0 +1,11 @@ +--- ./custom_apps/snappymail/snappymail/v/0.0.0/app/templates/Views/User/MailMessageView.html 2023-09-20 08:34:31 ++++ ./custom_apps/snappymail/snappymail/v/0.0.0/app/templates/Views/User/MailMessageView-new.html 2023-09-20 08:50:10 +@@ -229,7 +229,7 @@ +
+
+-
++
+ + +