From 24891ec0c0fa427cf30b986d29be68da3b0a2a5b Mon Sep 17 00:00:00 2001 From: Pranav C Date: Sat, 9 Jul 2022 23:25:20 +0530 Subject: [PATCH] refactor(gui-v2): move constants to a common place Signed-off-by: Pranav C --- packages/nc-gui-v2/components/cell/Attachment.vue | 3 ++- .../nc-gui-v2/components/smartsheet-toolbar/MoreActions.vue | 5 +++-- packages/nc-gui-v2/components/virtual-cell/BelongsTo.vue | 4 ++-- packages/nc-gui-v2/components/virtual-cell/HasMany.vue | 6 +++--- packages/nc-gui-v2/components/virtual-cell/ManyToMany.vue | 6 +++--- .../components/virtual-cell/components/ListChildItems.vue | 5 +++-- .../components/virtual-cell/components/ListItems.vue | 5 +++-- packages/nc-gui-v2/composables/useViewData.ts | 5 +++-- packages/nc-gui-v2/lib/constants.ts | 1 + 9 files changed, 23 insertions(+), 17 deletions(-) create mode 100644 packages/nc-gui-v2/lib/constants.ts diff --git a/packages/nc-gui-v2/components/cell/Attachment.vue b/packages/nc-gui-v2/components/cell/Attachment.vue index 129ce8984c..e78c0d6d55 100644 --- a/packages/nc-gui-v2/components/cell/Attachment.vue +++ b/packages/nc-gui-v2/components/cell/Attachment.vue @@ -4,6 +4,7 @@ import { inject, ref, watchEffect } from '#imports' import { useNuxtApp } from '#app' import { ColumnInj, MetaInj } from '~/components' import useProject from '~/composables/useProject' +import { NOCO } from '~/lib/constants' import { isImage } from '~/utils/fileUtils' import MaterialPlusIcon from '~icons/mdi/plus' import MaterialArrowExpandIcon from '~icons/mdi/arrow-expand' @@ -81,7 +82,7 @@ const onFileSelection = async (e) => { try { const data = await $api.storage.upload( { - path: ['noco', project.value.title, meta?.value?.title, column?.title].join('/'), + path: [NOCO, project.value.title, meta?.value?.title, column?.title].join('/'), }, { files: file, diff --git a/packages/nc-gui-v2/components/smartsheet-toolbar/MoreActions.vue b/packages/nc-gui-v2/components/smartsheet-toolbar/MoreActions.vue index d8f042813e..e0358e4432 100644 --- a/packages/nc-gui-v2/components/smartsheet-toolbar/MoreActions.vue +++ b/packages/nc-gui-v2/components/smartsheet-toolbar/MoreActions.vue @@ -1,6 +1,7 @@