Browse Source

fix(gui-v2): disable project index for share base

pull/3234/head
Wing-Kam Wong 2 years ago
parent
commit
bb2b876a4d
  1. 11
      packages/nc-gui-v2/pages/[projectType]/[projectId]/index/index/index.vue

11
packages/nc-gui-v2/pages/[projectType]/[projectId]/index/index/index.vue

@ -1,7 +1,7 @@
<script lang="ts" setup>
import type { UploadChangeParam, UploadFile } 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'
const dropZone = ref<HTMLDivElement>()
@ -10,6 +10,8 @@ const { isOverDropZone } = useDropZone(dropZone, onDrop)
const { files, open, reset } = useFileDialog()
const { isSharedBase } = useProject()
const { $e } = useNuxtApp()
type QuickImportTypes = 'excel' | 'json' | 'csv'
@ -106,7 +108,11 @@ function openQuickImportDialog(type: QuickImportTypes, file: File) {
</script>
<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
:model-value="true"
: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>
</template>

Loading…
Cancel
Save