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#17441 from itisAliRH/commons-composi…
…tion-ts-refactor Refactor Common components
- Loading branch information
Showing
17 changed files
with
544 additions
and
407 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,45 @@ | ||
<script setup lang="ts"> | ||
import { library } from "@fortawesome/fontawesome-svg-core"; | ||
import { faPlay, faSpinner } from "@fortawesome/free-solid-svg-icons"; | ||
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome"; | ||
import { BButton } from "bootstrap-vue"; | ||
library.add(faPlay, faSpinner); | ||
interface Props { | ||
title: string; | ||
wait?: boolean; | ||
tooltip?: string; | ||
disabled?: boolean; | ||
} | ||
withDefaults(defineProps<Props>(), { | ||
wait: false, | ||
tooltip: undefined, | ||
disabled: false, | ||
}); | ||
</script> | ||
|
||
<template> | ||
<b-button | ||
<BButton | ||
v-if="wait" | ||
v-b-tooltip.hover.bottom | ||
disabled | ||
variant="info" | ||
title="Please Wait..." | ||
class="d-flex flex-nowrap align-items-center text-nowrap"> | ||
<FontAwesomeIcon icon="spinner" class="mr-2" spin />{{ title }} | ||
</b-button> | ||
<b-button | ||
<FontAwesomeIcon :icon="faSpinner" class="mr-2" spin /> | ||
{{ title }} | ||
</BButton> | ||
<BButton | ||
v-else | ||
v-b-tooltip.hover.bottom | ||
variant="primary" | ||
class="d-flex flex-nowrap align-items-center text-nowrap" | ||
:title="tooltip" | ||
:disabled="disabled" | ||
@click="$emit('onClick')"> | ||
<FontAwesomeIcon icon="play" class="mr-2" />{{ title }} | ||
</b-button> | ||
<FontAwesomeIcon :icon="faPlay" class="mr-2" /> | ||
{{ title }} | ||
</BButton> | ||
</template> | ||
<script> | ||
import { library } from "@fortawesome/fontawesome-svg-core"; | ||
import { faPlay, faSpinner } from "@fortawesome/free-solid-svg-icons"; | ||
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome"; | ||
library.add(faSpinner); | ||
library.add(faPlay); | ||
export default { | ||
components: { | ||
FontAwesomeIcon, | ||
}, | ||
props: { | ||
title: { | ||
type: String, | ||
required: true, | ||
}, | ||
wait: { | ||
type: Boolean, | ||
default: false, | ||
}, | ||
tooltip: { | ||
type: String, | ||
default: null, | ||
}, | ||
disabled: { | ||
type: Boolean, | ||
default: false, | ||
}, | ||
}, | ||
}; | ||
</script> |
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.