Skip to content

Commit 8322177

Browse files
comfy-pr-botDrJKL
andauthored
[backport core/1.38] Fix: Hide Jobs in Assets Panel when Queue V2 is disabled. (Comfy-Org#8485)
Backport of Comfy-Org#8450 to `core/1.38` Automatically created by backport workflow. Co-authored-by: Alexander Brown <drjkl@comfy.org>
1 parent de9fd77 commit 8322177

2 files changed

Lines changed: 14 additions & 2 deletions

File tree

src/components/sidebar/tabs/AssetsSidebarGridView.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<div class="flex h-full flex-col">
33
<!-- Active Jobs Grid -->
44
<div
5-
v-if="activeJobItems.length"
5+
v-if="isQueuePanelV2Enabled && activeJobItems.length"
66
class="grid max-h-[50%] scrollbar-custom overflow-y-auto"
77
:style="gridStyle"
88
>
@@ -65,6 +65,7 @@ import MediaAssetCard from '@/platform/assets/components/MediaAssetCard.vue'
6565
import type { AssetItem } from '@/platform/assets/schemas/assetSchema'
6666
import { isActiveJobState } from '@/utils/queueUtil'
6767
import { cn } from '@/utils/tailwindUtil'
68+
import { useSettingStore } from '@/platform/settings/settingStore'
6869
6970
const {
7071
assets,
@@ -90,6 +91,11 @@ const emit = defineEmits<{
9091
9192
const { t } = useI18n()
9293
const { jobItems } = useJobList()
94+
const settingStore = useSettingStore()
95+
96+
const isQueuePanelV2Enabled = computed(() =>
97+
settingStore.get('Comfy.Queue.QPOV2')
98+
)
9399
94100
type AssetGridItem = { key: string; asset: AssetItem }
95101

src/components/sidebar/tabs/AssetsSidebarListView.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<div class="flex h-full flex-col">
33
<div
4-
v-if="activeJobItems.length"
4+
v-if="isQueuePanelV2Enabled && activeJobItems.length"
55
class="flex max-h-[50%] scrollbar-custom flex-col gap-2 overflow-y-auto px-2"
66
>
77
<AssetsListItem
@@ -133,6 +133,7 @@ import {
133133
} from '@/utils/formatUtil'
134134
import { iconForJobState } from '@/utils/queueDisplay'
135135
import { cn } from '@/utils/tailwindUtil'
136+
import { useSettingStore } from '@/platform/settings/settingStore'
136137
137138
const {
138139
assets,
@@ -154,6 +155,11 @@ const emit = defineEmits<{
154155
155156
const { t } = useI18n()
156157
const { jobItems } = useJobList()
158+
const settingStore = useSettingStore()
159+
160+
const isQueuePanelV2Enabled = computed(() =>
161+
settingStore.get('Comfy.Queue.QPOV2')
162+
)
157163
const hoveredJobId = ref<string | null>(null)
158164
const hoveredAssetId = ref<string | null>(null)
159165

0 commit comments

Comments
 (0)