Skip to content

Commit

Permalink
Use creator_deleted_or_purged to determine how to display workflow cr…
Browse files Browse the repository at this point in the history
…eator
  • Loading branch information
jdavcs committed Jan 14, 2025
1 parent cac1195 commit 51a7137
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions client/src/components/Workflow/Published/WorkflowInformation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ const fullLink = computed(() => {
const userOwned = computed(() => {
return userStore.matchesCurrentUsername(props.workflowInfo.owner);
});
const owner = computed(() => {
if (props.workflowInfo?.creator_deleted_or_purged) {
return "Archived author";
}
return props.workflowInfo.owner;
});
</script>

<template>
Expand All @@ -58,12 +65,12 @@ const userOwned = computed(() => {
<div class="workflow-info-box">
<hgroup class="mb-2">
<Heading h3 size="md" class="mb-0">Author</Heading>
<span class="ml-2">{{ workflowInfo.owner }}</span>
<span class="ml-2">{{ owner }}</span>
</hgroup>

<img alt="User Avatar" :src="gravatarSource" class="mb-2" />

<RouterLink :to="publishedByUser" :target="props.embedded ? '_blank' : ''">
<RouterLink v-if="!props.workflowInfo?.creator_deleted_or_purged" :to="publishedByUser" :target="props.embedded ? '_blank' : ''">
All published Workflows by {{ workflowInfo.owner }}
</RouterLink>
</div>
Expand Down

0 comments on commit 51a7137

Please sign in to comment.