forked from galaxyproject/galaxy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request galaxyproject#16510 from ElectronicBlueberry/workf…
…low-share-page Published Workflow Sharing Page Overhaul
- Loading branch information
Showing
34 changed files
with
1,136 additions
and
719 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
<script setup lang="ts"> | ||
import { computed, type PropType } from "vue"; | ||
import { usePanels } from "@/composables/usePanels"; | ||
import ActivityBar from "@/components/ActivityBar/ActivityBar.vue"; | ||
import LoadingSpan from "@/components/LoadingSpan.vue"; | ||
import FlexPanel from "@/components/Panels/FlexPanel.vue"; | ||
import ToolBox from "@/components/Panels/ProviderAwareToolBox.vue"; | ||
import StatelessTags from "@/components/TagsMultiselect/StatelessTags.vue"; | ||
interface Item { | ||
name: string; | ||
model_class?: string; | ||
owner?: string; | ||
username?: string; | ||
email_hash?: string; | ||
tags?: string[]; | ||
title?: string; | ||
} | ||
const props = defineProps({ | ||
item: { | ||
type: Object as PropType<Item | null>, | ||
default: null, | ||
}, | ||
}); | ||
const modelTitle = computed(() => { | ||
const modelClass = props.item?.model_class ?? "Item"; | ||
if (modelClass == "StoredWorkflow") { | ||
return "Workflow"; | ||
} | ||
return modelClass; | ||
}); | ||
const plural = computed(() => { | ||
if (modelTitle.value === "History") { | ||
return "Histories"; | ||
} | ||
return `${modelTitle.value}s`; | ||
}); | ||
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`); | ||
const { showActivityBar, showToolbox } = usePanels(); | ||
</script> | ||
|
||
<template> | ||
<div id="columns" class="d-flex"> | ||
<ActivityBar v-if="showActivityBar" /> | ||
<FlexPanel v-if="showToolbox" side="left"> | ||
<ToolBox /> | ||
</FlexPanel> | ||
<div id="center" class="m-3 w-100 overflow-auto d-flex flex-column"> | ||
<slot /> | ||
</div> | ||
<FlexPanel side="right"> | ||
<div v-if="modelTitle" class="m-3"> | ||
<h1 class="h-sm">About this {{ modelTitle }}</h1> | ||
<h2 class="h-md text-break">{{ props.item?.title ?? props.item?.name }}</h2> | ||
<img :src="gravatarSource" alt="user avatar" /> | ||
<StatelessTags v-if="props.item?.tags" class="tags mt-2" :value="props.item.tags" disabled /> | ||
<br /> | ||
<h2 class="h-sm">Author</h2> | ||
<div>{{ owner }}</div> | ||
<hr /> | ||
<h2 class="h-sm">Related Pages</h2> | ||
<div> | ||
<router-link :to="urlAll">All published {{ plural }}.</router-link> | ||
</div> | ||
<div> | ||
<router-link :to="publishedByUser"> Published {{ plural }} by {{ owner }}. </router-link> | ||
</div> | ||
</div> | ||
<LoadingSpan v-else message="Loading item details" /> | ||
<div class="flex-fill" /> | ||
</FlexPanel> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 7 additions & 6 deletions
13
client/src/components/Visualizations/VisualizationPublished.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.