Browse Source

refactor(gui-v2): code cleanup

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/2730/head
Pranav C 2 years ago
parent
commit
7ebdd6b840
  1. 31
      packages/nc-gui-v2/pages/projects/index/create-external.vue

31
packages/nc-gui-v2/pages/projects/index/create-external.vue

@ -126,17 +126,10 @@ watch(
<template>
<a-card class="max-w-[600px] mx-auto !mt-100px" :title="$t('activity.createProject')">
<a-form :model="formState" name="validate_other" layout="horizontal" :label-col="{ span: 8 }" :wrapper-col="{ span: 18 }">
<!-- <a-row :gutter="24"> -->
<!-- <a-col span="24"> -->
<!-- Enter Project Name -->
<a-form-item :label="$t('placeholder.projName')" v-bind="validateInfos.title">
<a-input v-model:value="formState.title" size="small" />
</a-form-item>
<!-- </a-col> -->
<!-- <a-col :span="24" class="text-center text-md font-medium mb-3 mt-1"> -->
<!-- {{ $t('title.dbCredentials') }} -->
<!-- </a-col> -->
<!-- <a-col :span="8"> -->
<a-form-item :label="$t('labels.dbType')" v-bind="validateInfos['dataSource.client']">
<a-select v-model:value="formState.dataSource.client" size="small" @change="onClientChange">
<a-select-option v-for="client in clientTypes" :key="client.value" :value="client.value"
@ -144,28 +137,18 @@ watch(
</a-select-option>
</a-select>
</a-form-item>
<!-- </a-col> -->
<!-- <a-col :span="8"> -->
<a-form-item :label="$t('labels.hostAddress')" v-bind="validateInfos['dataSource.connection.host']">
<a-input v-model:value="formState.dataSource.connection.host" size="small" />
</a-form-item>
<!-- </a-col> -->
<!-- <a-col :span="8"> -->
<a-form-item :label="$t('labels.port')" v-bind="validateInfos['dataSource.connection.port']">
<a-input-number v-model:value="formState.dataSource.connection.port" class="!w-full" size="small" />
</a-form-item>
<!-- </a-col> -->
<!-- <a-col :span="8"> -->
<a-form-item :label="$t('labels.username')" v-bind="validateInfos['dataSource.connection.user']">
<a-input v-model:value="formState.dataSource.connection.user" size="small" />
</a-form-item>
<!-- </a-col> -->
<!-- <a-col :span="8"> -->
<a-form-item :label="$t('labels.password')">
<a-input-password v-model:value="formState.dataSource.connection.password" size="small" />
</a-form-item>
<!-- </a-col> -->
<!-- <a-col :span="8"> -->
<a-form-item :label="$t('labels.database')" v-bind="validateInfos['dataSource.connection.database']">
<a-input
v-model:value="formState.dataSource.connection.database"
@ -173,9 +156,6 @@ watch(
size="small"
/>
</a-form-item>
<!-- </a-col> -->
<!-- </a-row> -->
<a-collapse ghost expand-icon-position="right">
<a-collapse-panel key="1" header="Advance options">
<a-form-item :label="$t('lables.ssl')" v-bind="validateInfos['dataSource.ssl']">
@ -185,8 +165,6 @@ watch(
</a-form-item>
<a-form-item :label="$t('labels.dbCredentials')">
<!-- <a-input v-model:value="formState.dataSource.connection.database" size="small" /> -->
<div class="flex gap-2">
<a-tooltip placement="top">
<template #title>
@ -215,8 +193,7 @@ watch(
</div>
</a-form-item>
<!-- <v-row> -->
<!-- <v-col> -->
<a-form-item :label="$t('labels.inflection.tableName')" v-bind="validateInfos['dataSource.client']">
<a-select v-model:value="formState.dataSource.client" size="small" @change="onClientChange">
<a-select-option v-for="client in clientTypes" :key="client.value" :value="client.value"
@ -224,8 +201,6 @@ watch(
</a-select-option>
</a-select>
</a-form-item>
<!-- </v-col> -->
<!-- <v-col> -->
<a-form-item :label="$t('labels.inflection.columnName')" v-bind="validateInfos['dataSource.client']">
<a-select v-model:value="formState.dataSource.client" size="small" @change="onClientChange">
<a-select-option v-for="client in clientTypes" :key="client.value" :value="client.value"
@ -233,8 +208,6 @@ watch(
</a-select-option>
</a-select>
</a-form-item>
<!-- </v-col> -->
<!-- </v-row> -->
<div class="flex justify-end">
<a-button size="small" @click="configEditDlg = true">
<!-- Edit connection JSON -->

Loading…
Cancel
Save