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.
Galaxy Markdown - add workflow image and license to Galaxy markdown.
- Loading branch information
Showing
10 changed files
with
173 additions
and
41 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
client/src/components/Markdown/Elements/Workflow/WorkflowImage.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<script setup lang="ts"> | ||
import { computed } from "vue"; | ||
import { getAppRoot } from "@/onload/loadConfig"; | ||
interface WorkflowImageProps { | ||
workflowId: string; | ||
size?: string; | ||
} | ||
const props = withDefaults(defineProps<WorkflowImageProps>(), { | ||
size: "lg", | ||
}); | ||
const src = computed(() => { | ||
return `${getAppRoot()}workflow/gen_image?id=${props.workflowId}&embed=true`; | ||
}); | ||
const width = computed(() => { | ||
const size = props.size; | ||
if (size == "sm") { | ||
return "300px"; | ||
} else if (size == "md") { | ||
return "550px"; | ||
} else { | ||
return "100%"; | ||
} | ||
}); | ||
</script> | ||
|
||
<template> | ||
<img alt="Preview of Galaxy Workflow" :src="src" :width="width" height="auto" /> | ||
</template> |
20 changes: 20 additions & 0 deletions
20
client/src/components/Markdown/Elements/Workflow/WorkflowLicense.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<script setup lang="ts"> | ||
import License from "@/components/License/License.vue"; | ||
interface WorkflowLicenseProps { | ||
licenseId?: string; | ||
} | ||
const props = withDefaults(defineProps<WorkflowLicenseProps>(), { | ||
licenseId: null, | ||
}); | ||
</script> | ||
|
||
<template> | ||
<span> | ||
<p v-if="!props.licenseId"> | ||
<i>Workflow does not define a license.</i> | ||
</p> | ||
<License v-else :license-id="props.licenseId" /> | ||
</span> | ||
</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
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