From 3ab5ff0b798addba2ea88e06aa5baa7a50f11b9b Mon Sep 17 00:00:00 2001 From: Pranav C Date: Thu, 21 Jul 2022 15:14:15 +0530 Subject: [PATCH] refactor(gui-v2): validation message update and code cleanup Signed-off-by: Pranav C --- packages/nc-gui-v2/pages/index/index.vue | 23 +++++++++++++++---- .../nc-gui-v2/pages/project/index/[id].vue | 4 ++-- .../pages/project/index/create-external.vue | 2 +- .../nc-gui-v2/pages/project/index/create.vue | 7 +++--- 4 files changed, 25 insertions(+), 11 deletions(-) diff --git a/packages/nc-gui-v2/pages/index/index.vue b/packages/nc-gui-v2/pages/index/index.vue index 2300cef20a..f8f11a4645 100644 --- a/packages/nc-gui-v2/pages/index/index.vue +++ b/packages/nc-gui-v2/pages/index/index.vue @@ -13,7 +13,7 @@ import MdiMenuDown from '~icons/mdi/menu-down' import MdiPlus from '~icons/mdi/plus' import MdiDatabaseOutline from '~icons/mdi/database-outline' -const { $api, $state } = useNuxtApp() +const { $api, $state, $e } = useNuxtApp() const toast = useToast() const filterQuery = ref('') @@ -34,6 +34,7 @@ const filteredProjects = computed(() => { }) const deleteProject = (project: ProjectType) => { + $e('c:project:delete') Modal.confirm({ title: `Do you want to delete '${project.title}' project?`, okText: 'Yes', @@ -41,6 +42,7 @@ const deleteProject = (project: ProjectType) => { cancelText: 'No', async onOk() { try { + $e('c:project:delete') await $api.project.delete(project.id as string) projects.value.splice(projects.value.indexOf(project), 1) } catch (e) { @@ -65,7 +67,11 @@ $state.sidebarOpen.value = false {{ $t('title.myProject') }} - +
@@ -87,6 +93,7 @@ $state.sidebarOpen.value = false