|
|
@ -48,6 +48,8 @@ const easterEgg = ref(false) |
|
|
|
|
|
|
|
|
|
|
|
const easterEggCount = ref(0) |
|
|
|
const easterEggCount = ref(0) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const advancedOptionsExpansionPanel = ref<string[]>([]) |
|
|
|
|
|
|
|
|
|
|
|
const onEasterEgg = () => { |
|
|
|
const onEasterEgg = () => { |
|
|
|
easterEggCount.value += 1 |
|
|
|
easterEggCount.value += 1 |
|
|
|
if (easterEggCount.value >= 2) { |
|
|
|
if (easterEggCount.value >= 2) { |
|
|
@ -335,8 +337,17 @@ const allowDataWrite = computed({ |
|
|
|
}, |
|
|
|
}, |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const handleUpdateAdvancedOptionsExpansionPanel = (open: boolean) => { |
|
|
|
|
|
|
|
if (open) { |
|
|
|
|
|
|
|
advancedOptionsExpansionPanel.value = ['1'] |
|
|
|
|
|
|
|
handleAutoScroll(true, 'nc-source-advanced-options') |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
advancedOptionsExpansionPanel.value = [] |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
let timer: any |
|
|
|
let timer: any |
|
|
|
const handleAutoScroll = (scroll: boolean, className: string) => { |
|
|
|
function handleAutoScroll(scroll: boolean, className: string) { |
|
|
|
if (scroll) { |
|
|
|
if (scroll) { |
|
|
|
if (timer) { |
|
|
|
if (timer) { |
|
|
|
clearTimeout(timer) |
|
|
|
clearTimeout(timer) |
|
|
@ -369,11 +380,10 @@ const handleAutoScroll = (scroll: boolean, className: string) => { |
|
|
|
class="flex flex-col gap-5.5" |
|
|
|
class="flex flex-col gap-5.5" |
|
|
|
> |
|
|
|
> |
|
|
|
<div class="nc-form-section"> |
|
|
|
<div class="nc-form-section"> |
|
|
|
<div class="nc-form-section-title">Source details</div> |
|
|
|
|
|
|
|
<div class="nc-form-section-body"> |
|
|
|
<div class="nc-form-section-body"> |
|
|
|
<a-row :gutter="24"> |
|
|
|
<a-row :gutter="24"> |
|
|
|
<a-col :span="12"> |
|
|
|
<a-col :span="12"> |
|
|
|
<a-form-item label="Source name" v-bind="validateInfos.title"> |
|
|
|
<a-form-item label="Data Source Name" v-bind="validateInfos.title"> |
|
|
|
<a-input v-model:value="formState.title" class="nc-extdb-proj-name" /> |
|
|
|
<a-input v-model:value="formState.title" class="nc-extdb-proj-name" /> |
|
|
|
</a-form-item> |
|
|
|
</a-form-item> |
|
|
|
</a-col> |
|
|
|
</a-col> |
|
|
@ -420,8 +430,6 @@ const handleAutoScroll = (scroll: boolean, className: string) => { |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div class="nc-form-section"> |
|
|
|
<div class="nc-form-section"> |
|
|
|
<div class="nc-form-section-title">Connection details</div> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="nc-form-section-body"> |
|
|
|
<div class="nc-form-section-body"> |
|
|
|
<!-- SQLite File --> |
|
|
|
<!-- SQLite File --> |
|
|
|
<template v-if="formState.dataSource.client === ClientType.SQLITE"> </template> |
|
|
|
<template v-if="formState.dataSource.client === ClientType.SQLITE"> </template> |
|
|
@ -515,14 +523,14 @@ const handleAutoScroll = (scroll: boolean, className: string) => { |
|
|
|
<template |
|
|
|
<template |
|
|
|
v-if="![ClientType.SQLITE, ClientType.SNOWFLAKE, ClientType.DATABRICKS].includes(formState.dataSource.client)" |
|
|
|
v-if="![ClientType.SQLITE, ClientType.SNOWFLAKE, ClientType.DATABRICKS].includes(formState.dataSource.client)" |
|
|
|
> |
|
|
|
> |
|
|
|
<a-collapse |
|
|
|
<a-collapse v-model:active-key="advancedOptionsExpansionPanel" ghost class="nc-source-advanced-options !mt-4"> |
|
|
|
ghost |
|
|
|
|
|
|
|
expand-icon-position="right" |
|
|
|
|
|
|
|
class="nc-source-advanced-options !mt-4" |
|
|
|
|
|
|
|
@change="handleAutoScroll(!!$event?.length, 'nc-source-advanced-options')" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<template #expandIcon="{ isActive }"> |
|
|
|
<template #expandIcon="{ isActive }"> |
|
|
|
<NcButton type="text" size="xsmall"> |
|
|
|
<NcButton |
|
|
|
|
|
|
|
type="text" |
|
|
|
|
|
|
|
size="small" |
|
|
|
|
|
|
|
class="!-ml-1.5" |
|
|
|
|
|
|
|
@click="handleUpdateAdvancedOptionsExpansionPanel(!advancedOptionsExpansionPanel.length)" |
|
|
|
|
|
|
|
> |
|
|
|
<GeneralIcon |
|
|
|
<GeneralIcon |
|
|
|
icon="chevronDown" |
|
|
|
icon="chevronDown" |
|
|
|
class="flex-none cursor-pointer transform transition-transform duration-500" |
|
|
|
class="flex-none cursor-pointer transform transition-transform duration-500" |
|
|
@ -530,11 +538,9 @@ const handleAutoScroll = (scroll: boolean, className: string) => { |
|
|
|
/> |
|
|
|
/> |
|
|
|
</NcButton> |
|
|
|
</NcButton> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<a-collapse-panel key="1"> |
|
|
|
<a-collapse-panel key="1" collapsible="disabled"> |
|
|
|
<template #header> |
|
|
|
<template #header> |
|
|
|
<div class="flex"> |
|
|
|
<span></span> |
|
|
|
<div class="nc-form-section-title">Advanced options</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<div class="flex flex-col gap-4"> |
|
|
|
<div class="flex flex-col gap-4"> |
|
|
@ -631,7 +637,7 @@ const handleAutoScroll = (scroll: boolean, className: string) => { |
|
|
|
@apply p-5 w-[320px] border-l-1 border-gray-200 flex flex-col gap-4 bg-gray-50 rounded-br-2xl; |
|
|
|
@apply p-5 w-[320px] border-l-1 border-gray-200 flex flex-col gap-4 bg-gray-50 rounded-br-2xl; |
|
|
|
} |
|
|
|
} |
|
|
|
:deep(.ant-collapse-header) { |
|
|
|
:deep(.ant-collapse-header) { |
|
|
|
@apply !-mt-4 !p-0 flex items-center; |
|
|
|
@apply !-mt-4 !p-0 flex items-center !cursor-default children:first:flex; |
|
|
|
} |
|
|
|
} |
|
|
|
:deep(.ant-collapse-icon-position-right > .ant-collapse-item > .ant-collapse-header .ant-collapse-arrow) { |
|
|
|
:deep(.ant-collapse-icon-position-right > .ant-collapse-item > .ant-collapse-header .ant-collapse-arrow) { |
|
|
|
@apply !right-0; |
|
|
|
@apply !right-0; |
|
|
|