diff --git a/packages/nc-gui/components/dashboard/settings/UIAcl.vue b/packages/nc-gui/components/dashboard/settings/UIAcl.vue
index 5321768132..a48c20372a 100644
--- a/packages/nc-gui/components/dashboard/settings/UIAcl.vue
+++ b/packages/nc-gui/components/dashboard/settings/UIAcl.vue
@@ -16,6 +16,8 @@ import {
useNuxtApp,
} from '#imports'
+type Role = 'editor' | 'commenter' | 'viewer'
+
const props = defineProps<{
sourceId: string
}>()
@@ -39,6 +41,12 @@ const tables = ref
([])
const searchInput = ref('')
+const selectAll = ref({
+ editor: false,
+ commenter: false,
+ viewer: false,
+})
+
const filteredTables = computed(() =>
tables.value.filter(
(el) =>
@@ -80,15 +88,21 @@ async function saveUIAcl() {
$e('a:proj-meta:ui-acl')
}
-const onRoleCheck = (record: any, role: string) => {
+const onRoleCheck = (record: any, role: Role) => {
record.disabled[role] = !record.disabled[role]
record.edited = true
+
+ selectAll.value[role as Role] = filteredTables.value.every((t) => !t.disabled[role])
}
onMounted(async () => {
if (tables.value.length === 0) {
await loadTableList()
}
+
+ for (const role of roles.value) {
+ selectAll.value[role as Role] = filteredTables.value.every((t) => !t.disabled[role])
+ }
})
const tableHeaderRenderer = (label: string) => () => h('div', { class: 'text-gray-500' }, label)
@@ -96,11 +110,11 @@ const tableHeaderRenderer = (label: string) => () => h('div', { class: 'text-gra
const columns = [
{
title: tableHeaderRenderer(t('labels.tableName')),
- name: 'table_name',
+ name: 'Table Name',
},
{
title: tableHeaderRenderer(t('labels.viewName')),
- name: 'view_name',
+ name: 'View Name',
},
{
title: tableHeaderRenderer(t('objects.roleType.editor')),
@@ -118,6 +132,16 @@ const columns = [
width: 120,
},
]
+
+const toggleSelectAll = (role: Role) => {
+ selectAll.value[role] = !selectAll.value[role]
+ const enabled = selectAll.value[role]
+
+ filteredTables.value.forEach((t) => {
+ t.disabled[role] = !enabled
+ t.edited = true
+ })
+}
@@ -163,12 +187,23 @@ const columns = [
})
"
>
+
+
+
+
toggleSelectAll(column.name)" />
+
+ {{ column.name }}
+
+
+
+ {{ column.name }}
+
-
+
@@ -179,7 +214,7 @@ const columns = [
-
+
@@ -202,10 +237,10 @@ const columns = [
>
-
diff --git a/packages/nc-gui/components/dlg/QuickImport.vue b/packages/nc-gui/components/dlg/QuickImport.vue
index b60ddacd00..43b7d9d5f0 100644
--- a/packages/nc-gui/components/dlg/QuickImport.vue
+++ b/packages/nc-gui/components/dlg/QuickImport.vue
@@ -31,12 +31,12 @@ import {
useBase,
useGlobal,
useI18n,
+ useNuxtApp,
useVModel,
} from '#imports'
// import worker script according to the doc of Vite
import importWorkerUrl from '~/workers/importWorker?worker&url'
-import { useNuxtApp } from '#app'
interface Props {
modelValue: boolean
diff --git a/packages/nc-gui/components/general/CopyUrl.vue b/packages/nc-gui/components/general/CopyUrl.vue
index 05a721354c..c51f6a037e 100644
--- a/packages/nc-gui/components/general/CopyUrl.vue
+++ b/packages/nc-gui/components/general/CopyUrl.vue
@@ -40,18 +40,29 @@ const copyUrl = async () => {
{{ url }}
-
-
-
-
-
-
+
+
+ {{ $t('activity.openInANewTab') }}
+
+
+
+
+
+
+
+
+ {{ $t('activity.copyIFrameCode') }}
+
+
+
+
+