mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-29 18:52:19 +00:00
[backport core/1.38] Fix: Hide Jobs in Assets Panel when Queue V2 is disabled. (#8485)
Backport of #8450 to `core/1.38` Automatically created by backport workflow. Co-authored-by: Alexander Brown <drjkl@comfy.org>
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
<div class="flex h-full flex-col">
|
<div class="flex h-full flex-col">
|
||||||
<!-- Active Jobs Grid -->
|
<!-- Active Jobs Grid -->
|
||||||
<div
|
<div
|
||||||
v-if="activeJobItems.length"
|
v-if="isQueuePanelV2Enabled && activeJobItems.length"
|
||||||
class="grid max-h-[50%] scrollbar-custom overflow-y-auto"
|
class="grid max-h-[50%] scrollbar-custom overflow-y-auto"
|
||||||
:style="gridStyle"
|
:style="gridStyle"
|
||||||
>
|
>
|
||||||
@@ -65,6 +65,7 @@ import MediaAssetCard from '@/platform/assets/components/MediaAssetCard.vue'
|
|||||||
import type { AssetItem } from '@/platform/assets/schemas/assetSchema'
|
import type { AssetItem } from '@/platform/assets/schemas/assetSchema'
|
||||||
import { isActiveJobState } from '@/utils/queueUtil'
|
import { isActiveJobState } from '@/utils/queueUtil'
|
||||||
import { cn } from '@/utils/tailwindUtil'
|
import { cn } from '@/utils/tailwindUtil'
|
||||||
|
import { useSettingStore } from '@/platform/settings/settingStore'
|
||||||
|
|
||||||
const {
|
const {
|
||||||
assets,
|
assets,
|
||||||
@@ -90,6 +91,11 @@ const emit = defineEmits<{
|
|||||||
|
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
const { jobItems } = useJobList()
|
const { jobItems } = useJobList()
|
||||||
|
const settingStore = useSettingStore()
|
||||||
|
|
||||||
|
const isQueuePanelV2Enabled = computed(() =>
|
||||||
|
settingStore.get('Comfy.Queue.QPOV2')
|
||||||
|
)
|
||||||
|
|
||||||
type AssetGridItem = { key: string; asset: AssetItem }
|
type AssetGridItem = { key: string; asset: AssetItem }
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="flex h-full flex-col">
|
<div class="flex h-full flex-col">
|
||||||
<div
|
<div
|
||||||
v-if="activeJobItems.length"
|
v-if="isQueuePanelV2Enabled && activeJobItems.length"
|
||||||
class="flex max-h-[50%] scrollbar-custom flex-col gap-2 overflow-y-auto px-2"
|
class="flex max-h-[50%] scrollbar-custom flex-col gap-2 overflow-y-auto px-2"
|
||||||
>
|
>
|
||||||
<AssetsListItem
|
<AssetsListItem
|
||||||
@@ -133,6 +133,7 @@ import {
|
|||||||
} from '@/utils/formatUtil'
|
} from '@/utils/formatUtil'
|
||||||
import { iconForJobState } from '@/utils/queueDisplay'
|
import { iconForJobState } from '@/utils/queueDisplay'
|
||||||
import { cn } from '@/utils/tailwindUtil'
|
import { cn } from '@/utils/tailwindUtil'
|
||||||
|
import { useSettingStore } from '@/platform/settings/settingStore'
|
||||||
|
|
||||||
const {
|
const {
|
||||||
assets,
|
assets,
|
||||||
@@ -154,6 +155,11 @@ const emit = defineEmits<{
|
|||||||
|
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
const { jobItems } = useJobList()
|
const { jobItems } = useJobList()
|
||||||
|
const settingStore = useSettingStore()
|
||||||
|
|
||||||
|
const isQueuePanelV2Enabled = computed(() =>
|
||||||
|
settingStore.get('Comfy.Queue.QPOV2')
|
||||||
|
)
|
||||||
const hoveredJobId = ref<string | null>(null)
|
const hoveredJobId = ref<string | null>(null)
|
||||||
const hoveredAssetId = ref<string | null>(null)
|
const hoveredAssetId = ref<string | null>(null)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user