mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-29 10:42:44 +00:00
feat: add red dot indicator to top menu custom nodes manager button (#7896)
This commit is contained in:
@@ -20,9 +20,14 @@
|
|||||||
variant="secondary"
|
variant="secondary"
|
||||||
size="icon"
|
size="icon"
|
||||||
:aria-label="t('menu.customNodesManager')"
|
:aria-label="t('menu.customNodesManager')"
|
||||||
|
class="relative"
|
||||||
@click="openCustomNodeManager"
|
@click="openCustomNodeManager"
|
||||||
>
|
>
|
||||||
<i class="icon-[lucide--puzzle] size-4" />
|
<i class="icon-[lucide--puzzle] size-4" />
|
||||||
|
<span
|
||||||
|
v-if="shouldShowRedDot"
|
||||||
|
class="absolute top-0.5 right-1 size-2 rounded-full bg-red-500"
|
||||||
|
/>
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -91,12 +96,14 @@ import Button from '@/components/ui/button/Button.vue'
|
|||||||
import { useCurrentUser } from '@/composables/auth/useCurrentUser'
|
import { useCurrentUser } from '@/composables/auth/useCurrentUser'
|
||||||
import { useErrorHandling } from '@/composables/useErrorHandling'
|
import { useErrorHandling } from '@/composables/useErrorHandling'
|
||||||
import { buildTooltipConfig } from '@/composables/useTooltipConfig'
|
import { buildTooltipConfig } from '@/composables/useTooltipConfig'
|
||||||
|
import { useReleaseStore } from '@/platform/updates/common/releaseStore'
|
||||||
import { app } from '@/scripts/app'
|
import { app } from '@/scripts/app'
|
||||||
import { useCommandStore } from '@/stores/commandStore'
|
import { useCommandStore } from '@/stores/commandStore'
|
||||||
import { useQueueStore, useQueueUIStore } from '@/stores/queueStore'
|
import { useQueueStore, useQueueUIStore } from '@/stores/queueStore'
|
||||||
import { useRightSidePanelStore } from '@/stores/workspace/rightSidePanelStore'
|
import { useRightSidePanelStore } from '@/stores/workspace/rightSidePanelStore'
|
||||||
import { useWorkspaceStore } from '@/stores/workspaceStore'
|
import { useWorkspaceStore } from '@/stores/workspaceStore'
|
||||||
import { isElectron } from '@/utils/envUtil'
|
import { isElectron } from '@/utils/envUtil'
|
||||||
|
import { useConflictAcknowledgment } from '@/workbench/extensions/manager/composables/useConflictAcknowledgment'
|
||||||
import { useManagerState } from '@/workbench/extensions/manager/composables/useManagerState'
|
import { useManagerState } from '@/workbench/extensions/manager/composables/useManagerState'
|
||||||
import { ManagerTab } from '@/workbench/extensions/manager/types/comfyManagerTypes'
|
import { ManagerTab } from '@/workbench/extensions/manager/types/comfyManagerTypes'
|
||||||
|
|
||||||
@@ -111,6 +118,10 @@ const commandStore = useCommandStore()
|
|||||||
const queueStore = useQueueStore()
|
const queueStore = useQueueStore()
|
||||||
const queueUIStore = useQueueUIStore()
|
const queueUIStore = useQueueUIStore()
|
||||||
const { isOverlayExpanded: isQueueOverlayExpanded } = storeToRefs(queueUIStore)
|
const { isOverlayExpanded: isQueueOverlayExpanded } = storeToRefs(queueUIStore)
|
||||||
|
const releaseStore = useReleaseStore()
|
||||||
|
const { shouldShowRedDot: showReleaseRedDot } = storeToRefs(releaseStore)
|
||||||
|
const { shouldShowRedDot: shouldShowConflictRedDot } =
|
||||||
|
useConflictAcknowledgment()
|
||||||
const isTopMenuHovered = ref(false)
|
const isTopMenuHovered = ref(false)
|
||||||
const queuedCount = computed(() => queueStore.pendingTasks.length)
|
const queuedCount = computed(() => queueStore.pendingTasks.length)
|
||||||
const queueHistoryTooltipConfig = computed(() =>
|
const queueHistoryTooltipConfig = computed(() =>
|
||||||
@@ -120,6 +131,12 @@ const customNodesManagerTooltipConfig = computed(() =>
|
|||||||
buildTooltipConfig(t('menu.customNodesManager'))
|
buildTooltipConfig(t('menu.customNodesManager'))
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Use either release red dot or conflict red dot
|
||||||
|
const shouldShowRedDot = computed((): boolean => {
|
||||||
|
const releaseRedDot = showReleaseRedDot.value
|
||||||
|
return releaseRedDot || shouldShowConflictRedDot.value
|
||||||
|
})
|
||||||
|
|
||||||
// Right side panel toggle
|
// Right side panel toggle
|
||||||
const { isOpen: isRightSidePanelOpen } = storeToRefs(rightSidePanelStore)
|
const { isOpen: isRightSidePanelOpen } = storeToRefs(rightSidePanelStore)
|
||||||
const rightSidePanelTooltipConfig = computed(() =>
|
const rightSidePanelTooltipConfig = computed(() =>
|
||||||
|
|||||||
Reference in New Issue
Block a user