mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-19 22:09:37 +00:00
## Summary Implements save flow for the builder toolbar. The todo will be done in a future PR once the serailized format is finalized ## Screenshots (if applicable) https://github.com/user-attachments/assets/124cb7d8-e23b-476a-8691-0ee2c4c9150b ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-9030-App-mode-builder-toolbar-save-7-30d6d73d3650815e8610fced20e95e6e) by [Unito](https://www.unito.io)
52 lines
1.3 KiB
Vue
52 lines
1.3 KiB
Vue
<template>
|
|
<BuilderDialog @close="onClose">
|
|
<template #header-icon>
|
|
<i class="icon-[lucide--circle-check-big] size-4 text-green-500" />
|
|
</template>
|
|
<template #title>
|
|
{{ $t('builderToolbar.saveSuccess') }}
|
|
</template>
|
|
|
|
<p v-if="savedAsApp" class="m-0 text-sm text-muted-foreground">
|
|
{{ $t('builderToolbar.saveSuccessAppMessage', { name: workflowName }) }}
|
|
</p>
|
|
<p v-if="savedAsApp" class="m-0 text-sm text-muted-foreground">
|
|
{{ $t('builderToolbar.saveSuccessAppPrompt') }}
|
|
</p>
|
|
<p v-else class="m-0 text-sm text-muted-foreground">
|
|
{{ $t('builderToolbar.saveSuccessGraphMessage', { name: workflowName }) }}
|
|
</p>
|
|
|
|
<template #footer>
|
|
<Button
|
|
:variant="savedAsApp ? 'muted-textonly' : 'secondary'"
|
|
size="lg"
|
|
@click="onClose"
|
|
>
|
|
{{ $t('g.close') }}
|
|
</Button>
|
|
<Button
|
|
v-if="savedAsApp && onViewApp"
|
|
variant="primary"
|
|
size="lg"
|
|
@click="onViewApp"
|
|
>
|
|
{{ $t('builderToolbar.viewApp') }}
|
|
</Button>
|
|
</template>
|
|
</BuilderDialog>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import Button from '@/components/ui/button/Button.vue'
|
|
|
|
import BuilderDialog from './BuilderDialog.vue'
|
|
|
|
defineProps<{
|
|
workflowName: string
|
|
savedAsApp: boolean
|
|
onViewApp?: () => void
|
|
onClose: () => void
|
|
}>()
|
|
</script>
|