-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add
WorkflowCard
, PopularWorkflows
components, more stuff to hero
- Loading branch information
1 parent
9999dfb
commit 310ed0c
Showing
5 changed files
with
118 additions
and
44 deletions.
There are no files selected for viewing
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,30 @@ | ||
<script setup lang="ts"> | ||
import { useWorkflowStore } from "~/stores/workflows"; | ||
// TODO: Could use any other identifier instead of trsId that seems fit | ||
const props = defineProps<{ | ||
/** List of Trs Ids for most popular workflows */ | ||
workflowTrsIds: string[]; | ||
}>(); | ||
const workflowStore = useWorkflowStore(); | ||
const workflows = computed(() => { | ||
return props.workflowTrsIds?.map((trsID) => workflowStore.getWorkflowByTrsId(trsID)); | ||
}); | ||
</script> | ||
|
||
<template> | ||
<div> | ||
<h2 class="text-2xl mx-8 my-4 text-white text-center" :style="{ 'font-weight': 600 }"> | ||
Get started with some of the most popular or recently updated pipelines | ||
</h2> | ||
<div class="grid grid-cols-3 gap-8 mx-8"> | ||
<WorkflowCard | ||
v-for="workflow in workflows" | ||
:key="workflow.definition.uuid" | ||
:workflow="workflow" /> | ||
</div> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<script setup lang="ts"> | ||
import type { Workflow } from '~/models/workflow'; | ||
import { formatDate } from "~/utils/"; | ||
defineProps<{ | ||
workflow: Workflow; | ||
}>(); | ||
</script> | ||
<template> | ||
<UCard | ||
:id="`workflow-${workflow.definition.uuid}`" | ||
:ui="{ | ||
strategy: 'override', | ||
base: 'flex flex-col', | ||
header: { | ||
padding: 'px-6 py-4', | ||
}, | ||
body: { | ||
base: 'flex-1', | ||
padding: 'px-6 py-4', | ||
}, | ||
footer: { | ||
padding: 'px-6 py-2', | ||
}, | ||
}" | ||
class="mb-6"> | ||
<template #header> | ||
<h2 class="text-xl font-bold mb-2">{{ workflow.definition.name }}</h2> | ||
</template> | ||
<p class="mb-4">{{ workflow.definition.annotation }}</p> | ||
|
||
<div v-if="workflow.definition.tags && workflow.definition.tags.length > 0" class="mb-4"> | ||
<UBadge v-for="tag in workflow.definition.tags" :key="tag" class="mr-2 mb-2" variant="soft"> | ||
{{ tag }} | ||
</UBadge> | ||
</div> | ||
<template #footer> | ||
<div class="flex space-x-4"> | ||
<p class="text-xs text-gray-500">Release {{ workflow.definition.release }}</p> | ||
<p class="text-xs text-gray-500">{{ formatDate(workflow.updated) }}</p> | ||
</div> | ||
</template> | ||
|
||
<UButton :to="`/workflow/${encodeURIComponent(workflow.trsID)}/`">Details</UButton> | ||
</UCard> | ||
</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
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