Add keybind hint to confirm close dialog (#2529)

Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
bymyself
2025-02-12 08:02:27 -07:00
committed by GitHub
parent 29cd693335
commit bfec9b692b
10 changed files with 33 additions and 6 deletions

View File

@@ -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