diff --git a/themes/default/public/js/upload.js b/themes/default/public/js/upload.js index eb2a974..88de317 100644 --- a/themes/default/public/js/upload.js +++ b/themes/default/public/js/upload.js @@ -215,31 +215,33 @@ document.addEventListener("DOMContentLoaded", () => { filesize(job.lufiFile.size); uploadedFileCard.querySelector(".expiration").innerText = expirationDate; - uploadedFileCard.querySelector(".action-download").href = - job.lufiFile.downloadUrl(); - uploadedFileCard.querySelector(".action-delete").href = - job.lufiFile.removeUrl(); - uploadedFileCard.querySelector(".action-share").href = `${ - job.lufiFile.serverUrl - }m?links=${encodeURIComponent( - '["' + job.lufiFile.keys.server + '"]' - )}`; - uploadedFileCard - .querySelector(".action-copy") - .addEventListener("click", async () => { - await copyToClipboard(job.lufiFile.downloadUrl()); + if (!isGuest) { + uploadedFileCard.querySelector(".action-download").href = + job.lufiFile.downloadUrl(); + uploadedFileCard.querySelector(".action-delete").href = + job.lufiFile.removeUrl(); + uploadedFileCard.querySelector(".action-share").href = `${ + job.lufiFile.serverUrl + }m?links=${encodeURIComponent( + '["' + job.lufiFile.keys.server + '"]' + )}`; + + uploadedFileCard + .querySelector(".action-copy") + .addEventListener("click", async () => { + await copyToClipboard(job.lufiFile.downloadUrl()); - uploadedFileCard.querySelector( - ".action-copy .text" - ).innerText = i18n.copied; - setTimeout(() => { uploadedFileCard.querySelector( ".action-copy .text" - ).innerText = i18n.copyLink; - }, 1000); - }); - + ).innerText = i18n.copied; + setTimeout(() => { + uploadedFileCard.querySelector( + ".action-copy .text" + ).innerText = i18n.copyLink; + }, 1000); + }); + } uploadFilesDOM.replaceChild( uploadedFileCard, uploadingFileCard diff --git a/themes/default/templates/index.html.ep b/themes/default/templates/index.html.ep index 682e7f2..5ebe87a 100644 --- a/themes/default/templates/index.html.ep +++ b/themes/default/templates/index.html.ep @@ -170,6 +170,14 @@
+ % if (stash('invitation')) { +
+
+ <%= l('The link(s) of your file(s) will automatically be sent by mail to %1 (%2)', stash('invitation')->ldap_user, stash('invitation')->ldap_user_mail) %> +
+
+ % } +