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.
Decompose SelectObjectStore for reuse of visual elements.
- Loading branch information
Showing
2 changed files
with
37 additions
and
14 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
client/src/components/ObjectStore/ObjectStoreSelectButton.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,29 @@ | ||
<script setup lang="ts"> | ||
import { BButton } from "bootstrap-vue"; | ||
import { type ConcreteObjectStoreModel } from "@/api"; | ||
import ObjectStoreBadges from "@/components/ObjectStore/ObjectStoreBadges.vue"; | ||
import ProvidedQuotaSourceUsageBar from "@/components/User/DiskUsage/Quota/ProvidedQuotaSourceUsageBar.vue"; | ||
interface ObjectStoreSelectButtonProps { | ||
objectStore: ConcreteObjectStoreModel; | ||
variant: string; | ||
} | ||
defineProps<ObjectStoreSelectButtonProps>(); | ||
const emit = defineEmits<{ | ||
(e: "click", value: string): void; | ||
}>(); | ||
</script> | ||
|
||
<template> | ||
<BButton | ||
:variant="variant" | ||
:data-object-store-id="objectStore.object_store_id" | ||
@click="emit('click', objectStore.object_store_id)" | ||
>{{ objectStore.name }} | ||
<ObjectStoreBadges :badges="objectStore.badges" size="lg" :more-on-hover="false" /> | ||
<ProvidedQuotaSourceUsageBar :object-store="objectStore" :compact="true"> </ProvidedQuotaSourceUsageBar> | ||
</BButton> | ||
</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