Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/components/TopMenuSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ import { useCurrentUser } from '@/composables/auth/useCurrentUser'
import { useErrorHandling } from '@/composables/useErrorHandling'
import { buildTooltipConfig } from '@/composables/useTooltipConfig'
import { app } from '@/scripts/app'
import { useQueueStore } from '@/stores/queueStore'
import { useCommandStore } from '@/stores/commandStore'
import { useQueueStore, useQueueUIStore } from '@/stores/queueStore'
import { useRightSidePanelStore } from '@/stores/workspace/rightSidePanelStore'
import { useWorkspaceStore } from '@/stores/workspaceStore'
import { isElectron } from '@/utils/envUtil'
Expand All @@ -106,8 +107,10 @@ const { isLoggedIn } = useCurrentUser()
const isDesktop = isElectron()
const { t } = useI18n()
const { toastErrorHandler } = useErrorHandling()
const isQueueOverlayExpanded = ref(false)
const commandStore = useCommandStore()
const queueStore = useQueueStore()
const queueUIStore = useQueueUIStore()
const { isOverlayExpanded: isQueueOverlayExpanded } = storeToRefs(queueUIStore)
const isTopMenuHovered = ref(false)
const queuedCount = computed(() => queueStore.pendingTasks.length)
const queueHistoryTooltipConfig = computed(() =>
Expand All @@ -133,7 +136,7 @@ onMounted(() => {
})

const toggleQueueOverlay = () => {
isQueueOverlayExpanded.value = !isQueueOverlayExpanded.value
commandStore.execute('Comfy.Queue.ToggleOverlay')
}

const openCustomNodeManager = async () => {
Expand Down
17 changes: 16 additions & 1 deletion src/composables/useCoreCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ import { useLitegraphService } from '@/services/litegraphService'
import type { ComfyCommand } from '@/stores/commandStore'
import { useExecutionStore } from '@/stores/executionStore'
import { useHelpCenterStore } from '@/stores/helpCenterStore'
import { useQueueSettingsStore, useQueueStore } from '@/stores/queueStore'
import {
useQueueSettingsStore,
useQueueStore,
useQueueUIStore
} from '@/stores/queueStore'
import { useSubgraphNavigationStore } from '@/stores/subgraphNavigationStore'
import { useSubgraphStore } from '@/stores/subgraphStore'
import { useBottomPanelStore } from '@/stores/workspace/bottomPanelStore'
Expand Down Expand Up @@ -423,6 +427,17 @@ export function useCoreCommands(): ComfyCommand[] {
},
active: () => useSettingStore().get('Comfy.Minimap.Visible')
},
{
id: 'Comfy.Queue.ToggleOverlay',
icon: 'pi pi-history',
label: 'Toggle Job History',
menubarLabel: 'Job History',
Comment thread
kaili-yang marked this conversation as resolved.
Outdated
versionAdded: '1.37.0',
function: () => {
useQueueUIStore().toggleOverlay()
},
active: () => useQueueUIStore().isOverlayExpanded
Comment thread
kaili-yang marked this conversation as resolved.
},
Comment thread
kaili-yang marked this conversation as resolved.
{
id: 'Comfy.QueuePrompt',
icon: 'pi pi-play',
Expand Down
10 changes: 10 additions & 0 deletions src/stores/queueStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -618,3 +618,13 @@ export const useQueueSettingsStore = defineStore('queueSettingsStore', {
batchCount: 1
})
})

export const useQueueUIStore = defineStore('queueUIStore', () => {
const isOverlayExpanded = ref(false)

function toggleOverlay() {
isOverlayExpanded.value = !isOverlayExpanded.value
}

return { isOverlayExpanded, toggleOverlay }
})