feat(import): collapsible import window with background progress
This commit is contained in:
1 parent
5c0ce7e4dc
commit
59d136fcf2
12 files changed
+217
-12
No files matched your search
@@ -1,5 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed, ref, shallowRef, watch } from "vue";
|
import { computed, onBeforeUnmount, ref, shallowRef, watch } from "vue";
|
||||||
import { uuid } from "@/lib/common/utils";
|
import { uuid } from "@/lib/common/utils";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "vue-i18n";
|
||||||
import { isTauriRuntime } from "@/lib/backend/tauriRuntime";
|
import { isTauriRuntime } from "@/lib/backend/tauriRuntime";
|
||||||
@@ -9,7 +9,7 @@ import { Input } from "@/components/ui/input";
|
|||||||
import { Label } from "@/components/ui/label";
|
import { Label } from "@/components/ui/label";
|
||||||
import { SearchableSelect } from "@/components/ui/searchable-select";
|
import { SearchableSelect } from "@/components/ui/searchable-select";
|
||||||
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select";
|
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select";
|
||||||
import { AlertTriangle, ArrowLeft, ArrowRight, Check, CheckCircle2, FileCode, FileJson, FileSpreadsheet, FileText, FileUp, Loader2, RefreshCw, Square, Upload, X } from "@lucide/vue";
|
import { AlertTriangle, ArrowLeft, ArrowRight, Check, CheckCircle2, FileCode, FileJson, FileSpreadsheet, FileText, FileUp, Loader2, Maximize2, Minimize2, RefreshCw, Square, Upload, X } from "@lucide/vue";
|
||||||
import { useConnectionStore } from "@/stores/connectionStore";
|
import { useConnectionStore } from "@/stores/connectionStore";
|
||||||
import { ensureReadOnlyWriteAccess } from "@/lib/database/readOnlyWriteAccess";
|
import { ensureReadOnlyWriteAccess } from "@/lib/database/readOnlyWriteAccess";
|
||||||
import { useSettingsStore } from "@/stores/settingsStore";
|
import { useSettingsStore } from "@/stores/settingsStore";
|
||||||
@@ -40,6 +40,27 @@ const store = useConnectionStore();
|
|||||||
const settingsStore = useSettingsStore();
|
const settingsStore = useSettingsStore();
|
||||||
const { toast } = useToast();
|
const { toast } = useToast();
|
||||||
const open = defineModel<boolean>("open", { default: false });
|
const open = defineModel<boolean>("open", { default: false });
|
||||||
|
const minimized = ref(false);
|
||||||
|
const backgroundMode = ref(false);
|
||||||
|
const dialogDragOffset = ref({ x: 0, y: 0 });
|
||||||
|
const isDraggingDialog = ref(false);
|
||||||
|
let activeDialogDrag:
|
||||||
|
| {
|
||||||
|
pointerId: number;
|
||||||
|
startX: number;
|
||||||
|
startY: number;
|
||||||
|
startLeft: number;
|
||||||
|
startTop: number;
|
||||||
|
width: number;
|
||||||
|
height: number;
|
||||||
|
offsetX: number;
|
||||||
|
offsetY: number;
|
||||||
|
}
|
||||||
|
| undefined;
|
||||||
|
const dialogStyle = computed(() => ({
|
||||||
|
transform: dialogDragOffset.value.x || dialogDragOffset.value.y ? `translate(${dialogDragOffset.value.x}px, ${dialogDragOffset.value.y}px)` : undefined,
|
||||||
|
transition: isDraggingDialog.value ? "none" : undefined,
|
||||||
|
}));
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
prefillConnectionId?: string;
|
prefillConnectionId?: string;
|
||||||
@@ -233,6 +254,7 @@ const terminalStatus = computed(() => !!progress.value?.status && ["done", "erro
|
|||||||
const displayedElapsedMs = computed(() => resolveTableImportElapsed(liveElapsedMs.value, progress.value?.elapsedMs, terminalStatus.value));
|
const displayedElapsedMs = computed(() => resolveTableImportElapsed(liveElapsedMs.value, progress.value?.elapsedMs, terminalStatus.value));
|
||||||
const progressLabelKey = computed(() => {
|
const progressLabelKey = computed(() => {
|
||||||
if (terminalStatus.value) return `tableImport.status_${progress.value?.status || "idle"}`;
|
if (terminalStatus.value) return `tableImport.status_${progress.value?.status || "idle"}`;
|
||||||
|
if (!running.value && !progress.value) return "tableImport.status_idle";
|
||||||
return `tableImport.phase_${progress.value?.phase || "writing"}`;
|
return `tableImport.phase_${progress.value?.phase || "writing"}`;
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -249,6 +271,67 @@ function stopImportElapsedClock() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function stopDialogDrag() {
|
||||||
|
activeDialogDrag = undefined;
|
||||||
|
isDraggingDialog.value = false;
|
||||||
|
window.removeEventListener("pointermove", onDialogDragMove);
|
||||||
|
window.removeEventListener("pointerup", stopDialogDrag);
|
||||||
|
window.removeEventListener("pointercancel", stopDialogDrag);
|
||||||
|
}
|
||||||
|
|
||||||
|
function onDialogDragMove(event: PointerEvent) {
|
||||||
|
const drag = activeDialogDrag;
|
||||||
|
if (!drag || event.pointerId !== drag.pointerId) return;
|
||||||
|
|
||||||
|
const maxLeft = Math.max(8, window.innerWidth - drag.width - 8);
|
||||||
|
const maxTop = Math.max(8, window.innerHeight - drag.height - 8);
|
||||||
|
const left = Math.min(maxLeft, Math.max(8, drag.startLeft + event.clientX - drag.startX));
|
||||||
|
const top = Math.min(maxTop, Math.max(8, drag.startTop + event.clientY - drag.startY));
|
||||||
|
dialogDragOffset.value = {
|
||||||
|
x: drag.offsetX + left - drag.startLeft,
|
||||||
|
y: drag.offsetY + top - drag.startTop,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
function startDialogDrag(event: PointerEvent) {
|
||||||
|
if (event.button !== 0 || !(event.target instanceof Element) || event.target.closest("button, a, input, select, textarea")) return;
|
||||||
|
const content = (event.currentTarget as HTMLElement).closest<HTMLElement>('[data-slot="dialog-content"]');
|
||||||
|
if (!content) return;
|
||||||
|
|
||||||
|
const rect = content.getBoundingClientRect();
|
||||||
|
activeDialogDrag = {
|
||||||
|
pointerId: event.pointerId,
|
||||||
|
startX: event.clientX,
|
||||||
|
startY: event.clientY,
|
||||||
|
startLeft: rect.left,
|
||||||
|
startTop: rect.top,
|
||||||
|
width: rect.width,
|
||||||
|
height: rect.height,
|
||||||
|
offsetX: dialogDragOffset.value.x,
|
||||||
|
offsetY: dialogDragOffset.value.y,
|
||||||
|
};
|
||||||
|
isDraggingDialog.value = true;
|
||||||
|
window.addEventListener("pointermove", onDialogDragMove);
|
||||||
|
window.addEventListener("pointerup", stopDialogDrag);
|
||||||
|
window.addEventListener("pointercancel", stopDialogDrag);
|
||||||
|
event.preventDefault();
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleOpenChange(value: boolean) {
|
||||||
|
if (!value && running.value) return;
|
||||||
|
open.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
function minimizeImport() {
|
||||||
|
minimized.value = true;
|
||||||
|
backgroundMode.value = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function restoreImport() {
|
||||||
|
minimized.value = false;
|
||||||
|
if (!running.value) backgroundMode.value = false;
|
||||||
|
}
|
||||||
|
|
||||||
function refreshImportElapsedClock() {
|
function refreshImportElapsedClock() {
|
||||||
if (importStartedAt > 0) {
|
if (importStartedAt > 0) {
|
||||||
liveElapsedMs.value = Math.max(0, Math.round(performance.now() - importStartedAt));
|
liveElapsedMs.value = Math.max(0, Math.round(performance.now() - importStartedAt));
|
||||||
@@ -263,6 +346,11 @@ function startImportElapsedClock() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function resetState() {
|
function resetState() {
|
||||||
|
stopDialogDrag();
|
||||||
|
minimized.value = false;
|
||||||
|
backgroundMode.value = false;
|
||||||
|
dialogDragOffset.value = { x: 0, y: 0 };
|
||||||
|
progressPercentFloor.value = 0;
|
||||||
stopImportElapsedClock();
|
stopImportElapsedClock();
|
||||||
closeDataTypePicker();
|
closeDataTypePicker();
|
||||||
importStartedAt = 0;
|
importStartedAt = 0;
|
||||||
@@ -810,6 +898,7 @@ async function startImport() {
|
|||||||
const currentPreview = preview.value;
|
const currentPreview = preview.value;
|
||||||
const tableName = targetTableName.value;
|
const tableName = targetTableName.value;
|
||||||
if (!canImport.value || !currentPreview || !props.prefillConnectionId || !tableName) return;
|
if (!canImport.value || !currentPreview || !props.prefillConnectionId || !tableName) return;
|
||||||
|
backgroundMode.value = true;
|
||||||
running.value = true;
|
running.value = true;
|
||||||
progressPercentFloor.value = 0;
|
progressPercentFloor.value = 0;
|
||||||
cancelling.value = false;
|
cancelling.value = false;
|
||||||
@@ -877,6 +966,7 @@ async function startImport() {
|
|||||||
stopImportElapsedClock();
|
stopImportElapsedClock();
|
||||||
running.value = false;
|
running.value = false;
|
||||||
cancelling.value = false;
|
cancelling.value = false;
|
||||||
|
if (!minimized.value) backgroundMode.value = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -885,6 +975,7 @@ async function startBatchImport() {
|
|||||||
// Keep original indices for the active preview and error state, even when
|
// Keep original indices for the active preview and error state, even when
|
||||||
// the import queue excludes worksheets between selected tasks.
|
// the import queue excludes worksheets between selected tasks.
|
||||||
const tasks = batchTasks.value.map((task, index) => ({ task, index })).filter(({ task }) => task.selected);
|
const tasks = batchTasks.value.map((task, index) => ({ task, index })).filter(({ task }) => task.selected);
|
||||||
|
backgroundMode.value = true;
|
||||||
running.value = true;
|
running.value = true;
|
||||||
progressPercentFloor.value = 0;
|
progressPercentFloor.value = 0;
|
||||||
cancelling.value = false;
|
cancelling.value = false;
|
||||||
@@ -989,6 +1080,7 @@ async function startBatchImport() {
|
|||||||
await releaseTableImportSources();
|
await releaseTableImportSources();
|
||||||
running.value = false;
|
running.value = false;
|
||||||
cancelling.value = false;
|
cancelling.value = false;
|
||||||
|
if (!minimized.value) backgroundMode.value = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1068,13 +1160,18 @@ watch(
|
|||||||
resetState();
|
resetState();
|
||||||
void loadTargetColumns();
|
void loadTargetColumns();
|
||||||
void loadDataTypeOptions();
|
void loadDataTypeOptions();
|
||||||
} else if (!running.value) {
|
} else {
|
||||||
void releaseTableImportSources();
|
minimized.value = false;
|
||||||
|
backgroundMode.value = false;
|
||||||
|
dialogDragOffset.value = { x: 0, y: 0 };
|
||||||
|
if (!running.value) void releaseTableImportSources();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ immediate: true },
|
{ immediate: true },
|
||||||
);
|
);
|
||||||
|
|
||||||
|
onBeforeUnmount(stopDialogDrag);
|
||||||
|
|
||||||
watch([sourceFormat, delimiter, titleRow, dataStartRow, lastDataRow, trimValues, emptyStringAsNull, selectedSheet, jsonShape, previewLimit], schedulePreviewReload);
|
watch([sourceFormat, delimiter, titleRow, dataStartRow, lastDataRow, trimValues, emptyStringAsNull, selectedSheet, jsonShape, previewLimit], schedulePreviewReload);
|
||||||
watch(textEncoding, schedulePreviewReloadAfterEncodingChange);
|
watch(textEncoding, schedulePreviewReloadAfterEncodingChange);
|
||||||
watch([newTableName, columnMapping, columnDataTypes], saveActiveBatchTask, { deep: true });
|
watch([newTableName, columnMapping, columnDataTypes], saveActiveBatchTask, { deep: true });
|
||||||
@@ -1112,13 +1209,19 @@ watch(rawProgressPercent, (percent) => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<Dialog v-model:open="open">
|
<Dialog :open="open" :modal="!backgroundMode" @update:open="handleOpenChange">
|
||||||
<DialogScrollContent class="flex max-h-[calc(var(--dbx-viewport-height)-6rem)] min-h-0 flex-col overflow-hidden sm:max-w-[980px]" :trap-focus="false" @interact-outside.prevent>
|
<DialogScrollContent v-if="!minimized" class="flex max-h-[calc(var(--dbx-viewport-height)-6rem)] min-h-0 flex-col overflow-hidden sm:max-w-[980px]" :style="dialogStyle" :trap-focus="false" :show-overlay="!backgroundMode" :show-close-button="false" @interact-outside.prevent>
|
||||||
<DialogHeader class="shrink-0 pr-8">
|
<DialogHeader class="shrink-0 flex-row items-center pr-8" @pointerdown="startDialogDrag">
|
||||||
<DialogTitle class="flex items-center gap-2 text-base">
|
<DialogTitle class="flex min-w-0 flex-1 items-center gap-2 text-base">
|
||||||
<FileUp class="h-4 w-4" />
|
<FileUp class="h-4 w-4" />
|
||||||
{{ t("tableImport.title") }}
|
{{ t("tableImport.title") }}
|
||||||
</DialogTitle>
|
</DialogTitle>
|
||||||
|
<Button variant="ghost" size="icon-sm" :aria-label="t('tableImport.minimize')" :title="t('tableImport.minimize')" @pointerdown.stop @click="minimizeImport">
|
||||||
|
<Minimize2 class="h-4 w-4" />
|
||||||
|
</Button>
|
||||||
|
<Button v-if="!running" variant="ghost" size="icon-sm" :aria-label="t('common.close')" :title="t('common.close')" @pointerdown.stop @click="handleOpenChange(false)">
|
||||||
|
<X class="h-4 w-4" />
|
||||||
|
</Button>
|
||||||
</DialogHeader>
|
</DialogHeader>
|
||||||
|
|
||||||
<div class="min-h-0 flex-1 space-y-4 overflow-y-auto py-2 pr-1">
|
<div class="min-h-0 flex-1 space-y-4 overflow-y-auto py-2 pr-1">
|
||||||
@@ -1580,6 +1683,10 @@ watch(rawProgressPercent, (percent) => {
|
|||||||
<div class="h-full bg-primary transition-all" :style="{ width: `${progressPercent}%` }" />
|
<div class="h-full bg-primary transition-all" :style="{ width: `${progressPercent}%` }" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-if="running" class="flex items-start gap-2 rounded-md border border-amber-300 bg-amber-50 px-3 py-2 text-xs text-amber-800 dark:border-amber-800 dark:bg-amber-950/20 dark:text-amber-300">
|
||||||
|
<AlertTriangle class="mt-0.5 h-3.5 w-3.5 shrink-0" />
|
||||||
|
<span>{{ t("tableImport.backgroundWarning") }}</span>
|
||||||
|
</div>
|
||||||
<div v-if="errorMessage || progress?.error" class="rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-xs text-destructive">
|
<div v-if="errorMessage || progress?.error" class="rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-xs text-destructive">
|
||||||
{{ errorMessage || progress?.error }}
|
{{ errorMessage || progress?.error }}
|
||||||
</div>
|
</div>
|
||||||
@@ -1646,4 +1753,19 @@ watch(rawProgressPercent, (percent) => {
|
|||||||
</DialogFooter>
|
</DialogFooter>
|
||||||
</DialogScrollContent>
|
</DialogScrollContent>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
|
|
||||||
|
<Teleport to="body">
|
||||||
|
<div v-if="minimized" class="fixed bottom-4 right-4 z-[100] flex max-w-[calc(100vw-2rem)] items-center gap-2 rounded-md border bg-popover px-3 py-2 text-popover-foreground shadow-lg" :title="running ? t('tableImport.backgroundWarning') : undefined">
|
||||||
|
<Loader2 v-if="running" class="h-4 w-4 shrink-0 animate-spin text-primary" />
|
||||||
|
<CheckCircle2 v-else-if="progress?.status === 'done'" class="h-4 w-4 shrink-0 text-emerald-600" />
|
||||||
|
<AlertTriangle v-else class="h-4 w-4 shrink-0 text-destructive" />
|
||||||
|
<span class="min-w-0 truncate text-xs">{{ t(progressLabelKey) }} · {{ progressPercent }}%</span>
|
||||||
|
<Button variant="ghost" size="icon-sm" :aria-label="t('tableImport.restoreImport')" :title="t('tableImport.restoreImport')" @click="restoreImport">
|
||||||
|
<Maximize2 class="h-4 w-4" />
|
||||||
|
</Button>
|
||||||
|
<Button v-if="!running" variant="ghost" size="icon-sm" :aria-label="t('common.close')" :title="t('common.close')" @click="handleOpenChange(false)">
|
||||||
|
<X class="h-4 w-4" />
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
</Teleport>
|
||||||
</template>
|
</template>
|
||||||
+53
@@ -254,6 +254,24 @@ afterEach(() => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe("TableImportDialog batch selection", () => {
|
describe("TableImportDialog batch selection", () => {
|
||||||
|
it("lets the import setup dialog be minimized and restored before import starts", async () => {
|
||||||
|
await mountDialog();
|
||||||
|
expect(button("Next").disabled).toBe(false);
|
||||||
|
document.body.querySelector<HTMLButtonElement>('button[aria-label="Minimize import"]')!.click();
|
||||||
|
await flushAsyncUpdates();
|
||||||
|
|
||||||
|
expect(document.body.querySelector('button[aria-label="Restore import"]')).toBeTruthy();
|
||||||
|
expect(document.body.querySelector('button[aria-label="Next"]')).toBeNull();
|
||||||
|
expect(document.body.textContent).toContain("Ready to import");
|
||||||
|
expect(document.body.textContent).not.toContain("Writing data");
|
||||||
|
|
||||||
|
document.body.querySelector<HTMLButtonElement>('button[aria-label="Restore import"]')!.click();
|
||||||
|
await flushAsyncUpdates();
|
||||||
|
expect(button("Next").disabled).toBe(false);
|
||||||
|
expect(document.body.querySelector('button[aria-label="Minimize import"]')).toBeTruthy();
|
||||||
|
expect(mocks.importTableFile).not.toHaveBeenCalled();
|
||||||
|
});
|
||||||
|
|
||||||
it("keeps every worksheet selected by default and imports them in workbook order", async () => {
|
it("keeps every worksheet selected by default and imports them in workbook order", async () => {
|
||||||
await mountDialog();
|
await mountDialog();
|
||||||
for (const name of ["rows_First", "rows_Second", "rows_Third"]) expect(taskCheckbox(name).checked).toBe(true);
|
for (const name of ["rows_First", "rows_Second", "rows_Third"]) expect(taskCheckbox(name).checked).toBe(true);
|
||||||
@@ -383,6 +401,41 @@ describe("TableImportDialog batch selection", () => {
|
|||||||
expect(document.body.textContent).toContain("Import complete");
|
expect(document.body.textContent).toContain("Import complete");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("keeps the import and its progress active while minimized, then restores the same dialog state", async () => {
|
||||||
|
let finish!: (summary: TableImportSummary) => void;
|
||||||
|
mocks.importTableFile.mockImplementation((request, onProgress) => {
|
||||||
|
onProgress({ importId: request.importId, status: "running", phase: "writing", rowsImported: 1, totalRows: 2, elapsedMs: 1 });
|
||||||
|
return new Promise((resolve) => {
|
||||||
|
finish = resolve;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
await mountDialog();
|
||||||
|
await selectTask("rows_Second", false);
|
||||||
|
await selectTask("rows_Third", false);
|
||||||
|
await startImport();
|
||||||
|
|
||||||
|
expect(mocks.importTableFile).toHaveBeenCalledTimes(1);
|
||||||
|
const minimizeButton = document.body.querySelector<HTMLButtonElement>('button[aria-label="Minimize import"]');
|
||||||
|
expect(minimizeButton).toBeTruthy();
|
||||||
|
minimizeButton!.click();
|
||||||
|
await flushAsyncUpdates();
|
||||||
|
|
||||||
|
expect(document.body.querySelector('button[aria-label="Minimize import"]')).toBeNull();
|
||||||
|
expect(document.body.textContent).toContain("Writing data");
|
||||||
|
expect(document.body.textContent).toMatch(/\d+%/);
|
||||||
|
expect(mocks.importTableFile).toHaveBeenCalledTimes(1);
|
||||||
|
|
||||||
|
document.body.querySelector<HTMLButtonElement>('button[aria-label="Restore import"]')!.click();
|
||||||
|
await flushAsyncUpdates();
|
||||||
|
expect(document.body.querySelector('button[aria-label="Minimize import"]')).toBeTruthy();
|
||||||
|
expect(document.body.textContent).toContain("1 / 2");
|
||||||
|
expect(taskCheckbox("rows_First").disabled).toBe(true);
|
||||||
|
|
||||||
|
finish({ importId: "finished-import", rowsImported: 2, totalRows: 2, elapsedMs: 2 });
|
||||||
|
await flushAsyncUpdates();
|
||||||
|
expect(document.body.textContent).toContain("Import complete");
|
||||||
|
});
|
||||||
|
|
||||||
it("uses selected source bytes when the selected worksheet has no exact row count", async () => {
|
it("uses selected source bytes when the selected worksheet has no exact row count", async () => {
|
||||||
mocks.previewTableImportFile.mockImplementation((_source, options) => Promise.resolve({ ...workbookPreview(options.parseOptions.sheetName || "First"), totalRowsExact: false }));
|
mocks.previewTableImportFile.mockImplementation((_source, options) => Promise.resolve({ ...workbookPreview(options.parseOptions.sheetName || "First"), totalRowsExact: false }));
|
||||||
let finish!: () => void;
|
let finish!: () => void;
|
||||||
|
|||||||
@@ -12,17 +12,20 @@ defineOptions({
|
|||||||
inheritAttrs: false,
|
inheritAttrs: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
const props = defineProps<DialogContentProps & { class?: HTMLAttributes["class"] }>();
|
const props = withDefaults(defineProps<DialogContentProps & { class?: HTMLAttributes["class"]; showOverlay?: boolean; showCloseButton?: boolean }>(), {
|
||||||
|
showOverlay: true,
|
||||||
|
showCloseButton: true,
|
||||||
|
});
|
||||||
const emits = defineEmits<DialogContentEmits>();
|
const emits = defineEmits<DialogContentEmits>();
|
||||||
|
|
||||||
const delegatedProps = reactiveOmit(props, "class");
|
const delegatedProps = reactiveOmit(props, "class", "showOverlay", "showCloseButton");
|
||||||
|
|
||||||
const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<DialogPortal>
|
<DialogPortal>
|
||||||
<DialogOverlay />
|
<DialogOverlay v-if="props.showOverlay" />
|
||||||
<div data-slot="dialog-positioner" class="fixed inset-0 z-50 grid place-items-center p-4 pointer-events-none">
|
<div data-slot="dialog-positioner" class="fixed inset-0 z-50 grid place-items-center p-4 pointer-events-none">
|
||||||
<DialogContent
|
<DialogContent
|
||||||
data-slot="dialog-content"
|
data-slot="dialog-content"
|
||||||
@@ -48,7 +51,7 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|||||||
|
|
||||||
<slot />
|
<slot />
|
||||||
|
|
||||||
<DialogClose class="absolute top-4 right-4 rounded-md p-0.5 transition-colors hover:bg-secondary">
|
<DialogClose v-if="props.showCloseButton" class="absolute top-4 right-4 rounded-md p-0.5 transition-colors hover:bg-secondary">
|
||||||
<XIcon class="w-4 h-4" />
|
<XIcon class="w-4 h-4" />
|
||||||
<span class="sr-only">Close</span>
|
<span class="sr-only">Close</span>
|
||||||
</DialogClose>
|
</DialogClose>
|
||||||
|
|||||||
@@ -6797,6 +6797,9 @@ export default {
|
|||||||
},
|
},
|
||||||
tableImport: {
|
tableImport: {
|
||||||
title: "Import Table Data",
|
title: "Import Table Data",
|
||||||
|
minimize: "Minimize import",
|
||||||
|
restoreImport: "Restore import",
|
||||||
|
backgroundWarning: "Rows may appear as they are written. Concurrent access to the target table may wait or fail because of database locks, transaction isolation, or constraints.",
|
||||||
selectedTasks: "{selected} / {total} import items selected",
|
selectedTasks: "{selected} / {total} import items selected",
|
||||||
selectTask: "Import {name}",
|
selectTask: "Import {name}",
|
||||||
noTasksSelected: "Select at least one item to import.",
|
noTasksSelected: "Select at least one item to import.",
|
||||||
|
|||||||
@@ -6247,6 +6247,9 @@ export default withEnglishFallback({
|
|||||||
},
|
},
|
||||||
tableImport: {
|
tableImport: {
|
||||||
title: "Importar datos a tabla",
|
title: "Importar datos a tabla",
|
||||||
|
minimize: "Minimizar importación",
|
||||||
|
restoreImport: "Restaurar importación",
|
||||||
|
backgroundWarning: "Las filas pueden aparecer a medida que se escriben. El acceso simultáneo a la tabla de destino puede esperar o fallar debido a bloqueos de la base de datos, el aislamiento de transacciones o las restricciones.",
|
||||||
target: "Tabla destino",
|
target: "Tabla destino",
|
||||||
selectFile: "Seleccionar archivo",
|
selectFile: "Seleccionar archivo",
|
||||||
changeFile: "Change File",
|
changeFile: "Change File",
|
||||||
|
|||||||
@@ -6170,6 +6170,9 @@ export default withEnglishFallback({
|
|||||||
},
|
},
|
||||||
tableImport: {
|
tableImport: {
|
||||||
title: "Importa Dati Tabella",
|
title: "Importa Dati Tabella",
|
||||||
|
minimize: "Riduci a icona l'importazione",
|
||||||
|
restoreImport: "Ripristina importazione",
|
||||||
|
backgroundWarning: "Le righe possono comparire man mano che vengono scritte. L'accesso simultaneo alla tabella di destinazione può attendere o non riuscire a causa di blocchi del database, dell'isolamento delle transazioni o dei vincoli.",
|
||||||
target: "Tabella di destinazione",
|
target: "Tabella di destinazione",
|
||||||
selectFile: "Seleziona File",
|
selectFile: "Seleziona File",
|
||||||
changeFile: "Change File",
|
changeFile: "Change File",
|
||||||
|
|||||||
@@ -6191,6 +6191,9 @@ export default withEnglishFallback({
|
|||||||
},
|
},
|
||||||
tableImport: {
|
tableImport: {
|
||||||
title: "テーブルデータをインポート",
|
title: "テーブルデータをインポート",
|
||||||
|
minimize: "インポートを最小化",
|
||||||
|
restoreImport: "インポートを復元",
|
||||||
|
backgroundWarning: "書き込み中の行は順次表示される場合があります。対象テーブルへの同時アクセスは、データベースロック、トランザクション分離、制約により待機または失敗することがあります。",
|
||||||
target: "対象テーブル",
|
target: "対象テーブル",
|
||||||
selectFile: "ファイルを選択",
|
selectFile: "ファイルを選択",
|
||||||
changeFile: "Change File",
|
changeFile: "Change File",
|
||||||
|
|||||||
@@ -5893,6 +5893,9 @@ export default withEnglishFallback({
|
|||||||
},
|
},
|
||||||
tableImport: {
|
tableImport: {
|
||||||
title: "테이블 데이터 가져오기",
|
title: "테이블 데이터 가져오기",
|
||||||
|
minimize: "가져오기 창 최소화",
|
||||||
|
restoreImport: "가져오기 창 복원",
|
||||||
|
backgroundWarning: "데이터를 쓰는 동안 행이 순차적으로 표시될 수 있습니다. 대상 테이블에 동시에 접근하면 데이터베이스 잠금, 트랜잭션 격리 또는 제약 조건으로 인해 대기하거나 실패할 수 있습니다.",
|
||||||
target: "대상 테이블",
|
target: "대상 테이블",
|
||||||
selectFile: "파일 선택",
|
selectFile: "파일 선택",
|
||||||
changeFile: "파일 변경",
|
changeFile: "파일 변경",
|
||||||
|
|||||||
@@ -6171,6 +6171,9 @@ export default withEnglishFallback({
|
|||||||
},
|
},
|
||||||
tableImport: {
|
tableImport: {
|
||||||
title: "Importar Dados da Tabela",
|
title: "Importar Dados da Tabela",
|
||||||
|
minimize: "Minimizar importação",
|
||||||
|
restoreImport: "Restaurar importação",
|
||||||
|
backgroundWarning: "As linhas podem aparecer conforme são gravadas. O acesso simultâneo à tabela de destino pode aguardar ou falhar devido a bloqueios do banco de dados, ao isolamento de transações ou a restrições.",
|
||||||
target: "Tabela de destino",
|
target: "Tabela de destino",
|
||||||
selectFile: "Selecionar arquivo",
|
selectFile: "Selecionar arquivo",
|
||||||
changeFile: "Change File",
|
changeFile: "Change File",
|
||||||
|
|||||||
@@ -7325,6 +7325,9 @@ export default withEnglishFallback({
|
|||||||
},
|
},
|
||||||
tableImport: {
|
tableImport: {
|
||||||
title: "Импорт данных таблицы",
|
title: "Импорт данных таблицы",
|
||||||
|
minimize: "Свернуть окно импорта",
|
||||||
|
restoreImport: "Восстановить окно импорта",
|
||||||
|
backgroundWarning: "Строки могут появляться по мере записи. Параллельный доступ к целевой таблице может ожидать или завершиться ошибкой из-за блокировок базы данных, изоляции транзакций или ограничений.",
|
||||||
selectedTasks: "Выбрано элементов импорта: {selected} / {total}",
|
selectedTasks: "Выбрано элементов импорта: {selected} / {total}",
|
||||||
selectTask: "Импортировать {name}",
|
selectTask: "Импортировать {name}",
|
||||||
noTasksSelected: "Выберите хотя бы один элемент для импорта.",
|
noTasksSelected: "Выберите хотя бы один элемент для импорта.",
|
||||||
|
|||||||
@@ -6764,6 +6764,9 @@ export default withEnglishFallback({
|
|||||||
},
|
},
|
||||||
tableImport: {
|
tableImport: {
|
||||||
title: "导入表数据",
|
title: "导入表数据",
|
||||||
|
minimize: "收起导入窗口",
|
||||||
|
restoreImport: "恢复导入窗口",
|
||||||
|
backgroundWarning: "导入期间目标表可能逐批写入并暂时只显示部分数据;并发读写该表可能因数据库锁、事务隔离或约束而等待、冲突或失败。",
|
||||||
selectedTasks: "已选择 {selected} / {total} 个导入项",
|
selectedTasks: "已选择 {selected} / {total} 个导入项",
|
||||||
selectTask: "导入 {name}",
|
selectTask: "导入 {name}",
|
||||||
noTasksSelected: "请至少选择一个导入项。",
|
noTasksSelected: "请至少选择一个导入项。",
|
||||||
|
|||||||
@@ -5480,6 +5480,9 @@ export default withEnglishFallback({
|
|||||||
},
|
},
|
||||||
tableImport: {
|
tableImport: {
|
||||||
title: "匯入資料表資料",
|
title: "匯入資料表資料",
|
||||||
|
minimize: "最小化匯入視窗",
|
||||||
|
restoreImport: "還原匯入視窗",
|
||||||
|
backgroundWarning: "資料列可能會隨寫入逐步顯示。並行存取目標資料表時,可能因資料庫鎖定、交易隔離或限制條件而等待或失敗。",
|
||||||
target: "目標資料表",
|
target: "目標資料表",
|
||||||
selectFile: "選擇檔案",
|
selectFile: "選擇檔案",
|
||||||
changeFile: "更換檔案",
|
changeFile: "更換檔案",
|
||||||
|
|||||||
Reference in new issue
Block a user