diff --git a/dev/public/js/MARL/utils.js b/dev/public/js/MARL/utils.js
index fe98aa7..962b873 100644
--- a/dev/public/js/MARL/utils.js
+++ b/dev/public/js/MARL/utils.js
@@ -252,14 +252,21 @@ function loadAttachedMedia(att, index) {
url = url.slice(prefix);
}
if (!data[root + url]) {
- return;
- }
- data[root + url].async("base64").then((content) => {
+ // media not found in archive
+ // we still want to show the metadata for the attachement
Alpine.store("files").sources[index][att.url] = {
type: att.mediaType,
- content: content,
+ content: null,
};
- });
+ return;
+ } else {
+ data[root + url].async("base64").then((content) => {
+ Alpine.store("files").sources[index][att.url] = {
+ type: att.mediaType,
+ content: content,
+ };
+ });
+ }
}
}
diff --git a/dev/public/js/i18n/en.js b/dev/public/js/i18n/en.js
index cc70f80..d353547 100644
--- a/dev/public/js/i18n/en.js
+++ b/dev/public/js/i18n/en.js
@@ -118,6 +118,7 @@ appStrings["en"] = {
linkToPost: "link",
attachmentNoAlt: "No description provided",
attachmentInArchive: "In archive:",
+ attachmentNotFound: "⚠️ Content not found in archive",
people: "People",
hashtags: "Hashtags",
extLinks: "External links",
diff --git a/dev/public/js/i18n/fr.js b/dev/public/js/i18n/fr.js
index 70b6eba..6ffc62a 100644
--- a/dev/public/js/i18n/fr.js
+++ b/dev/public/js/i18n/fr.js
@@ -118,6 +118,7 @@ appStrings["fr"] = {
linkToPost: "lien",
attachmentNoAlt: "Aucune description fournie",
attachmentInArchive: "Dans l'archive :",
+ attachmentNotFound: "⚠️ Média introuvable à l'emplacement indiqué",
people: "Personnes",
hashtags: "Hashtags",
extLinks: "Liens externes",
diff --git a/dev/src/components/panels/posts/AttachmentDescription.astro b/dev/src/components/panels/posts/AttachmentDescription.astro
index 5508a61..23a8cee 100644
--- a/dev/src/components/panels/posts/AttachmentDescription.astro
+++ b/dev/src/components/panels/posts/AttachmentDescription.astro
@@ -1,12 +1,21 @@
-
+
+ ()
+
+
-
-
-
+ >
+
+
+
+
diff --git a/dev/src/components/panels/posts/AttachmentImage.astro b/dev/src/components/panels/posts/AttachmentImage.astro
index cb6516d..27a66cf 100644
--- a/dev/src/components/panels/posts/AttachmentImage.astro
+++ b/dev/src/components/panels/posts/AttachmentImage.astro
@@ -10,6 +10,7 @@ import AttachmentDescription from './AttachmentDescription.astro'
class="att-img-wrapper"
@click="$store.lightbox.open(toot, index, 'att-' + toot._marl.id + '-' + index)"
:id="'att-' + toot._marl.id + '-' + index"
+ x-show="$store.files.sources[toot._marl.source][att.url].content"
>