|
|
@ -1,7 +1,7 @@ |
|
|
|
<script lang="ts" setup> |
|
|
|
<script lang="ts" setup> |
|
|
|
import type { UploadChangeParam, UploadFile } from 'ant-design-vue' |
|
|
|
import type { UploadChangeParam, UploadFile } from 'ant-design-vue' |
|
|
|
import { message } from 'ant-design-vue' |
|
|
|
import { message } from 'ant-design-vue' |
|
|
|
import { ref, useDialog, useDropZone, useFileDialog, useNuxtApp, watch } from '#imports' |
|
|
|
import { ref, useDialog, useDropZone, useFileDialog, useNuxtApp, useProject, watch } from '#imports' |
|
|
|
import DlgQuickImport from '~/components/dlg/QuickImport.vue' |
|
|
|
import DlgQuickImport from '~/components/dlg/QuickImport.vue' |
|
|
|
|
|
|
|
|
|
|
|
const dropZone = ref<HTMLDivElement>() |
|
|
|
const dropZone = ref<HTMLDivElement>() |
|
|
@ -10,6 +10,8 @@ const { isOverDropZone } = useDropZone(dropZone, onDrop) |
|
|
|
|
|
|
|
|
|
|
|
const { files, open, reset } = useFileDialog() |
|
|
|
const { files, open, reset } = useFileDialog() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const { isSharedBase } = useProject() |
|
|
|
|
|
|
|
|
|
|
|
const { $e } = useNuxtApp() |
|
|
|
const { $e } = useNuxtApp() |
|
|
|
|
|
|
|
|
|
|
|
type QuickImportTypes = 'excel' | 'json' | 'csv' |
|
|
|
type QuickImportTypes = 'excel' | 'json' | 'csv' |
|
|
@ -106,7 +108,11 @@ function openQuickImportDialog(type: QuickImportTypes, file: File) { |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<div ref="dropZone" class="h-full w-full text-gray-600 flex items-center justify-center relative"> |
|
|
|
<div class="h-full w-full text-gray-600 flex items-center justify-center relative"> |
|
|
|
|
|
|
|
<div v-if="isSharedBase" class="flex flex-col gap-6 items-center justify-center mx-auto text-center"> |
|
|
|
|
|
|
|
<div class="text-3xl">Welcome to NocoDB!</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div v-else ref="dropZone"> |
|
|
|
<general-overlay |
|
|
|
<general-overlay |
|
|
|
:model-value="true" |
|
|
|
:model-value="true" |
|
|
|
:class="[isOverDropZone ? 'bg-gray-300/75 border-primary shadow' : 'bg-gray-100/25 border-gray-500 cursor-pointer']" |
|
|
|
:class="[isOverDropZone ? 'bg-gray-300/75 border-primary shadow' : 'bg-gray-100/25 border-gray-500 cursor-pointer']" |
|
|
@ -129,4 +135,5 @@ function openQuickImportDialog(type: QuickImportTypes, file: File) { |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|