mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 14:30:41 +00:00
## Summary Users were finding the final step of the builder flow confusing/misleading, with the "choose default mode" not actually saving the workflow and people losing changes. This updates it to remove "save"/"set default" as a step in the builder, and changes it to a distinct action. ## Changes - **What**: - add mode selection tab on footer toolbar - extract reusable radio group component - remove setting default mode dialog - add save/save as/saved dialogs ## Screenshots (if applicable) https://github.com/user-attachments/assets/c7439c2e-a917-4f2b-b176-f8bb8c10026d ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-10439-feat-App-mode-Rework-save-flow-32d6d73d3650814781b6c7bbea685a97) by [Unito](https://www.unito.io)
34 lines
1.0 KiB
TypeScript
34 lines
1.0 KiB
TypeScript
import ConfirmBody from '@/components/dialog/confirm/ConfirmBody.vue'
|
|
import ConfirmFooter from '@/components/dialog/confirm/ConfirmFooter.vue'
|
|
import ConfirmHeader from '@/components/dialog/confirm/ConfirmHeader.vue'
|
|
import { useDialogStore } from '@/stores/dialogStore'
|
|
import type { ComponentAttrs } from 'vue-component-type-helpers'
|
|
|
|
interface ConfirmDialogOptions {
|
|
key?: string
|
|
headerProps?: ComponentAttrs<typeof ConfirmHeader>
|
|
props?: ComponentAttrs<typeof ConfirmBody>
|
|
footerProps?: ComponentAttrs<typeof ConfirmFooter>
|
|
}
|
|
|
|
export function showConfirmDialog(options: ConfirmDialogOptions = {}) {
|
|
const dialogStore = useDialogStore()
|
|
const { key, headerProps, props, footerProps } = options
|
|
return dialogStore.showDialog({
|
|
key,
|
|
headerComponent: ConfirmHeader,
|
|
component: ConfirmBody,
|
|
footerComponent: ConfirmFooter,
|
|
headerProps,
|
|
props,
|
|
footerProps,
|
|
dialogComponentProps: {
|
|
pt: {
|
|
header: 'py-0! px-0!',
|
|
content: 'p-0!',
|
|
footer: 'p-0!'
|
|
}
|
|
}
|
|
})
|
|
}
|