Browse Source

fix(nc-gui): disable duplicate connection for sqlite

pull/9265/head
Ramesh Mane 3 months ago
parent
commit
f51e746f81
  1. 28
      packages/nc-gui/components/workspace/integrations/ConnectionsTab.vue

28
packages/nc-gui/components/workspace/integrations/ConnectionsTab.vue

@ -501,10 +501,30 @@ onKeyStroke('ArrowDown', onDown)
<GeneralIcon class="text-gray-800" icon="edit" /> <GeneralIcon class="text-gray-800" icon="edit" />
<span>{{ $t('general.edit') }}</span> <span>{{ $t('general.edit') }}</span>
</NcMenuItem> </NcMenuItem>
<NcMenuItem @click="duplicateIntegration(integration)"> <NcTooltip :disabled="integration?.sub_type !== ClientType.SQLITE">
<GeneralIcon class="text-gray-800" icon="duplicate" /> <template #title>
<span>{{ $t('general.duplicate') }}</span> Not allowed for type
</NcMenuItem> {{
integration.sub_type && clientTypesMap[integration.sub_type]
? clientTypesMap[integration.sub_type]?.text
: integration.sub_type
}}
</template>
<NcMenuItem
@click="duplicateIntegration(integration)"
:disabled="integration?.sub_type === ClientType.SQLITE"
>
<GeneralIcon
:class="{
'text-current': integration?.sub_type === ClientType.SQLITE,
'text-gray-800': integration?.sub_type !== ClientType.SQLITE,
}"
icon="duplicate"
/>
<span>{{ $t('general.duplicate') }}</span>
</NcMenuItem>
</NcTooltip>
<NcDivider /> <NcDivider />
<NcMenuItem class="!text-red-500 !hover:bg-red-50" @click="openDeleteIntegration(integration)"> <NcMenuItem class="!text-red-500 !hover:bg-red-50" @click="openDeleteIntegration(integration)">
<GeneralIcon icon="delete" /> <GeneralIcon icon="delete" />

Loading…
Cancel
Save