@sfxcode/nuxt-ui-mongocamp 1.3.5 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module.d.mts +8 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +6 -0
- package/dist/runtime/components/MongocampAggregationBuilder.vue +302 -3
- package/dist/runtime/components/MongocampAggregationChart.d.vue.ts +6 -0
- package/dist/runtime/components/MongocampAggregationChart.vue +93 -0
- package/dist/runtime/components/MongocampAggregationChart.vue.d.ts +6 -0
- package/dist/runtime/components/MongocampAggregationStagePreview.d.vue.ts +9 -0
- package/dist/runtime/components/MongocampAggregationStagePreview.vue +148 -0
- package/dist/runtime/components/MongocampAggregationStagePreview.vue.d.ts +9 -0
- package/dist/runtime/components/MongocampBucketFiles.vue +169 -48
- package/dist/runtime/components/MongocampBulkDelete.d.vue.ts +19 -0
- package/dist/runtime/components/MongocampBulkDelete.vue +118 -23
- package/dist/runtime/components/MongocampBulkDelete.vue.d.ts +19 -0
- package/dist/runtime/components/MongocampBulkEdit.d.vue.ts +6 -0
- package/dist/runtime/components/MongocampBulkEdit.vue +23 -2
- package/dist/runtime/components/MongocampBulkEdit.vue.d.ts +6 -0
- package/dist/runtime/components/MongocampChart.d.vue.ts +29 -0
- package/dist/runtime/components/MongocampChart.vue +129 -0
- package/dist/runtime/components/MongocampChart.vue.d.ts +29 -0
- package/dist/runtime/components/MongocampCollectionCharts.d.vue.ts +15 -0
- package/dist/runtime/components/MongocampCollectionCharts.vue +199 -0
- package/dist/runtime/components/MongocampCollectionCharts.vue.d.ts +15 -0
- package/dist/runtime/components/MongocampCollectionCopy.d.vue.ts +23 -0
- package/dist/runtime/components/MongocampCollectionCopy.vue +445 -0
- package/dist/runtime/components/MongocampCollectionCopy.vue.d.ts +23 -0
- package/dist/runtime/components/MongocampCollectionData.d.vue.ts +4 -0
- package/dist/runtime/components/MongocampCollectionData.vue +342 -137
- package/dist/runtime/components/MongocampCollectionData.vue.d.ts +4 -0
- package/dist/runtime/components/MongocampCollectionInfos.vue +106 -238
- package/dist/runtime/components/MongocampCollections.vue +62 -0
- package/dist/runtime/components/MongocampCommandPalette.d.vue.ts +40 -0
- package/dist/runtime/components/MongocampCommandPalette.vue +135 -0
- package/dist/runtime/components/MongocampCommandPalette.vue.d.ts +40 -0
- package/dist/runtime/components/MongocampConfirmByName.vue +2 -2
- package/dist/runtime/components/MongocampDashboard.d.vue.ts +3 -1
- package/dist/runtime/components/MongocampDashboard.vue +21 -2
- package/dist/runtime/components/MongocampDashboard.vue.d.ts +3 -1
- package/dist/runtime/components/MongocampDatabases.vue +22 -0
- package/dist/runtime/components/MongocampDocumentCompare.d.vue.ts +20 -0
- package/dist/runtime/components/MongocampDocumentCompare.vue +146 -0
- package/dist/runtime/components/MongocampDocumentCompare.vue.d.ts +20 -0
- package/dist/runtime/components/MongocampDocumentView.d.vue.ts +22 -0
- package/dist/runtime/components/MongocampDocumentView.vue +202 -0
- package/dist/runtime/components/MongocampDocumentView.vue.d.ts +22 -0
- package/dist/runtime/components/MongocampErrorAlert.vue +12 -4
- package/dist/runtime/components/MongocampExportAll.d.vue.ts +18 -0
- package/dist/runtime/components/MongocampExportAll.vue +204 -0
- package/dist/runtime/components/MongocampExportAll.vue.d.ts +18 -0
- package/dist/runtime/components/MongocampFilePreview.d.vue.ts +16 -0
- package/dist/runtime/components/MongocampFilePreview.vue +162 -0
- package/dist/runtime/components/MongocampFilePreview.vue.d.ts +16 -0
- package/dist/runtime/components/MongocampFilterBuilder.vue +11 -0
- package/dist/runtime/components/MongocampImport.vue +2 -10
- package/dist/runtime/components/MongocampIndexes.d.vue.ts +18 -0
- package/dist/runtime/components/MongocampIndexes.vue +455 -0
- package/dist/runtime/components/MongocampIndexes.vue.d.ts +18 -0
- package/dist/runtime/components/MongocampJobs.d.vue.ts +6 -1
- package/dist/runtime/components/MongocampJobs.vue +23 -3
- package/dist/runtime/components/MongocampJobs.vue.d.ts +6 -1
- package/dist/runtime/components/MongocampPermissionMatrix.d.vue.ts +12 -0
- package/dist/runtime/components/MongocampPermissionMatrix.vue +301 -0
- package/dist/runtime/components/MongocampPermissionMatrix.vue.d.ts +12 -0
- package/dist/runtime/components/MongocampQueryBar.d.vue.ts +26 -0
- package/dist/runtime/components/MongocampQueryBar.vue +398 -0
- package/dist/runtime/components/MongocampQueryBar.vue.d.ts +26 -0
- package/dist/runtime/components/MongocampRoleGrants.vue +2 -2
- package/dist/runtime/components/MongocampRoles.vue +3 -3
- package/dist/runtime/components/MongocampServerOverview.d.vue.ts +20 -0
- package/dist/runtime/components/MongocampServerOverview.vue +443 -0
- package/dist/runtime/components/MongocampServerOverview.vue.d.ts +20 -0
- package/dist/runtime/components/MongocampSettings.d.vue.ts +25 -1
- package/dist/runtime/components/MongocampSettings.vue +70 -9
- package/dist/runtime/components/MongocampSettings.vue.d.ts +25 -1
- package/dist/runtime/components/MongocampUsers.vue +3 -3
- package/dist/runtime/composables/useMongocampAdmin.d.ts +2 -1
- package/dist/runtime/composables/useMongocampAdmin.js +6 -1
- package/dist/runtime/composables/useMongocampAggregation.d.ts +12 -1
- package/dist/runtime/composables/useMongocampAggregation.js +33 -25
- package/dist/runtime/composables/useMongocampAutoRefresh.d.ts +26 -0
- package/dist/runtime/composables/useMongocampAutoRefresh.js +78 -0
- package/dist/runtime/composables/useMongocampBucket.d.ts +13 -1
- package/dist/runtime/composables/useMongocampBucket.js +34 -0
- package/dist/runtime/composables/useMongocampClientApi.js +2 -1
- package/dist/runtime/composables/useMongocampCollectionCopy.d.ts +85 -0
- package/dist/runtime/composables/useMongocampCollectionCopy.js +105 -0
- package/dist/runtime/composables/useMongocampCollectionStats.d.ts +10 -0
- package/dist/runtime/composables/useMongocampCollectionStats.js +17 -0
- package/dist/runtime/composables/useMongocampError.d.ts +2 -1
- package/dist/runtime/composables/useMongocampError.js +16 -1
- package/dist/runtime/composables/useMongocampExportAll.d.ts +47 -0
- package/dist/runtime/composables/useMongocampExportAll.js +27 -0
- package/dist/runtime/composables/useMongocampExtendedJson.d.ts +5 -1
- package/dist/runtime/composables/useMongocampExtendedJson.js +12 -6
- package/dist/runtime/composables/useMongocampFetchAll.d.ts +25 -0
- package/dist/runtime/composables/useMongocampFetchAll.js +27 -0
- package/dist/runtime/composables/useMongocampPermissions.d.ts +14 -0
- package/dist/runtime/composables/useMongocampPermissions.js +21 -0
- package/dist/runtime/composables/useMongocampPersistedState.d.ts +15 -0
- package/dist/runtime/composables/useMongocampPersistedState.js +21 -0
- package/dist/runtime/composables/useMongocampProxyApi.js +2 -1
- package/dist/runtime/composables/useMongocampQuery.d.ts +48 -0
- package/dist/runtime/composables/useMongocampQuery.js +72 -1
- package/dist/runtime/composables/useMongocampSavedPipelines.d.ts +25 -0
- package/dist/runtime/composables/useMongocampSavedPipelines.js +23 -0
- package/dist/runtime/composables/useMongocampSavedQueries.d.ts +37 -0
- package/dist/runtime/composables/useMongocampSavedQueries.js +50 -0
- package/dist/runtime/composables/useMongocampServerOverview.d.ts +42 -0
- package/dist/runtime/composables/useMongocampServerOverview.js +61 -0
- package/dist/runtime/composables/useMongocampSession.d.ts +2 -0
- package/dist/runtime/composables/useMongocampSession.js +16 -2
- package/dist/runtime/composables/useMongocampSystem.d.ts +7 -2
- package/dist/runtime/composables/useMongocampSystem.js +6 -2
- package/dist/runtime/locales/de.json +495 -9
- package/dist/runtime/locales/en.json +495 -9
- package/dist/runtime/plugin.js +6 -3
- package/dist/runtime/utils/aggregationPipeline.d.ts +5 -4
- package/dist/runtime/utils/aggregationPipeline.js +23 -9
- package/dist/runtime/utils/aggregationPreview.d.ts +13 -0
- package/dist/runtime/utils/aggregationPreview.js +10 -0
- package/dist/runtime/utils/aggregationResult.d.ts +5 -0
- package/dist/runtime/utils/aggregationResult.js +4 -0
- package/dist/runtime/utils/aggregationTemplates.d.ts +34 -0
- package/dist/runtime/utils/aggregationTemplates.js +47 -0
- package/dist/runtime/utils/analyzeSamples.d.ts +1 -0
- package/dist/runtime/utils/analyzeSamples.js +1 -1
- package/dist/runtime/utils/autoRefresh.d.ts +14 -0
- package/dist/runtime/utils/autoRefresh.js +15 -0
- package/dist/runtime/utils/bigIntJson.d.ts +15 -0
- package/dist/runtime/utils/bigIntJson.js +55 -0
- package/dist/runtime/utils/bulkDelete.d.ts +9 -1
- package/dist/runtime/utils/bulkDelete.js +15 -3
- package/dist/runtime/utils/bulkEdit.d.ts +6 -0
- package/dist/runtime/utils/bulkEdit.js +7 -0
- package/dist/runtime/utils/chartData.d.ts +11 -0
- package/dist/runtime/utils/chartData.js +9 -0
- package/dist/runtime/utils/collectionChart.d.ts +36 -0
- package/dist/runtime/utils/collectionChart.js +73 -0
- package/dist/runtime/utils/collectionCopy.d.ts +26 -0
- package/dist/runtime/utils/collectionCopy.js +38 -0
- package/dist/runtime/utils/collectionStats.d.ts +31 -0
- package/dist/runtime/utils/collectionStats.js +42 -0
- package/dist/runtime/utils/commandPalette.d.ts +48 -0
- package/dist/runtime/utils/commandPalette.js +39 -0
- package/dist/runtime/utils/documentCompare.d.ts +31 -0
- package/dist/runtime/utils/documentCompare.js +70 -0
- package/dist/runtime/utils/documentDiff.d.ts +19 -0
- package/dist/runtime/utils/documentDiff.js +71 -0
- package/dist/runtime/utils/documentPaths.d.ts +44 -0
- package/dist/runtime/utils/documentPaths.js +144 -0
- package/dist/runtime/utils/documentTree.d.ts +40 -0
- package/dist/runtime/utils/documentTree.js +94 -0
- package/dist/runtime/utils/exportDocuments.d.ts +35 -0
- package/dist/runtime/utils/exportDocuments.js +54 -0
- package/dist/runtime/utils/exportRows.js +1 -1
- package/dist/runtime/utils/filePreview.d.ts +27 -0
- package/dist/runtime/utils/filePreview.js +50 -0
- package/dist/runtime/utils/filterBuilder.d.ts +6 -1
- package/dist/runtime/utils/filterBuilder.js +6 -5
- package/dist/runtime/utils/formatBytes.d.ts +2 -0
- package/dist/runtime/utils/formatBytes.js +11 -0
- package/dist/runtime/utils/grantMatching.d.ts +8 -0
- package/dist/runtime/utils/grantMatching.js +15 -0
- package/dist/runtime/utils/importRows.js +12 -2
- package/dist/runtime/utils/indexCopy.d.ts +26 -0
- package/dist/runtime/utils/indexCopy.js +22 -0
- package/dist/runtime/utils/indexForm.d.ts +69 -0
- package/dist/runtime/utils/indexForm.js +63 -0
- package/dist/runtime/utils/limitedMap.d.ts +17 -0
- package/dist/runtime/utils/limitedMap.js +19 -0
- package/dist/runtime/utils/luceneExpression.d.ts +15 -0
- package/dist/runtime/utils/luceneExpression.js +74 -0
- package/dist/runtime/utils/pagedFetch.d.ts +46 -0
- package/dist/runtime/utils/pagedFetch.js +58 -0
- package/dist/runtime/utils/paginationHeaders.d.ts +4 -0
- package/dist/runtime/utils/paginationHeaders.js +4 -0
- package/dist/runtime/utils/permissionDenied.d.ts +10 -0
- package/dist/runtime/utils/permissionDenied.js +23 -0
- package/dist/runtime/utils/permissionMatrix.d.ts +55 -0
- package/dist/runtime/utils/permissionMatrix.js +85 -0
- package/dist/runtime/utils/persistedState.d.ts +25 -0
- package/dist/runtime/utils/persistedState.js +47 -0
- package/dist/runtime/utils/queryState.d.ts +45 -0
- package/dist/runtime/utils/queryState.js +75 -0
- package/dist/runtime/utils/requestLimits.d.ts +2 -0
- package/dist/runtime/utils/requestLimits.js +4 -0
- package/dist/runtime/utils/resultChart.d.ts +32 -0
- package/dist/runtime/utils/resultChart.js +59 -0
- package/dist/runtime/utils/savedPipelines.d.ts +22 -0
- package/dist/runtime/utils/savedPipelines.js +46 -0
- package/dist/runtime/utils/savedQueries.d.ts +60 -0
- package/dist/runtime/utils/savedQueries.js +143 -0
- package/dist/runtime/utils/schemaAnalysis.d.ts +16 -0
- package/dist/runtime/utils/schemaAnalysis.js +57 -0
- package/dist/runtime/utils/serverError.d.ts +19 -0
- package/dist/runtime/utils/serverError.js +19 -0
- package/dist/runtime/utils/serverOverview.d.ts +47 -0
- package/dist/runtime/utils/serverOverview.js +40 -0
- package/dist/runtime/utils/sessionGuard.d.ts +3 -0
- package/dist/runtime/utils/sessionGuard.js +18 -1
- package/package.json +12 -11
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, onBeforeUnmount, ref, watch } from "vue";
|
|
3
|
+
import { useI18n } from "#imports";
|
|
4
|
+
import { useMongocampAggregation } from "../composables/useMongocampAggregation";
|
|
5
|
+
import { PREVIEW_DEBOUNCE_MS, PREVIEW_LIMIT, pipelineKey } from "../utils/aggregationPreview";
|
|
6
|
+
import { formatCell, resultColumns } from "../utils/aggregationResult";
|
|
7
|
+
const props = defineProps({
|
|
8
|
+
collectionName: { type: String, required: true },
|
|
9
|
+
pipeline: { type: null, required: true },
|
|
10
|
+
stageNumber: { type: Number, required: true }
|
|
11
|
+
});
|
|
12
|
+
const { t } = useI18n();
|
|
13
|
+
const { runAggregation, describeAggregationError } = useMongocampAggregation();
|
|
14
|
+
const loading = ref(false);
|
|
15
|
+
const rows = ref([]);
|
|
16
|
+
const error = ref(null);
|
|
17
|
+
let timer;
|
|
18
|
+
let controller;
|
|
19
|
+
let run = 0;
|
|
20
|
+
function cancel() {
|
|
21
|
+
clearTimeout(timer);
|
|
22
|
+
controller?.abort();
|
|
23
|
+
controller = void 0;
|
|
24
|
+
}
|
|
25
|
+
async function execute(pipeline) {
|
|
26
|
+
cancel();
|
|
27
|
+
const mine = ++run;
|
|
28
|
+
const own = new AbortController();
|
|
29
|
+
controller = own;
|
|
30
|
+
loading.value = true;
|
|
31
|
+
error.value = null;
|
|
32
|
+
try {
|
|
33
|
+
const result = await runAggregation(props.collectionName, pipeline, { page: 1, rowsPerPage: PREVIEW_LIMIT }, { signal: own.signal });
|
|
34
|
+
if (mine !== run) return;
|
|
35
|
+
rows.value = result.rows;
|
|
36
|
+
} catch (e) {
|
|
37
|
+
if (mine !== run || own.signal.aborted) return;
|
|
38
|
+
rows.value = [];
|
|
39
|
+
error.value = await describeAggregationError(e);
|
|
40
|
+
} finally {
|
|
41
|
+
if (mine === run) loading.value = false;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
const key = computed(() => props.pipeline ? pipelineKey(props.pipeline) : "");
|
|
45
|
+
let first = true;
|
|
46
|
+
watch(key, () => {
|
|
47
|
+
if (!props.pipeline) {
|
|
48
|
+
cancel();
|
|
49
|
+
run++;
|
|
50
|
+
loading.value = false;
|
|
51
|
+
rows.value = [];
|
|
52
|
+
error.value = null;
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
const pipeline = props.pipeline;
|
|
56
|
+
if (first) {
|
|
57
|
+
first = false;
|
|
58
|
+
void execute(pipeline);
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
cancel();
|
|
62
|
+
clearTimeout(timer);
|
|
63
|
+
loading.value = true;
|
|
64
|
+
timer = setTimeout(() => void execute(pipeline), PREVIEW_DEBOUNCE_MS);
|
|
65
|
+
}, { immediate: true });
|
|
66
|
+
onBeforeUnmount(() => {
|
|
67
|
+
cancel();
|
|
68
|
+
run++;
|
|
69
|
+
});
|
|
70
|
+
const columns = computed(() => resultColumns(rows.value));
|
|
71
|
+
</script>
|
|
72
|
+
|
|
73
|
+
<template>
|
|
74
|
+
<div
|
|
75
|
+
class="flex flex-col gap-1 rounded-md bg-elevated/50 p-2"
|
|
76
|
+
data-test="stage-preview"
|
|
77
|
+
>
|
|
78
|
+
<p class="text-xs text-dimmed">
|
|
79
|
+
{{ t("nuxtUiMongocamp.aggregation.previewTitle", { count: PREVIEW_LIMIT, n: stageNumber }) }}
|
|
80
|
+
</p>
|
|
81
|
+
<p
|
|
82
|
+
v-if="!pipeline"
|
|
83
|
+
class="text-sm text-dimmed"
|
|
84
|
+
data-test="preview-blocked"
|
|
85
|
+
>
|
|
86
|
+
{{ t("nuxtUiMongocamp.aggregation.previewBlocked") }}
|
|
87
|
+
</p>
|
|
88
|
+
<p
|
|
89
|
+
v-else-if="loading"
|
|
90
|
+
class="text-sm text-dimmed"
|
|
91
|
+
role="status"
|
|
92
|
+
data-test="preview-loading"
|
|
93
|
+
>
|
|
94
|
+
{{ t("nuxtUiMongocamp.aggregation.previewLoading") }}
|
|
95
|
+
</p>
|
|
96
|
+
<p
|
|
97
|
+
v-else-if="error"
|
|
98
|
+
class="text-sm text-error"
|
|
99
|
+
role="alert"
|
|
100
|
+
data-test="preview-error"
|
|
101
|
+
>
|
|
102
|
+
{{ error.message }}
|
|
103
|
+
</p>
|
|
104
|
+
<p
|
|
105
|
+
v-else-if="rows.length === 0"
|
|
106
|
+
class="text-sm text-dimmed"
|
|
107
|
+
data-test="preview-empty"
|
|
108
|
+
>
|
|
109
|
+
{{ t("nuxtUiMongocamp.aggregation.previewEmpty") }}
|
|
110
|
+
</p>
|
|
111
|
+
<div
|
|
112
|
+
v-else
|
|
113
|
+
class="overflow-x-auto"
|
|
114
|
+
>
|
|
115
|
+
<table
|
|
116
|
+
class="w-full text-left font-mono text-xs"
|
|
117
|
+
data-test="preview-table"
|
|
118
|
+
>
|
|
119
|
+
<thead>
|
|
120
|
+
<tr>
|
|
121
|
+
<th
|
|
122
|
+
v-for="column in columns"
|
|
123
|
+
:key="column"
|
|
124
|
+
class="pr-3 font-medium"
|
|
125
|
+
>
|
|
126
|
+
{{ column }}
|
|
127
|
+
</th>
|
|
128
|
+
</tr>
|
|
129
|
+
</thead>
|
|
130
|
+
<tbody>
|
|
131
|
+
<tr
|
|
132
|
+
v-for="(row, index) in rows"
|
|
133
|
+
:key="index"
|
|
134
|
+
>
|
|
135
|
+
<td
|
|
136
|
+
v-for="column in columns"
|
|
137
|
+
:key="column"
|
|
138
|
+
class="max-w-64 truncate pr-3"
|
|
139
|
+
:title="formatCell(row[column]).full"
|
|
140
|
+
>
|
|
141
|
+
{{ formatCell(row[column]).text }}
|
|
142
|
+
</td>
|
|
143
|
+
</tr>
|
|
144
|
+
</tbody>
|
|
145
|
+
</table>
|
|
146
|
+
</div>
|
|
147
|
+
</div>
|
|
148
|
+
</template>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { RequestStage } from '../utils/aggregationPipeline.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
collectionName: string;
|
|
4
|
+
pipeline: RequestStage[] | undefined;
|
|
5
|
+
stageNumber: number;
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { computed, h,
|
|
2
|
+
import { computed, h, ref, resolveComponent, watch } from "vue";
|
|
3
3
|
import { useI18n } from "#imports";
|
|
4
4
|
import useMongocampCollection from "../composables/useMongocampCollection";
|
|
5
5
|
import { useMongocampBucket } from "../composables/useMongocampBucket";
|
|
6
6
|
import { useMongocampQuery } from "../composables/useMongocampQuery";
|
|
7
|
+
import { parseMetadataJson } from "../utils/filePreview";
|
|
7
8
|
const props = defineProps({
|
|
8
9
|
bucketName: { type: String, required: true }
|
|
9
10
|
});
|
|
@@ -15,7 +16,7 @@ const {
|
|
|
15
16
|
updateFileInformation,
|
|
16
17
|
downloadFile,
|
|
17
18
|
downloadingFileIds,
|
|
18
|
-
|
|
19
|
+
uploadFiles,
|
|
19
20
|
uploading,
|
|
20
21
|
fileActionInFlight
|
|
21
22
|
} = useMongocampBucket();
|
|
@@ -24,13 +25,54 @@ const fileInputRef = ref(null);
|
|
|
24
25
|
function openFilePicker() {
|
|
25
26
|
fileInputRef.value?.click();
|
|
26
27
|
}
|
|
27
|
-
|
|
28
|
+
const uploadProgress = ref(null);
|
|
29
|
+
const uploadResult = ref(null);
|
|
30
|
+
const dragging = ref(false);
|
|
31
|
+
let dragDepth = 0;
|
|
32
|
+
async function handleFiles(list) {
|
|
33
|
+
if (!list.length || uploading.value) return;
|
|
34
|
+
uploadResult.value = null;
|
|
35
|
+
uploadProgress.value = { done: 0, total: list.length };
|
|
36
|
+
try {
|
|
37
|
+
const result = await uploadFiles(props.bucketName, list, {
|
|
38
|
+
onProgress: (done, total2, current) => {
|
|
39
|
+
uploadProgress.value = { done, total: total2, current };
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
uploadResult.value = { uploaded: result.uploaded.length, failed: result.failed };
|
|
43
|
+
if (result.uploaded.length) await fetchFiles();
|
|
44
|
+
} finally {
|
|
45
|
+
uploadProgress.value = null;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
function handleFileSelected(event) {
|
|
28
49
|
const input = event.target;
|
|
29
|
-
const
|
|
50
|
+
const list = Array.from(input.files ?? []);
|
|
30
51
|
input.value = "";
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
52
|
+
return handleFiles(list);
|
|
53
|
+
}
|
|
54
|
+
function hasFiles(event) {
|
|
55
|
+
return Array.from(event.dataTransfer?.types ?? []).includes("Files");
|
|
56
|
+
}
|
|
57
|
+
function onDragEnter(event) {
|
|
58
|
+
if (!hasFiles(event)) return;
|
|
59
|
+
dragDepth++;
|
|
60
|
+
dragging.value = true;
|
|
61
|
+
}
|
|
62
|
+
function onDragLeave() {
|
|
63
|
+
dragDepth = Math.max(0, dragDepth - 1);
|
|
64
|
+
if (!dragDepth) dragging.value = false;
|
|
65
|
+
}
|
|
66
|
+
function onDrop(event) {
|
|
67
|
+
dragDepth = 0;
|
|
68
|
+
dragging.value = false;
|
|
69
|
+
return handleFiles(Array.from(event.dataTransfer?.files ?? []));
|
|
70
|
+
}
|
|
71
|
+
const previewOpen = ref(false);
|
|
72
|
+
const fileToPreview = ref(void 0);
|
|
73
|
+
function openPreview(file) {
|
|
74
|
+
fileToPreview.value = file;
|
|
75
|
+
previewOpen.value = true;
|
|
34
76
|
}
|
|
35
77
|
const UButton = resolveComponent("UButton");
|
|
36
78
|
const UTooltip = resolveComponent("UTooltip");
|
|
@@ -89,45 +131,37 @@ function makeMetadataCell() {
|
|
|
89
131
|
}
|
|
90
132
|
const isRenameModalOpen = ref(false);
|
|
91
133
|
const fileToRename = ref(void 0);
|
|
92
|
-
const
|
|
93
|
-
const
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
name: "metadata",
|
|
103
|
-
label: t("nuxtUiMongocamp.bucketFiles.columnMetadata"),
|
|
104
|
-
children: [
|
|
105
|
-
{ $formkit: "nuxtUIInput", name: "key", label: t("nuxtUiMongocamp.bucketFiles.metadataKey") },
|
|
106
|
-
{ $formkit: "nuxtUIInput", name: "value", label: t("nuxtUiMongocamp.bucketFiles.metadataValue") }
|
|
107
|
-
]
|
|
108
|
-
}
|
|
109
|
-
]);
|
|
134
|
+
const renameFilename = ref("");
|
|
135
|
+
const renameMetadata = ref("");
|
|
136
|
+
const renameSaving = ref(false);
|
|
137
|
+
const metadataParse = computed(() => parseMetadataJson(renameMetadata.value));
|
|
138
|
+
const metadataError = computed(() => {
|
|
139
|
+
const parsed = metadataParse.value;
|
|
140
|
+
if (parsed.ok) return "";
|
|
141
|
+
return parsed.reason === "invalid-json" ? t("nuxtUiMongocamp.bucketFiles.metadataInvalidJson") : t("nuxtUiMongocamp.bucketFiles.metadataNotObject");
|
|
142
|
+
});
|
|
143
|
+
const canSaveRename = computed(() => !!renameFilename.value.trim() && metadataParse.value.ok);
|
|
110
144
|
function openRename(file) {
|
|
111
145
|
fileToRename.value = file;
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
metadata: Object.entries(file.metadata ?? {}).map(([key, value]) => ({ key, value }))
|
|
115
|
-
};
|
|
146
|
+
renameFilename.value = file.filename;
|
|
147
|
+
renameMetadata.value = Object.keys(file.metadata ?? {}).length ? JSON.stringify(file.metadata, null, 2) : "";
|
|
116
148
|
isRenameModalOpen.value = true;
|
|
117
149
|
}
|
|
118
150
|
async function handleRenameSave() {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
151
|
+
const parsed = metadataParse.value;
|
|
152
|
+
if (!fileToRename.value || !parsed.ok || !renameFilename.value.trim()) return;
|
|
153
|
+
renameSaving.value = true;
|
|
154
|
+
try {
|
|
155
|
+
const success = await updateFileInformation(props.bucketName, fileToRename.value.id, {
|
|
156
|
+
filename: renameFilename.value.trim(),
|
|
157
|
+
metadata: parsed.value
|
|
158
|
+
});
|
|
159
|
+
if (success) {
|
|
160
|
+
isRenameModalOpen.value = false;
|
|
161
|
+
await fetchFiles();
|
|
162
|
+
}
|
|
163
|
+
} finally {
|
|
164
|
+
renameSaving.value = false;
|
|
131
165
|
}
|
|
132
166
|
}
|
|
133
167
|
const isDeleteModalOpen = ref(false);
|
|
@@ -151,6 +185,14 @@ function makeActionsColumn() {
|
|
|
151
185
|
cell: ({ row }) => {
|
|
152
186
|
const file = row.original;
|
|
153
187
|
return h("div", { class: "flex gap-1 justify-end" }, [
|
|
188
|
+
withTooltip(t("nuxtUiMongocamp.bucketFiles.previewTooltip"), h(UButton, {
|
|
189
|
+
"icon": "i-lucide-eye",
|
|
190
|
+
"color": "neutral",
|
|
191
|
+
"variant": "ghost",
|
|
192
|
+
"size": "sm",
|
|
193
|
+
"aria-label": t("nuxtUiMongocamp.bucketFiles.previewTooltip"),
|
|
194
|
+
"onClick": () => openPreview(file)
|
|
195
|
+
})),
|
|
154
196
|
withTooltip(t("nuxtUiMongocamp.bucketFiles.downloadFileTooltip"), h(UButton, {
|
|
155
197
|
"icon": "i-lucide-download",
|
|
156
198
|
"color": "neutral",
|
|
@@ -261,7 +303,20 @@ watch(() => props.bucketName, init, { immediate: true });
|
|
|
261
303
|
</script>
|
|
262
304
|
|
|
263
305
|
<template>
|
|
264
|
-
<div
|
|
306
|
+
<div
|
|
307
|
+
class="relative flex flex-col gap-4"
|
|
308
|
+
@dragenter.prevent="onDragEnter"
|
|
309
|
+
@dragover.prevent
|
|
310
|
+
@dragleave.prevent="onDragLeave"
|
|
311
|
+
@drop.prevent="onDrop"
|
|
312
|
+
>
|
|
313
|
+
<div
|
|
314
|
+
v-if="dragging"
|
|
315
|
+
class="absolute inset-0 z-10 flex items-center justify-center rounded border-2 border-dashed border-primary bg-default/80 text-sm font-medium pointer-events-none"
|
|
316
|
+
data-testid="drop-overlay"
|
|
317
|
+
>
|
|
318
|
+
{{ t("nuxtUiMongocamp.bucketFiles.dropHere") }}
|
|
319
|
+
</div>
|
|
265
320
|
<div class="flex items-center justify-between gap-4">
|
|
266
321
|
<UInput
|
|
267
322
|
v-model="filterText"
|
|
@@ -289,6 +344,7 @@ watch(() => props.bucketName, init, { immediate: true });
|
|
|
289
344
|
<input
|
|
290
345
|
ref="fileInputRef"
|
|
291
346
|
type="file"
|
|
347
|
+
multiple
|
|
292
348
|
class="hidden"
|
|
293
349
|
@change="handleFileSelected"
|
|
294
350
|
>
|
|
@@ -310,6 +366,37 @@ watch(() => props.bucketName, init, { immediate: true });
|
|
|
310
366
|
/>
|
|
311
367
|
</div>
|
|
312
368
|
</div>
|
|
369
|
+
<UAlert
|
|
370
|
+
v-if="uploadProgress"
|
|
371
|
+
color="neutral"
|
|
372
|
+
variant="subtle"
|
|
373
|
+
icon="i-lucide-upload"
|
|
374
|
+
:title="t('nuxtUiMongocamp.bucketFiles.uploadProgress', { done: uploadProgress.done, total: uploadProgress.total })"
|
|
375
|
+
:description="uploadProgress.current"
|
|
376
|
+
/>
|
|
377
|
+
<UAlert
|
|
378
|
+
v-else-if="uploadResult"
|
|
379
|
+
:color="uploadResult.failed.length ? 'warning' : 'success'"
|
|
380
|
+
variant="subtle"
|
|
381
|
+
:icon="uploadResult.failed.length ? 'i-lucide-triangle-alert' : 'i-lucide-circle-check'"
|
|
382
|
+
:title="t('nuxtUiMongocamp.bucketFiles.uploadSummary', { uploaded: uploadResult.uploaded, failed: uploadResult.failed.length })"
|
|
383
|
+
close
|
|
384
|
+
@update:open="uploadResult = null"
|
|
385
|
+
>
|
|
386
|
+
<template
|
|
387
|
+
v-if="uploadResult.failed.length"
|
|
388
|
+
#description
|
|
389
|
+
>
|
|
390
|
+
<ul class="list-disc pl-4 text-xs">
|
|
391
|
+
<li
|
|
392
|
+
v-for="item in uploadResult.failed"
|
|
393
|
+
:key="item.name"
|
|
394
|
+
>
|
|
395
|
+
{{ item.name }}: {{ item.message }}
|
|
396
|
+
</li>
|
|
397
|
+
</ul>
|
|
398
|
+
</template>
|
|
399
|
+
</UAlert>
|
|
313
400
|
<MongocampErrorAlert
|
|
314
401
|
:error="loadError"
|
|
315
402
|
@retry="fetchFiles"
|
|
@@ -342,16 +429,50 @@ watch(() => props.bucketName, init, { immediate: true });
|
|
|
342
429
|
:ui="{ footer: 'justify-end' }"
|
|
343
430
|
>
|
|
344
431
|
<template #body>
|
|
345
|
-
<
|
|
346
|
-
:
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
432
|
+
<div class="flex flex-col gap-4">
|
|
433
|
+
<UFormField :label="t('nuxtUiMongocamp.bucketFiles.filename')">
|
|
434
|
+
<UInput
|
|
435
|
+
v-model="renameFilename"
|
|
436
|
+
class="w-full"
|
|
437
|
+
/>
|
|
438
|
+
</UFormField>
|
|
439
|
+
<UFormField
|
|
440
|
+
:label="t('nuxtUiMongocamp.bucketFiles.columnMetadata')"
|
|
441
|
+
:help="t('nuxtUiMongocamp.bucketFiles.metadataHelp')"
|
|
442
|
+
:error="metadataError || void 0"
|
|
443
|
+
>
|
|
444
|
+
<UTextarea
|
|
445
|
+
v-model="renameMetadata"
|
|
446
|
+
:rows="8"
|
|
447
|
+
class="w-full font-mono"
|
|
448
|
+
data-testid="metadata-json"
|
|
449
|
+
/>
|
|
450
|
+
</UFormField>
|
|
451
|
+
</div>
|
|
452
|
+
</template>
|
|
453
|
+
<template #footer>
|
|
454
|
+
<UButton
|
|
455
|
+
:label="t('nuxtUiMongocamp.common.cancel')"
|
|
456
|
+
color="neutral"
|
|
457
|
+
variant="ghost"
|
|
458
|
+
@click="isRenameModalOpen = false"
|
|
459
|
+
/>
|
|
460
|
+
<UButton
|
|
461
|
+
:label="t('nuxtUiMongocamp.common.save')"
|
|
462
|
+
icon="i-lucide-save"
|
|
463
|
+
:disabled="!canSaveRename"
|
|
464
|
+
:loading="renameSaving"
|
|
465
|
+
@click="handleRenameSave"
|
|
351
466
|
/>
|
|
352
467
|
</template>
|
|
353
468
|
</UModal>
|
|
354
469
|
|
|
470
|
+
<MongocampFilePreview
|
|
471
|
+
v-model:open="previewOpen"
|
|
472
|
+
:bucket-name="bucketName"
|
|
473
|
+
:file="fileToPreview"
|
|
474
|
+
/>
|
|
475
|
+
|
|
355
476
|
<UModal
|
|
356
477
|
v-model:open="isDeleteModalOpen"
|
|
357
478
|
:title="t('nuxtUiMongocamp.bucketFiles.deleteFileTitle')"
|
|
@@ -2,6 +2,19 @@ type __VLS_Props = {
|
|
|
2
2
|
selected: string[];
|
|
3
3
|
deleting?: boolean;
|
|
4
4
|
error?: string;
|
|
5
|
+
pageCount?: number;
|
|
6
|
+
total?: number;
|
|
7
|
+
allMatching?: boolean;
|
|
8
|
+
collecting?: {
|
|
9
|
+
loaded: number;
|
|
10
|
+
target?: number;
|
|
11
|
+
} | null;
|
|
12
|
+
note?: string;
|
|
13
|
+
confirmName?: string;
|
|
14
|
+
progress?: {
|
|
15
|
+
done: number;
|
|
16
|
+
total: number;
|
|
17
|
+
} | null;
|
|
5
18
|
};
|
|
6
19
|
declare const __VLS_template: () => {
|
|
7
20
|
__VLS_Slots: {
|
|
@@ -12,11 +25,17 @@ type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
|
12
25
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
13
26
|
open: () => any;
|
|
14
27
|
clear: () => any;
|
|
28
|
+
stop: () => any;
|
|
15
29
|
confirm: () => any;
|
|
30
|
+
selectAll: () => any;
|
|
31
|
+
cancelCollect: () => any;
|
|
16
32
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
17
33
|
onOpen?: (() => any) | undefined;
|
|
18
34
|
onClear?: (() => any) | undefined;
|
|
35
|
+
onStop?: (() => any) | undefined;
|
|
19
36
|
onConfirm?: (() => any) | undefined;
|
|
37
|
+
onSelectAll?: (() => any) | undefined;
|
|
38
|
+
onCancelCollect?: (() => any) | undefined;
|
|
20
39
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
40
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
22
41
|
declare const _default: typeof __VLS_export;
|
|
@@ -5,13 +5,26 @@ const PREVIEW_LIMIT = 5;
|
|
|
5
5
|
const props = defineProps({
|
|
6
6
|
selected: { type: Array, required: true },
|
|
7
7
|
deleting: { type: Boolean, required: false },
|
|
8
|
-
error: { type: String, required: false }
|
|
8
|
+
error: { type: String, required: false },
|
|
9
|
+
pageCount: { type: Number, required: false },
|
|
10
|
+
total: { type: Number, required: false },
|
|
11
|
+
allMatching: { type: Boolean, required: false },
|
|
12
|
+
collecting: { type: [Object, null], required: false },
|
|
13
|
+
note: { type: String, required: false },
|
|
14
|
+
confirmName: { type: String, required: false },
|
|
15
|
+
progress: { type: [Object, null], required: false }
|
|
9
16
|
});
|
|
10
|
-
const emit = defineEmits(["confirm", "clear", "open"]);
|
|
17
|
+
const emit = defineEmits(["confirm", "clear", "open", "selectAll", "cancelCollect", "stop"]);
|
|
11
18
|
const { t } = useI18n();
|
|
12
19
|
const isOpen = ref(false);
|
|
20
|
+
const typed = ref("");
|
|
21
|
+
const confirmed = computed(() => !props.confirmName || typed.value.trim() === props.confirmName);
|
|
22
|
+
const offerSelectAll = computed(
|
|
23
|
+
() => !props.allMatching && !props.collecting && props.total !== void 0 && props.pageCount !== void 0 && props.pageCount > 0 && props.selected.length === props.pageCount && props.total > props.pageCount
|
|
24
|
+
);
|
|
13
25
|
function openModal() {
|
|
14
26
|
emit("open");
|
|
27
|
+
typed.value = "";
|
|
15
28
|
isOpen.value = true;
|
|
16
29
|
}
|
|
17
30
|
const preview = computed(() => props.selected.slice(0, PREVIEW_LIMIT));
|
|
@@ -23,28 +36,75 @@ watch(() => props.deleting, (now, before) => {
|
|
|
23
36
|
|
|
24
37
|
<template>
|
|
25
38
|
<div
|
|
26
|
-
v-if="selected.length > 0"
|
|
27
|
-
class="flex
|
|
39
|
+
v-if="selected.length > 0 || collecting || note"
|
|
40
|
+
class="flex flex-col gap-1"
|
|
28
41
|
>
|
|
29
|
-
<
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
42
|
+
<div
|
|
43
|
+
v-if="selected.length > 0"
|
|
44
|
+
class="flex flex-wrap items-center gap-3 rounded-md border border-default bg-elevated/50 px-3 py-2"
|
|
45
|
+
>
|
|
46
|
+
<span class="text-sm font-medium">
|
|
47
|
+
{{ allMatching ? t("nuxtUiMongocamp.bulk.allMatchingSelected", { count: selected.length }) : t("nuxtUiMongocamp.bulk.selectedCount", { count: selected.length }) }}
|
|
48
|
+
</span>
|
|
49
|
+
<UButton
|
|
50
|
+
icon="i-lucide-trash-2"
|
|
51
|
+
color="error"
|
|
52
|
+
variant="subtle"
|
|
53
|
+
size="sm"
|
|
54
|
+
:label="t('nuxtUiMongocamp.bulk.deleteSelected')"
|
|
55
|
+
@click="openModal"
|
|
56
|
+
/>
|
|
57
|
+
<slot name="actions" />
|
|
58
|
+
<UButton
|
|
59
|
+
color="neutral"
|
|
60
|
+
variant="ghost"
|
|
61
|
+
size="sm"
|
|
62
|
+
:label="t('nuxtUiMongocamp.bulk.clearSelection')"
|
|
63
|
+
@click="emit('clear')"
|
|
64
|
+
/>
|
|
65
|
+
</div>
|
|
66
|
+
<div
|
|
67
|
+
v-if="offerSelectAll"
|
|
68
|
+
class="flex flex-wrap items-center gap-2 px-3 text-sm"
|
|
69
|
+
data-test="select-all-banner"
|
|
70
|
+
>
|
|
71
|
+
<span>{{ t("nuxtUiMongocamp.bulk.pageSelected", { count: pageCount }) }}</span>
|
|
72
|
+
<UButton
|
|
73
|
+
color="primary"
|
|
74
|
+
variant="link"
|
|
75
|
+
size="sm"
|
|
76
|
+
class="p-0"
|
|
77
|
+
:label="t('nuxtUiMongocamp.bulk.selectAllMatching', { total })"
|
|
78
|
+
@click="emit('selectAll')"
|
|
79
|
+
/>
|
|
80
|
+
</div>
|
|
81
|
+
<div
|
|
82
|
+
v-if="collecting"
|
|
83
|
+
class="flex items-center gap-2 px-3 text-sm"
|
|
84
|
+
role="status"
|
|
85
|
+
data-test="collecting"
|
|
86
|
+
>
|
|
87
|
+
<UIcon
|
|
88
|
+
name="i-lucide-loader-circle"
|
|
89
|
+
class="size-4 animate-spin"
|
|
90
|
+
/>
|
|
91
|
+
<span>{{ collecting.target === void 0 ? t("nuxtUiMongocamp.bulk.collectingUnknown", { loaded: collecting.loaded }) : t("nuxtUiMongocamp.bulk.collecting", { loaded: collecting.loaded, target: collecting.target }) }}</span>
|
|
92
|
+
<UButton
|
|
93
|
+
color="neutral"
|
|
94
|
+
variant="ghost"
|
|
95
|
+
size="sm"
|
|
96
|
+
:label="t('nuxtUiMongocamp.bulk.cancelCollecting')"
|
|
97
|
+
@click="emit('cancelCollect')"
|
|
98
|
+
/>
|
|
99
|
+
</div>
|
|
100
|
+
<p
|
|
101
|
+
v-if="note"
|
|
102
|
+
class="px-3 text-sm text-warning"
|
|
103
|
+
role="status"
|
|
104
|
+
data-test="bulk-note"
|
|
105
|
+
>
|
|
106
|
+
{{ note }}
|
|
107
|
+
</p>
|
|
48
108
|
</div>
|
|
49
109
|
|
|
50
110
|
<UModal
|
|
@@ -69,6 +129,32 @@ watch(() => props.deleting, (now, before) => {
|
|
|
69
129
|
>
|
|
70
130
|
{{ t("nuxtUiMongocamp.bulk.moreItems", { count: hiddenCount }) }}
|
|
71
131
|
</p>
|
|
132
|
+
<UFormField
|
|
133
|
+
v-if="confirmName"
|
|
134
|
+
class="mt-3"
|
|
135
|
+
:label="t('nuxtUiMongocamp.bulk.typeToConfirmLabel')"
|
|
136
|
+
:help="t('nuxtUiMongocamp.bulk.typeToConfirm', { name: confirmName })"
|
|
137
|
+
>
|
|
138
|
+
<UInput
|
|
139
|
+
v-model="typed"
|
|
140
|
+
class="w-full"
|
|
141
|
+
autocomplete="off"
|
|
142
|
+
:disabled="deleting"
|
|
143
|
+
:aria-label="t('nuxtUiMongocamp.bulk.typeToConfirmLabel')"
|
|
144
|
+
/>
|
|
145
|
+
</UFormField>
|
|
146
|
+
<div
|
|
147
|
+
v-if="deleting && progress"
|
|
148
|
+
class="mt-3 flex flex-col gap-1"
|
|
149
|
+
role="status"
|
|
150
|
+
data-test="delete-progress"
|
|
151
|
+
>
|
|
152
|
+
<UProgress
|
|
153
|
+
:model-value="progress.done"
|
|
154
|
+
:max="progress.total"
|
|
155
|
+
/>
|
|
156
|
+
<span class="text-sm text-dimmed">{{ t("nuxtUiMongocamp.bulk.progressDelete", progress) }}</span>
|
|
157
|
+
</div>
|
|
72
158
|
<UAlert
|
|
73
159
|
v-if="error"
|
|
74
160
|
class="mt-3"
|
|
@@ -80,6 +166,14 @@ watch(() => props.deleting, (now, before) => {
|
|
|
80
166
|
</template>
|
|
81
167
|
<template #footer>
|
|
82
168
|
<UButton
|
|
169
|
+
v-if="deleting && progress"
|
|
170
|
+
:label="t('nuxtUiMongocamp.bulk.stop')"
|
|
171
|
+
color="neutral"
|
|
172
|
+
variant="soft"
|
|
173
|
+
@click="emit('stop')"
|
|
174
|
+
/>
|
|
175
|
+
<UButton
|
|
176
|
+
v-else
|
|
83
177
|
:label="t('nuxtUiMongocamp.common.cancel')"
|
|
84
178
|
color="neutral"
|
|
85
179
|
variant="ghost"
|
|
@@ -90,6 +184,7 @@ watch(() => props.deleting, (now, before) => {
|
|
|
90
184
|
:label="t('nuxtUiMongocamp.bulk.confirmDelete', { count: selected.length })"
|
|
91
185
|
color="error"
|
|
92
186
|
:loading="deleting"
|
|
187
|
+
:disabled="!confirmed"
|
|
93
188
|
@click="emit('confirm')"
|
|
94
189
|
/>
|
|
95
190
|
</template>
|