From f1a313d42db72aa983cf47bb30b1021cbae4d074 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Mon, 18 Jul 2022 19:38:36 +0530 Subject: [PATCH] feat(gui-v2): add project delete and edit options Signed-off-by: Pranav C --- packages/nc-gui-v2/components.d.ts | 2 ++ .../nc-gui-v2/pages/index/index/index.vue | 25 +++++++++----- packages/nc-gui-v2/pages/index/index/list.vue | 14 ++++++-- packages/nc-gui-v2/pages/projects/index.vue | 34 +++++++++++++------ 4 files changed, 54 insertions(+), 21 deletions(-) diff --git a/packages/nc-gui-v2/components.d.ts b/packages/nc-gui-v2/components.d.ts index c7c6c62015..7a7c569e03 100644 --- a/packages/nc-gui-v2/components.d.ts +++ b/packages/nc-gui-v2/components.d.ts @@ -7,6 +7,7 @@ export {} declare module '@vue/runtime-core' { export interface GlobalComponents { + '(feat(gui-v2)': add project delete and edit options) ADivider: typeof import('ant-design-vue/es')['Divider'] ADropdown: typeof import('ant-design-vue/es')['Dropdown'] ALayout: typeof import('ant-design-vue/es')['Layout'] @@ -16,6 +17,7 @@ declare module '@vue/runtime-core' { AMenu: typeof import('ant-design-vue/es')['Menu'] AMenuDivider: typeof import('ant-design-vue/es')['MenuDivider'] AMenuItem: typeof import('ant-design-vue/es')['MenuItem'] + AModal: typeof import('ant-design-vue/es')['Modal'] ASubMenu: typeof import('ant-design-vue/es')['SubMenu'] ATable: typeof import('ant-design-vue/es')['Table'] RouterLink: typeof import('vue-router')['RouterLink'] diff --git a/packages/nc-gui-v2/pages/index/index/index.vue b/packages/nc-gui-v2/pages/index/index/index.vue index 16c35bc7f1..c5ba344c60 100644 --- a/packages/nc-gui-v2/pages/index/index/index.vue +++ b/packages/nc-gui-v2/pages/index/index/index.vue @@ -2,11 +2,11 @@ import type { ProjectType } from 'nocodb-sdk' import { navigateTo } from '#app' import useColors from '~/composables/useColors' -import MdiStarOutline from '~icons/mdi/star-outline' import MdiMenuDown from '~icons/mdi/menu-down' import MdiDeleteOutline from '~icons/mdi/delete-outline' import MdiPlus from '~icons/mdi/plus' import MdiDatabaseOutline from '~icons/mdi/database-outline' +import MdiEditOutline from '~icons/mdi/edit-outline' interface Props { projects: ProjectType[] @@ -72,18 +72,25 @@ const formatTitle = (title: string) =>
{{ formatTitle(project.title) }} - +
diff --git a/packages/nc-gui-v2/pages/index/index/list.vue b/packages/nc-gui-v2/pages/index/index/list.vue index 6670452987..e0967af75c 100644 --- a/packages/nc-gui-v2/pages/index/index/list.vue +++ b/packages/nc-gui-v2/pages/index/index/list.vue @@ -2,12 +2,17 @@ import type { ProjectType } from 'nocodb-sdk' import { navigateTo } from '#app' +import MdiDeleteOutline from '~icons/mdi/delete-outline' +import MdiEditOutline from '~icons/mdi/edit-outline' + interface Props { projects: ProjectType[] } const { projects } = defineProps() +const emit = defineEmits(['delete-project']) + const { $e } = useNuxtApp() const openProject = async (project: ProjectType) => { @@ -18,22 +23,27 @@ const openProject = async (project: ProjectType) => {