From 3082bb9be40402636f9d65fd6b8bc708343a956f Mon Sep 17 00:00:00 2001 From: John Davis Date: Mon, 13 Jan 2025 17:04:58 -0500 Subject: [PATCH] Use author_deleted_or_purged to determine how to display page author --- client/src/components/Common/PublishedItem.vue | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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 }}