diff --git a/packages/nc-gui-v2/components/dashboard/TreeView.vue b/packages/nc-gui-v2/components/dashboard/TreeView.vue index e13eadd331..9969bacf2a 100644 --- a/packages/nc-gui-v2/components/dashboard/TreeView.vue +++ b/packages/nc-gui-v2/components/dashboard/TreeView.vue @@ -239,7 +239,7 @@ const addTableTab = (table: TableType) => { - + diff --git a/packages/nc-gui-v2/components/dlg/AirtableImport.vue b/packages/nc-gui-v2/components/dlg/AirtableImport.vue index da7e6e7f8c..390c4a4511 100644 --- a/packages/nc-gui-v2/components/dlg/AirtableImport.vue +++ b/packages/nc-gui-v2/components/dlg/AirtableImport.vue @@ -2,6 +2,7 @@ import io from 'socket.io-client' import type { Socket } from 'socket.io-client' import { Form } from 'ant-design-vue' +import type { Card as AntCard } from 'ant-design-vue' import { useToast } from 'vue-toastification' import { fieldRequiredValidator } from '~/utils/validation' import { extractSdkResponseErrorMsg } from '~/utils/errorUtils' @@ -14,18 +15,30 @@ interface Props { } const { modelValue } = defineProps() + const emit = defineEmits(['update:modelValue']) // TODO: handle baseURL const baseURL = 'http://localhost:8080' // this.$axios.defaults.baseURL const { $state } = useNuxtApp() + const toast = useToast() + const { sqlUi, project, loadTables } = useProject() + const loading = ref(false) + +const showGoToDashboardButton = ref(false) + const step = ref(1) + const progress = ref[]>([]) + +const logRef = ref() + let socket: Socket | null + const syncSource = ref({ id: '', type: 'Airtable', @@ -64,6 +77,7 @@ const dialogShow = computed({ }) const useForm = Form.useForm + const { resetFields, validate, validateInfos } = useForm(syncSource, validators) const disableImportButton = computed(() => { @@ -194,7 +208,14 @@ onMounted(async () => { socket.on('progress', async (d: Record) => { progress.value.push(d) + + // FIXME: this doesn't work + nextTick(() => { + ;(logRef.value?.$el as HTMLDivElement).scrollTo() + }) + if (d.status === 'COMPLETED') { + showGoToDashboardButton.value = true await loadTables() // TODO: add tab of the first table } @@ -210,7 +231,7 @@ onBeforeUnmount(() => {