diff --git a/client/src/components/Common/PublishedItem.vue b/client/src/components/Common/PublishedItem.vue index 6b505ee2b004..4f248118f7fa 100644 --- a/client/src/components/Common/PublishedItem.vue +++ b/client/src/components/Common/PublishedItem.vue @@ -12,6 +12,7 @@ interface Item { owner?: string; username?: string; email_hash?: string; + author_deleted_or_purged?: boolean; tags?: string[]; title?: string; } @@ -37,8 +38,14 @@ const plural = computed(() => { return `${modelTitle.value}s`; }); +const owner = computed(() => { + if (props.item?.author_deleted_or_purged) { + return "Archived author"; + } + return props.item?.owner ?? props.item?.username ?? "Unavailable"; +}); + const gravatarSource = computed(() => `https://secure.gravatar.com/avatar/${props.item?.email_hash}?d=identicon`); -const owner = computed(() => props.item?.owner ?? props.item?.username ?? "Unavailable"); const pluralPath = computed(() => plural.value.toLowerCase()); const publishedByUser = computed(() => `/${pluralPath.value}/list_published?f-username=${owner.value}`); const urlAll = computed(() => `/${pluralPath.value}/list_published`); @@ -76,7 +83,7 @@ const urlAll = computed(() => `/${pluralPath.value}/list_published`); All published {{ plural }} -
+
Published {{ plural }} by {{ owner }}