mirror of
https://github.com/nocodb/nocodb.git
synced 2026-05-02 11:26:48 +00:00
feat: sync fw (#10671)
* feat: sync table init * feat: sync table (WIP) * feat: oauth flow for github * feat: sync feature flag * feat: progress for sync * feat: revise sync status * feat: incremental support for sync * feat: disable insert & delete operations on synced tables * feat: handle synced & readonly on frontend * test: apply system column order (always initial) * test: change wrong index * fix: PR requested changes * test: overlapping variable names
This commit is contained in:
@@ -68,6 +68,8 @@ const isTableDeleteDialogVisible = ref(false)
|
||||
|
||||
const isOptionsOpen = ref(false)
|
||||
|
||||
const isSyncModalOpen = ref(false)
|
||||
|
||||
const input = ref<HTMLInputElement>()
|
||||
|
||||
/** Is editing the table name enabled */
|
||||
@@ -241,6 +243,11 @@ const duplicateTable = (table: SidebarTableNode) => {
|
||||
_duplicateTable(table)
|
||||
}
|
||||
|
||||
const onSyncOptions = () => {
|
||||
isOptionsOpen.value = false
|
||||
isSyncModalOpen.value = true
|
||||
}
|
||||
|
||||
const focusInput = () => {
|
||||
setTimeout(() => {
|
||||
input.value?.focus()
|
||||
@@ -477,9 +484,16 @@ async function onRename() {
|
||||
{{ $t('general.changeIcon') }}
|
||||
</template>
|
||||
|
||||
<component
|
||||
:is="iconMap.sync"
|
||||
v-if="table.synced"
|
||||
class="w-4 text-sm"
|
||||
:class="isTableOpened ? '!text-brand-600/85' : '!text-gray-600/75'"
|
||||
/>
|
||||
|
||||
<component
|
||||
:is="iconMap.table"
|
||||
v-if="table.type === 'table'"
|
||||
v-else-if="table.type === 'table'"
|
||||
class="w-4 text-sm"
|
||||
:class="isTableOpened ? '!text-brand-600/85' : '!text-gray-600/75'"
|
||||
/>
|
||||
@@ -596,6 +610,18 @@ async function onRename() {
|
||||
</div>
|
||||
</NcMenuItem>
|
||||
|
||||
<NcMenuItem
|
||||
v-if="isUIAllowed('tableRename', { roles: baseRole, source })"
|
||||
:data-testid="`sidebar-table-sync-${table.title}`"
|
||||
class="nc-table-sync"
|
||||
@click="onSyncOptions"
|
||||
>
|
||||
<div v-e="['c:table:sync']" class="flex gap-2 items-center">
|
||||
<GeneralIcon icon="sync" class="opacity-80" />
|
||||
Sync Options
|
||||
</div>
|
||||
</NcMenuItem>
|
||||
|
||||
<NcMenuItem
|
||||
v-if="isUIAllowed('tableDescriptionEdit', { roles: baseRole, source })"
|
||||
:data-testid="`sidebar-table-description-${table.title}`"
|
||||
@@ -679,6 +705,12 @@ async function onRename() {
|
||||
:table-id="table.id"
|
||||
:base-id="base.id"
|
||||
/>
|
||||
<LazyDashboardSettingsSyncEdit
|
||||
v-if="table.id && table.synced && base?.id && isSyncModalOpen"
|
||||
v-model:open="isSyncModalOpen"
|
||||
:table-id="table.id"
|
||||
:base-id="base.id"
|
||||
/>
|
||||
|
||||
<DashboardTreeViewViewsList v-if="isExpanded" :table-id="table.id" :base-id="base.id" @deleted="refreshViews" />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user