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.
Refactor modal logic out of core MarkdownHelp component.
- Loading branch information
Showing
3 changed files
with
144 additions
and
127 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<script setup lang="ts"> | ||
import { computed, ref } from "vue"; | ||
import MarkdownHelp from "./MarkdownHelp.vue"; | ||
interface MarkdownHelpModalProps { | ||
mode: "report" | "page"; | ||
} | ||
const props = defineProps<MarkdownHelpModalProps>(); | ||
const show = ref(false); | ||
const title = computed(() => { | ||
if (props.mode == "page") { | ||
return "Markdown Help for Pages"; | ||
} else { | ||
return "Markdown Help for Invocation Reports"; | ||
} | ||
}); | ||
function showMarkdownHelp() { | ||
show.value = true; | ||
} | ||
defineExpose({ | ||
showMarkdownHelp, | ||
}); | ||
</script> | ||
|
||
<template> | ||
<b-modal v-model="show" hide-footer> | ||
<template v-slot:modal-title> | ||
<h2 class="mb-0">{{ title }}</h2> | ||
</template> | ||
<MarkdownHelp :mode="mode" /> | ||
</b-modal> | ||
</template> |