From ad920891a1184d4de8e405f3b41f168357ef7a48 Mon Sep 17 00:00:00 2001 From: mertmit Date: Wed, 6 Sep 2023 17:50:57 +0300 Subject: [PATCH] chore: get rid of unused parts without explanation Signed-off-by: mertmit --- .../components/cell/attachment/utils.ts | 2 - .../dashboard/TreeView/BaseOptions.vue | 61 ------------------- .../nc-gui/components/dlg/TableCreate.vue | 20 ------ .../nc-gui/components/general/DeleteModal.vue | 7 --- packages/nc-gui/components/project/View.vue | 11 ---- .../smartsheet/toolbar/ColumnFilterMenu.vue | 2 - .../smartsheet/toolbar/GroupByMenu.vue | 14 ++++- .../components/workspace/ProjectList.vue | 7 --- 8 files changed, 13 insertions(+), 111 deletions(-) diff --git a/packages/nc-gui/components/cell/attachment/utils.ts b/packages/nc-gui/components/cell/attachment/utils.ts index 7938e256b6..2cfceac17c 100644 --- a/packages/nc-gui/components/cell/attachment/utils.ts +++ b/packages/nc-gui/components/cell/attachment/utils.ts @@ -33,8 +33,6 @@ export const [useProvideAttachmentCell, useAttachmentCell] = useInjectionState( (updateModelValue: (data: string | Record[]) => void) => { const isReadonly = inject(ReadonlyInj, ref(false)) - // const isLockedMode = inject(IsLockedInj, ref(false)) - const isPublic = inject(IsPublicInj, ref(false)) const isForm = inject(IsFormInj, ref(false)) diff --git a/packages/nc-gui/components/dashboard/TreeView/BaseOptions.vue b/packages/nc-gui/components/dashboard/TreeView/BaseOptions.vue index 4991507861..0dc681a9de 100644 --- a/packages/nc-gui/components/dashboard/TreeView/BaseOptions.vue +++ b/packages/nc-gui/components/dashboard/TreeView/BaseOptions.vue @@ -114,65 +114,4 @@ function openQuickImportDialog(type: string) { - - - diff --git a/packages/nc-gui/components/dlg/TableCreate.vue b/packages/nc-gui/components/dlg/TableCreate.vue index 45011775fa..0c69aadd0c 100644 --- a/packages/nc-gui/components/dlg/TableCreate.vue +++ b/packages/nc-gui/components/dlg/TableCreate.vue @@ -152,27 +152,7 @@ onMounted(() => { :placeholder="$t('msg.info.enterTableName')" /> -
- - -
diff --git a/packages/nc-gui/components/general/DeleteModal.vue b/packages/nc-gui/components/general/DeleteModal.vue index 62de49a4e2..61eaed3145 100644 --- a/packages/nc-gui/components/general/DeleteModal.vue +++ b/packages/nc-gui/components/general/DeleteModal.vue @@ -52,13 +52,6 @@ onKeyStroke('Enter', () => { - -
{{ $t('general.cancel') }} diff --git a/packages/nc-gui/components/project/View.vue b/packages/nc-gui/components/project/View.vue index c32e2694a9..2542871b55 100644 --- a/packages/nc-gui/components/project/View.vue +++ b/packages/nc-gui/components/project/View.vue @@ -115,17 +115,6 @@ watch( -
diff --git a/packages/nc-gui/components/smartsheet/toolbar/ColumnFilterMenu.vue b/packages/nc-gui/components/smartsheet/toolbar/ColumnFilterMenu.vue index 16368b3395..16f19617c3 100644 --- a/packages/nc-gui/components/smartsheet/toolbar/ColumnFilterMenu.vue +++ b/packages/nc-gui/components/smartsheet/toolbar/ColumnFilterMenu.vue @@ -19,8 +19,6 @@ const isLocked = inject(IsLockedInj, ref(false)) const activeView = inject(ActiveViewInj, ref()) -// const isPublic = inject(IsPublicInj, ref(false)) - const { filterAutoSave, isMobileMode } = useGlobal() const filterComp = ref() diff --git a/packages/nc-gui/components/smartsheet/toolbar/GroupByMenu.vue b/packages/nc-gui/components/smartsheet/toolbar/GroupByMenu.vue index 73cd5b9ea6..be838bfe15 100644 --- a/packages/nc-gui/components/smartsheet/toolbar/GroupByMenu.vue +++ b/packages/nc-gui/components/smartsheet/toolbar/GroupByMenu.vue @@ -10,6 +10,7 @@ import { inject, ref, useMenuCloseOnEsc, + useNuxtApp, useSmartsheetStoreOrThrow, } from '#imports' @@ -28,6 +29,8 @@ const isLocked = inject(IsLockedInj, ref(false)) const { gridViewCols, updateGridViewColumn } = useGridViewColumnOrThrow() +const { $e } = useNuxtApp() + const _groupBy = ref<{ fk_column_id?: string; sort: string; order: number }[]>([]) const groupBy = computed<{ fk_column_id?: string; sort: string; order: number }[]>(() => { @@ -106,6 +109,8 @@ const saveGroupBy = async () => { } } + $e('a:group-by:update', { groupBy: groupBy.value }) + eventBus.emit(SmartsheetStoreEvents.GROUP_BY_RELOAD) } catch (e) { message.error('There was an error while updating view!') @@ -200,7 +205,13 @@ watch(open, () => { - + @@ -208,6 +219,7 @@ watch(open, () => {
{ }) } -/* -const moveProject = (project: ProjectType) => { - selectedProjectToMove.value = project - isMoveDlgOpen.value = true -} -*/ - const isDuplicateDlgOpen = ref(false) const selectedProjectToDuplicate = ref()