From 00b2996a922333d9db235bb9b87db3aaaa1b6988 Mon Sep 17 00:00:00 2001 From: Muhammed Mustafa Date: Fri, 22 Jul 2022 22:27:14 +0530 Subject: [PATCH 1/6] refactor/gui-v2-settings-modal-added --- packages/nc-gui-v2/components.d.ts | 2 +- .../dashboard/settings/AuditTab.vue | 44 +++--- .../dashboard/settings/SettingsModal.vue | 147 ++++++++++++++++++ packages/nc-gui-v2/package.json | 1 + 4 files changed, 172 insertions(+), 22 deletions(-) create mode 100644 packages/nc-gui-v2/components/dashboard/settings/SettingsModal.vue diff --git a/packages/nc-gui-v2/components.d.ts b/packages/nc-gui-v2/components.d.ts index 598349f0f6..1bdea8dc28 100644 --- a/packages/nc-gui-v2/components.d.ts +++ b/packages/nc-gui-v2/components.d.ts @@ -50,4 +50,4 @@ declare module '@vue/runtime-core' { RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] } -} +} \ No newline at end of file diff --git a/packages/nc-gui-v2/components/dashboard/settings/AuditTab.vue b/packages/nc-gui-v2/components/dashboard/settings/AuditTab.vue index 66f17fcc67..8ac63e235d 100644 --- a/packages/nc-gui-v2/components/dashboard/settings/AuditTab.vue +++ b/packages/nc-gui-v2/components/dashboard/settings/AuditTab.vue @@ -45,35 +45,36 @@ async function loadAudits(page = currentPage, limit = currentLimit) { onMounted(async () => { if (audits === null) { - await loadProject(projectId) await loadAudits(currentPage, currentLimit) } }) +const tableHeaderRenderer = (label: string) => (value: { text: string }) => h('div', { class: 'text-gray-500' }, label) + const columns = [ { - title: 'Operation Type', + title: tableHeaderRenderer('Operation Type'), dataIndex: 'op_type', key: 'op_type', }, { - title: 'Operation sub-type', + title: tableHeaderRenderer('Operation sub-type'), dataIndex: 'op_sub_type', key: 'op_sub_type', }, { - title: 'Description', + title: tableHeaderRenderer('Description'), dataIndex: 'description', key: 'description', }, { - title: 'User', + title: tableHeaderRenderer('User'), dataIndex: 'user', key: 'user', - customRender: (value: { text: string }) => h('div', () => value.text || 'Shared base'), + customRender: (value: { text: string }) => h('div', {}, value.text || 'Shared base'), }, { - title: 'Created', + title: tableHeaderRenderer('Created'), dataIndex: 'created_at', key: 'created_at', sort: 'desc', @@ -85,21 +86,22 @@ const columns = [ diff --git a/packages/nc-gui-v2/components/dashboard/settings/SettingsModal.vue b/packages/nc-gui-v2/components/dashboard/settings/SettingsModal.vue new file mode 100644 index 0000000000..496dac8f55 --- /dev/null +++ b/packages/nc-gui-v2/components/dashboard/settings/SettingsModal.vue @@ -0,0 +1,147 @@ + + + + + diff --git a/packages/nc-gui-v2/package.json b/packages/nc-gui-v2/package.json index 62b794d2e4..359b6a0d18 100644 --- a/packages/nc-gui-v2/package.json +++ b/packages/nc-gui-v2/package.json @@ -30,6 +30,7 @@ "@iconify-json/clarity": "^1.1.4", "@iconify-json/material-symbols": "^1.1.8", "@iconify-json/mdi": "^1.1.25", + "@iconify-json/ri": "^1.1.3", "@intlify/vite-plugin-vue-i18n": "^4.0.0", "@types/sortablejs": "^1.13.0", "@vitejs/plugin-vue": "^2.3.3", From 472b1bf4233a6429df93dd09295432e356064a95 Mon Sep 17 00:00:00 2001 From: Muhammed Mustafa Date: Sat, 23 Jul 2022 11:08:52 +0530 Subject: [PATCH 2/6] refactor/gui-v2-settings-modal-minor-cleanup --- .../dashboard/settings/SettingsModal.vue | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/nc-gui-v2/components/dashboard/settings/SettingsModal.vue b/packages/nc-gui-v2/components/dashboard/settings/SettingsModal.vue index 496dac8f55..e56d1e8ae8 100644 --- a/packages/nc-gui-v2/components/dashboard/settings/SettingsModal.vue +++ b/packages/nc-gui-v2/components/dashboard/settings/SettingsModal.vue @@ -1,5 +1,5 @@