Browse Source

Merge pull request #3101 from nocodb/feat/gui-v2-project-meta-scroll

feat(gui-v2): settings modal overflow
pull/3110/head
navi 2 years ago committed by GitHub
parent
commit
30162138f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 32
      packages/nc-gui-v2/components/dashboard/settings/Metadata.vue
  2. 3
      packages/nc-gui-v2/components/dashboard/settings/Modal.vue
  3. 80
      packages/nc-gui-v2/components/dashboard/settings/UIAcl.vue

32
packages/nc-gui-v2/components/dashboard/settings/Metadata.vue

@ -86,20 +86,22 @@ const columns = [
</div> </div>
</a-button> </a-button>
</div> </div>
<a-table <div class="max-h-600px overflow-y-auto">
class="w-full" <a-table
size="small" class="w-full"
:custom-row=" size="small"
(record) => ({ :custom-row="
class: `nc-metasync-row nc-metasync-row-${record.title}`, (record) => ({
}) class: `nc-metasync-row nc-metasync-row-${record.title}`,
" })
:data-source="metadiff ?? []" "
:columns="columns" :data-source="metadiff ?? []"
:pagination="false" :columns="columns"
:loading="isLoading" :pagination="false"
bordered :loading="isLoading"
/> bordered
/>
</div>
</div> </div>
<div class="flex place-content-center w-2/5"> <div class="flex place-content-center w-2/5">
<div v-if="isDifferent"> <div v-if="isDifferent">
@ -115,4 +117,4 @@ const columns = [
</div> </div>
</div> </div>
</div> </div>
</template> </template>

3
packages/nc-gui-v2/components/dashboard/settings/Modal.vue

@ -149,6 +149,7 @@ watch(
<style scoped> <style scoped>
.modal-body { .modal-body {
@apply min-h-[75vh]; @apply h-[75vh];
@apply overflow-y-auto;
} }
</style> </style>

80
packages/nc-gui-v2/components/dashboard/settings/UIAcl.vue

@ -120,47 +120,49 @@ const columns = [
</div> </div>
</a-button> </a-button>
</div> </div>
<a-table <div class="max-h-600px overflow-y-auto">
class="w-full" <a-table
size="small" class="w-full"
:data-source="filteredTables" size="small"
:columns="columns" :data-source="filteredTables"
:pagination="false" :columns="columns"
:loading="isLoading" :pagination="false"
bordered :loading="isLoading"
:custom-row=" bordered
(record) => ({ :custom-row="
class: `nc-acl-table-row nc-acl-table-row-${record.title}`, (record) => ({
}) class: `nc-acl-table-row nc-acl-table-row-${record.title}`,
" })
> "
<template #bodyCell="{ record, column }"> >
<div v-if="column.name === 'table_name'">{{ record._ptn }}</div> <template #bodyCell="{ record, column }">
<div v-if="column.name === 'view_name'"> <div v-if="column.name === 'table_name'">{{ record._ptn }}</div>
<div class="flex align-center"> <div v-if="column.name === 'view_name'">
<component :is="viewIcons[record.type].icon" :class="`text-${viewIcons[record.type].color} mr-1`" /> <div class="flex align-center">
{{ record.title }} <component :is="viewIcons[record.type].icon" :class="`text-${viewIcons[record.type].color} mr-1`" />
{{ record.title }}
</div>
</div> </div>
</div> <div v-for="role in roles" :key="role">
<div v-for="role in roles" :key="role"> <div v-if="column.name === role">
<div v-if="column.name === role"> <a-tooltip>
<a-tooltip> <template #title>
<template #title> <span v-if="record.disabled[role]">
<span v-if="record.disabled[role]"> Click to make '{{ record.title }}' visible for role:{{ role }} in UI dashboard</span
Click to make '{{ record.title }}' visible for role:{{ role }} in UI dashboard</span >
> <span v-else>Click to hide '{{ record.title }}' for role:{{ role }} in UI dashboard</span>
<span v-else>Click to hide '{{ record.title }}' for role:{{ role }} in UI dashboard</span> </template>
</template> <a-checkbox
<a-checkbox :checked="!record.disabled[role]"
:checked="!record.disabled[role]" :class="`nc-acl-${record.title}-${role}-chkbox`"
:class="`nc-acl-${record.title}-${role}-chkbox`" @change="onRoleCheck(record, role)"
@change="onRoleCheck(record, role)" ></a-checkbox>
></a-checkbox> </a-tooltip>
</a-tooltip> </div>
</div> </div>
</div> </template>
</template> </a-table>
</a-table> </div>
</div> </div>
</div> </div>
</template> </template>

Loading…
Cancel
Save