mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-22 23:39:45 +00:00
Add keybind hint to confirm close dialog (#2529)
Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
<script setup lang="ts">
|
||||
import Button from 'primevue/button'
|
||||
import { ref } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
import {
|
||||
usePragmaticDraggable,
|
||||
@@ -51,6 +52,8 @@ const props = defineProps<{
|
||||
workflowOption: WorkflowOption
|
||||
}>()
|
||||
|
||||
const { t } = useI18n()
|
||||
|
||||
const workspaceStore = useWorkspaceStore()
|
||||
const workflowStore = useWorkflowStore()
|
||||
const workflowTabRef = ref<HTMLElement | null>(null)
|
||||
@@ -59,7 +62,8 @@ const closeWorkflows = async (options: WorkflowOption[]) => {
|
||||
for (const opt of options) {
|
||||
if (
|
||||
!(await useWorkflowService().closeWorkflow(opt.workflow, {
|
||||
warnIfUnsaved: !workspaceStore.shiftDown
|
||||
warnIfUnsaved: !workspaceStore.shiftDown,
|
||||
hint: t('sideToolbar.workflowTab.dirtyCloseHint')
|
||||
}))
|
||||
) {
|
||||
// User clicked cancel
|
||||
|
||||
Reference in New Issue
Block a user