mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
hide annotation and tags if no pinned histories in multiview
This commit is contained in:
@@ -11,7 +11,7 @@ import UtcDate from "@/components/UtcDate.vue";
|
||||
interface Props {
|
||||
history: HistorySummary;
|
||||
writeable: boolean;
|
||||
summarized?: "both" | "annotation" | "tags" | "none";
|
||||
summarized?: "both" | "annotation" | "tags" | "none" | "hidden";
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
|
||||
@@ -20,7 +20,7 @@ interface Props {
|
||||
writeable?: boolean;
|
||||
annotation?: string;
|
||||
showAnnotation?: boolean;
|
||||
summarized?: "both" | "annotation" | "tags" | "none";
|
||||
summarized?: "both" | "annotation" | "tags" | "none" | "hidden";
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
@@ -125,7 +125,9 @@ function selectText() {
|
||||
v-short="annotation"
|
||||
class="mt-2"
|
||||
data-description="annotation value" />
|
||||
<div v-else-if="summarized" :class="{ annotation: ['both', 'annotation'].includes(summarized) }">
|
||||
<div
|
||||
v-else-if="summarized"
|
||||
:class="{ annotation: ['both', 'annotation'].includes(summarized), hidden: summarized === 'hidden' }">
|
||||
<TextSummary
|
||||
v-if="annotation"
|
||||
:description="annotation"
|
||||
@@ -135,7 +137,11 @@ function selectText() {
|
||||
</div>
|
||||
<StatelessTags
|
||||
v-if="tags"
|
||||
:class="{ 'mt-2': !summarized, tags: ['both', 'tags'].includes(summarized) }"
|
||||
:class="{
|
||||
'mt-2': !summarized,
|
||||
tags: ['both', 'tags'].includes(summarized),
|
||||
hidden: summarized === 'hidden',
|
||||
}"
|
||||
:value="tags"
|
||||
disabled
|
||||
:max-visible-tags="summarized ? 1 : 5" />
|
||||
@@ -206,5 +212,8 @@ function selectText() {
|
||||
.annotation {
|
||||
min-height: 2rem;
|
||||
}
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -102,6 +102,10 @@ export const useHistoryStore = defineStore("historyStore", () => {
|
||||
let tags = false;
|
||||
let loaded = true;
|
||||
|
||||
if (pinnedHistories.value.length === 0) {
|
||||
return "hidden";
|
||||
}
|
||||
|
||||
for (const h of pinnedHistories.value) {
|
||||
const history = storedHistories.value[h.id];
|
||||
if (!history) {
|
||||
|
||||
Reference in New Issue
Block a user