mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 06:20:11 +00:00
Fixes typecheck errors introduced by recent backports: 1. MultiSelect.vue / SingleSelect.vue (#10397): Replaced with correct Reka UI versions 2. BuilderSaveDialogContent.vue / ViewTypeRadioGroup.vue (#10679): Added missing files 3. confirmDialog.ts (#10679): Added key property to ConfirmDialogOptions 4. App.vue (#10445): Removed unused imports Verified: pnpm typecheck passes.
72 lines
1.9 KiB
Vue
72 lines
1.9 KiB
Vue
<template>
|
|
<BuilderDialog @close="emit('close')">
|
|
<template #title>
|
|
{{ $t('builderToolbar.saveAs') }}
|
|
</template>
|
|
|
|
<div class="flex flex-col gap-2">
|
|
<label :for="inputId" class="text-sm text-muted-foreground">
|
|
{{ $t('builderToolbar.filename') }}
|
|
</label>
|
|
<input
|
|
:id="inputId"
|
|
v-model="filename"
|
|
autofocus
|
|
type="text"
|
|
class="focus-visible:ring-ring flex h-10 min-h-8 items-center self-stretch rounded-lg border-none bg-secondary-background pl-4 text-sm text-base-foreground"
|
|
@keydown.enter="
|
|
filename.trim() && emit('save', filename.trim(), openAsApp)
|
|
"
|
|
/>
|
|
</div>
|
|
|
|
<div class="flex flex-col gap-2">
|
|
<label :id="radioGroupLabelId" class="text-sm text-muted-foreground">
|
|
{{ $t('builderToolbar.defaultViewLabel') }}
|
|
</label>
|
|
<ViewTypeRadioGroup
|
|
v-model="openAsApp"
|
|
:aria-labelledby="radioGroupLabelId"
|
|
/>
|
|
</div>
|
|
|
|
<template #footer>
|
|
<Button variant="muted-textonly" size="lg" @click="emit('close')">
|
|
{{ $t('g.cancel') }}
|
|
</Button>
|
|
<Button
|
|
variant="secondary"
|
|
size="lg"
|
|
:disabled="!filename.trim()"
|
|
@click="emit('save', filename.trim(), openAsApp)"
|
|
>
|
|
{{ $t('g.save') }}
|
|
</Button>
|
|
</template>
|
|
</BuilderDialog>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { ref, useId } from 'vue'
|
|
|
|
import Button from '@/components/ui/button/Button.vue'
|
|
|
|
import BuilderDialog from './BuilderDialog.vue'
|
|
import ViewTypeRadioGroup from './ViewTypeRadioGroup.vue'
|
|
|
|
const { defaultFilename, defaultOpenAsApp = true } = defineProps<{
|
|
defaultFilename: string
|
|
defaultOpenAsApp?: boolean
|
|
}>()
|
|
|
|
const emit = defineEmits<{
|
|
save: [filename: string, openAsApp: boolean]
|
|
close: []
|
|
}>()
|
|
|
|
const inputId = useId()
|
|
const radioGroupLabelId = useId()
|
|
const filename = ref(defaultFilename)
|
|
const openAsApp = ref(defaultOpenAsApp)
|
|
</script>
|