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.
- Loading branch information
Showing
8 changed files
with
113 additions
and
10 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,63 @@ | ||
<script setup> | ||
import { library } from "@fortawesome/fontawesome-svg-core"; | ||
import { faExclamationCircle } from "@fortawesome/free-solid-svg-icons"; | ||
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome"; | ||
import { computed } from "vue"; | ||
import { findExtension } from "./utils"; | ||
import UploadExtension from "./UploadExtension.vue"; | ||
import UploadSelect from "./UploadSelect.vue"; | ||
import Popper from "@/components/Popper/Popper.vue"; | ||
library.add(faExclamationCircle); | ||
const props = defineProps({ | ||
disabled: { | ||
type: Boolean, | ||
default: false, | ||
}, | ||
listExtensions: { | ||
type: Array, | ||
required: true, | ||
}, | ||
value: { | ||
type: String, | ||
default: null, | ||
}, | ||
}); | ||
const emit = defineEmits(["input"]); | ||
const details = computed(() => findExtension(props.listExtensions, props.value)); | ||
const warnText = computed(() => details.value.upload_warning); | ||
</script> | ||
|
||
<template> | ||
<span title=""> | ||
<UploadSelect | ||
:value="value" | ||
:disabled="disabled" | ||
:options="listExtensions" | ||
what="file type" | ||
placeholder="Select Type" | ||
:warn="warnText ? true : false" | ||
@input="(newValue) => emit('input', newValue)" /> | ||
<Popper v-if="warnText" placement="bottom" mode="light"> | ||
<template v-slot:reference> | ||
<FontAwesomeIcon icon="fa-exclamation-circle" class="selection-warning" /> | ||
</template> | ||
<div class="p-2"> | ||
{{ warnText }} | ||
</div> | ||
</Popper> | ||
<UploadExtension :extension="value" :list-extensions="listExtensions" /> | ||
</span> | ||
</template> | ||
|
||
<style lang="scss" scoped> | ||
@import "theme/blue.scss"; | ||
.selection-warning { | ||
color: $brand-warning; | ||
} | ||
</style> |
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