|
| 1 | +<template> |
| 2 | + <div class="flex flex-col gap-12 p-2 w-96"> |
| 3 | + <img src="@/assets/images/api-nodes-news.webp" alt="API Nodes News" /> |
| 4 | + <div class="flex flex-col gap-2 justify-center items-center"> |
| 5 | + <div class="text-xl"> |
| 6 | + {{ $t('apiNodesNews.introducing') }} |
| 7 | + <span class="text-amber-500">API NODES</span> |
| 8 | + </div> |
| 9 | + <div class="text-muted">{{ $t('apiNodesNews.subtitle') }}</div> |
| 10 | + </div> |
| 11 | + |
| 12 | + <div class="flex flex-col gap-4"> |
| 13 | + <div |
| 14 | + v-for="(step, index) in steps" |
| 15 | + :key="index" |
| 16 | + class="grid grid-cols-[auto_1fr] gap-2 items-center" |
| 17 | + > |
| 18 | + <Tag class="w-8 h-8" :value="index + 1" rounded /> |
| 19 | + <div class="flex flex-col gap-2"> |
| 20 | + <div>{{ step.title }}</div> |
| 21 | + <div v-if="step.subtitle" class="text-muted"> |
| 22 | + {{ step.subtitle }} |
| 23 | + </div> |
| 24 | + </div> |
| 25 | + </div> |
| 26 | + </div> |
| 27 | + |
| 28 | + <div class="flex flex-row justify-between"> |
| 29 | + <Button label="Learn More" text @click="handleLearnMore" /> |
| 30 | + <Button label="Close" @click="onClose" /> |
| 31 | + </div> |
| 32 | + </div> |
| 33 | +</template> |
| 34 | + |
| 35 | +<script setup lang="ts"> |
| 36 | +import Button from 'primevue/button' |
| 37 | +import Tag from 'primevue/tag' |
| 38 | +import { useI18n } from 'vue-i18n' |
| 39 | +
|
| 40 | +const { t } = useI18n() |
| 41 | +
|
| 42 | +const steps: { |
| 43 | + title: string |
| 44 | + subtitle?: string |
| 45 | +}[] = [ |
| 46 | + { |
| 47 | + title: t('apiNodesNews.steps.step1.title'), |
| 48 | + subtitle: t('apiNodesNews.steps.step1.subtitle') |
| 49 | + }, |
| 50 | + { |
| 51 | + title: t('apiNodesNews.steps.step2.title'), |
| 52 | + subtitle: t('apiNodesNews.steps.step2.subtitle') |
| 53 | + }, |
| 54 | + { |
| 55 | + title: t('apiNodesNews.steps.step3.title') |
| 56 | + }, |
| 57 | + { |
| 58 | + title: t('apiNodesNews.steps.step4.title') |
| 59 | + } |
| 60 | +] |
| 61 | +
|
| 62 | +const { onClose } = defineProps<{ |
| 63 | + onClose: () => void |
| 64 | +}>() |
| 65 | +
|
| 66 | +const handleLearnMore = () => { |
| 67 | + window.open('https://blog.comfy.org/', '_blank') |
| 68 | +} |
| 69 | +</script> |
0 commit comments