LCOV - code coverage report
Current view: top level - src/composables/sidebarTabs - useAssetsSidebarTab.ts Coverage Total Hit
Test: ComfyUI E2E Coverage Lines: 100.0 % 6 6
Test Date: 2026-11-17 04:17:53

            Line data    Source code
       1              : import { markRaw } from 'vue'
       2              : 
       3              : import AssetsSidebarTab from '@/components/sidebar/tabs/AssetsSidebarTab.vue'
       4              : import { useSettingStore } from '@/platform/settings/settingStore'
       5              : import { useAssetsSidebarBadgeStore } from '@/stores/workspace/assetsSidebarBadgeStore'
       6              : import type { SidebarTabExtension } from '@/types/extensionTypes'
       7              : 
       8         2355 : export const useAssetsSidebarTab = (): SidebarTabExtension => {
       9         2355 :   return {
      10              :     id: 'assets',
      11              :     icon: 'icon-[comfy--image-ai-edit]',
      12              :     title: 'sideToolbar.assets',
      13              :     tooltip: 'sideToolbar.assets',
      14              :     label: 'sideToolbar.labels.assets',
      15              :     component: markRaw(AssetsSidebarTab),
      16              :     type: 'vue',
      17              :     iconBadge: () => {
      18              :       const settingStore = useSettingStore()
      19              : 
      20         2095 :       if (!settingStore.get('Comfy.Queue.QPOV2')) {
      21         2083 :         return null
      22              :       }
      23              : 
      24              :       const assetsSidebarBadgeStore = useAssetsSidebarBadgeStore()
      25           12 :       const count = assetsSidebarBadgeStore.unseenAddedAssetsCount
      26         2095 :       return count > 0 ? count.toString() : null
      27              :     }
      28              :   }
      29              : }
        

Generated by: LCOV version 2.0-1