This commit is contained in:
pa
2026-01-23 15:55:43 +09:00
parent 739418733d
commit c4f75e50d7
7 changed files with 85 additions and 60 deletions

View File

@@ -107,6 +107,21 @@ export const useUiStore = defineStore('Ui', () => {
dialogCrumbs.value = [];
}
function openDialog({
type,
id,
label = '',
skipBreadcrumb = false,
hadActiveDialog = false
}) {
if (!hadActiveDialog) {
clearDialogCrumbs();
}
if (!skipBreadcrumb) {
pushDialogCrumb(type, id, label);
}
}
// Make sure file drops outside of the screenshot manager don't navigate to the file path dropped.
// This issue persists on prompts created with prompt(), unfortunately. Not sure how to fix that.
document.body.addEventListener('drop', function (e) {
@@ -191,6 +206,7 @@ export const useUiStore = defineStore('Ui', () => {
pushDialogCrumb,
setDialogCrumbLabel,
jumpDialogCrumb,
clearDialogCrumbs
clearDialogCrumbs,
openDialog
};
});