LCOV - code coverage report
Current view: top level - src/components/builder - VueNodeSwitchPopup.vue Coverage Total Hit
Test: ComfyUI E2E Coverage Lines: 100.0 % 9 9
Test Date: 2026-11-17 04:17:53

            Line data    Source code
       1              : <template>
       2              :   <NotificationPopup
       3         2363 :     v-if="appModeStore.showVueNodeSwitchPopup && !canvasStore.isPickingNodes"
       4              :     data-testid="linear-vue-node-switch-popup"
       5              :     :title="$t('appBuilder.vueNodeSwitch.title')"
       6              :     :close-label="$t('g.close')"
       7              :     position="bottom-left"
       8              :     @close="dismiss"
       9              :   >
      10              :     {{ $t('appBuilder.vueNodeSwitch.content') }}
      11              : 
      12              :     <template #footer-start>
      13              :       <label
      14              :         class="flex cursor-pointer items-center gap-2 text-sm text-muted-foreground"
      15              :       >
      16              :         <input
      17              :           v-model="dontShowAgain"
      18              :           type="checkbox"
      19              :           data-testid="linear-vue-node-switch-dont-show-again"
      20              :           class="accent-primary"
      21              :         />
      22              :         {{ $t('appBuilder.vueNodeSwitch.dontShowAgain') }}
      23              :       </label>
      24              :     </template>
      25              : 
      26              :     <template #footer-end>
      27              :       <Button
      28              :         variant="secondary"
      29              :         size="lg"
      30              :         data-testid="linear-vue-node-switch-dismiss"
      31              :         class="font-normal"
      32              :         @click="dismiss"
      33              :       >
      34              :         {{ $t('appBuilder.vueNodeSwitch.dismiss') }}
      35              :       </Button>
      36              :     </template>
      37              :   </NotificationPopup>
      38              : </template>
      39              : 
      40              : <script setup lang="ts">
      41              : import { ref } from 'vue'
      42              : 
      43              : import NotificationPopup from '@comfyorg/design-system/common/NotificationPopup'
      44              : import Button from '@comfyorg/design-system/button/Button'
      45              : import { useSettingStore } from '@/platform/settings/settingStore'
      46              : import { useCanvasStore } from '@/renderer/core/canvas/canvasStore'
      47              : import { useAppModeStore } from '@/stores/appModeStore'
      48              : 
      49         2355 : const appModeStore = useAppModeStore()
      50              : // Node selection mode keeps the canvas clear of everything but the graph and
      51              : // its own banner, so this popup steps aside for the duration and returns after.
      52         2355 : const canvasStore = useCanvasStore()
      53         2355 : const settingStore = useSettingStore()
      54         2355 : const dontShowAgain = ref(false)
      55              : 
      56            2 : function dismiss() {
      57            2 :   if (dontShowAgain.value) {
      58            1 :     void settingStore.set('Comfy.AppBuilder.VueNodeSwitchDismissed', true)
      59              :   }
      60            2 :   appModeStore.showVueNodeSwitchPopup = false
      61              : }
      62              : </script>
        

Generated by: LCOV version 2.0-1