Line data Source code
1 16 : <template>
2 : <div class="flex flex-col gap-3 rounded-lg">
3 : <CollapsibleRoot
4 : v-model:open="isWarningExpanded"
5 : class="overflow-hidden rounded-lg bg-secondary"
6 : >
7 : <CollapsibleTrigger as-child>
8 : <Button
9 : variant="secondary"
10 : class="w-full justify-between px-4 py-1 text-sm"
11 : >
12 : <i
13 : class="icon-[lucide--circle-alert] text-warning"
14 : aria-hidden="true"
15 : />
16 : <span class="flex-1 text-left text-sm text-muted-foreground">
17 : {{ $t('shareWorkflow.privateAssetsDescription') }}
18 : </span>
19 :
20 : <i
21 : :class="
22 : cn(
23 : 'icon-[lucide--chevron-right] text-muted-foreground transition-transform',
24 : isWarningExpanded && 'rotate-90'
25 : )
26 : "
27 : />
28 : </Button>
29 : </CollapsibleTrigger>
30 :
31 : <CollapsibleContent
32 : class="overflow-hidden data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down"
33 : >
34 : <AssetSectionList :items />
35 : </CollapsibleContent>
36 : </CollapsibleRoot>
37 :
38 : <label class="mt-3 flex cursor-pointer items-center gap-2">
39 : <input
40 : v-model="acknowledged"
41 : type="checkbox"
42 : class="size-3.5 shrink-0 cursor-pointer accent-primary"
43 : />
44 : <span class="text-sm text-muted-foreground">
45 : {{ $t('shareWorkflow.acknowledgeCheckbox') }}
46 : </span>
47 : </label>
48 : </div>
49 : </template>
50 :
51 : <script setup lang="ts">
52 : import {
53 : CollapsibleContent,
54 : CollapsibleRoot,
55 : CollapsibleTrigger
56 : } from 'reka-ui'
57 : import { ref } from 'vue'
58 :
59 : import type { AssetInfo } from '@comfyorg/ingest-types'
60 : import AssetSectionList from '@/platform/workflow/sharing/components/AssetSectionList.vue'
61 : import { cn } from '@comfyorg/tailwind-utils'
62 : import Button from '@comfyorg/design-system/button/Button'
63 :
64 : const { items } = defineProps<{
65 : items: AssetInfo[]
66 : }>()
67 :
68 1 : const acknowledged = defineModel<boolean>('acknowledged')
69 :
70 1 : const isWarningExpanded = ref(true)
71 : </script>
|