Browse Source

chore: get rid of unused parts without explanation

Signed-off-by: mertmit <mertmit99@gmail.com>
pull/6315/head
mertmit 1 year ago
parent
commit
ad920891a1
  1. 2
      packages/nc-gui/components/cell/attachment/utils.ts
  2. 61
      packages/nc-gui/components/dashboard/TreeView/BaseOptions.vue
  3. 20
      packages/nc-gui/components/dlg/TableCreate.vue
  4. 7
      packages/nc-gui/components/general/DeleteModal.vue
  5. 11
      packages/nc-gui/components/project/View.vue
  6. 2
      packages/nc-gui/components/smartsheet/toolbar/ColumnFilterMenu.vue
  7. 14
      packages/nc-gui/components/smartsheet/toolbar/GroupByMenu.vue
  8. 7
      packages/nc-gui/components/workspace/ProjectList.vue

2
packages/nc-gui/components/cell/attachment/utils.ts

@ -33,8 +33,6 @@ export const [useProvideAttachmentCell, useAttachmentCell] = useInjectionState(
(updateModelValue: (data: string | Record<string, any>[]) => 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))

61
packages/nc-gui/components/dashboard/TreeView/BaseOptions.vue

@ -114,65 +114,4 @@ function openQuickImportDialog(type: string) {
</div>
</a-menu-item>
</a-sub-menu>
<!-- Connect to new datasource -->
<!-- <a-menu-divider v-if="false" class="my-0" />
<a-sub-menu>
<template #title>
<div class="nc-project-menu-item group">
<GeneralIcon icon="datasource" class="group-hover:text-black" />
Connect to new datasource
<div class="flex-1" />
<MaterialSymbolsChevronRightRounded class="transform group-hover:(scale-115 text-accent) text-xl text-gray-400" />
</div>
</template>
<template #expandIcon></template>
<a-menu-item key="connect-new-source" @click="toggleDialog(true, 'dataSources', ClientType.MYSQL, project.id)">
<div class="color-transition nc-project-menu-item group">
<LogosMysqlIcon class="group-hover:text-black" />
MySQL
</div>
</a-menu-item>
<a-menu-item key="connect-new-source" @click="toggleDialog(true, 'dataSources', ClientType.PG, project.id)">
<div class="color-transition nc-project-menu-item group">
<LogosPostgresql class="group-hover:text-black" />
Postgres
</div>
</a-menu-item>
<a-menu-item key="connect-new-source" @click="toggleDialog(true, 'dataSources', ClientType.SQLITE, project.id)">
<div class="color-transition nc-project-menu-item group">
<VscodeIconsFileTypeSqlite class="group-hover:text-black" />
SQLite
</div>
</a-menu-item>
<a-menu-item key="connect-new-source" @click="toggleDialog(true, 'dataSources', ClientType.MSSQL, project.id)">
<div class="color-transition nc-project-menu-item group">
<SimpleIconsMicrosoftsqlserver class="group-hover:text-black" />
MSSQL
</div>
</a-menu-item>
<a-menu-item
v-if="appInfo.ee"
key="connect-new-source"
@click="toggleDialog(true, 'dataSources', ClientType.SNOWFLAKE, project.id)"
>
<div class="color-transition nc-project-menu-item group">
<LogosSnowflakeIcon class="group-hover:text-black" />
Snowflake
</div>
</a-menu-item>
<a-menu-item v-if="isUIAllowed('importRequest', false, projectRole)" key="add-new-table" class="py-1 rounded-b">
<a
v-e="['e:datasource:import-request']"
href="https://github.com/nocodb/nocodb/issues/2052"
target="_blank"
class="prose-sm hover:(!text-primary !opacity-100) color-transition nc-project-menu-item group after:(!rounded-b)"
>
<GeneralIcon icon="openInNew" class="group-hover:text-black" />
{{ $t('labels.requestDataSource') }}
</a>
</a-menu-item>
</a-sub-menu> -->
</template>

20
packages/nc-gui/components/dlg/TableCreate.vue

@ -152,27 +152,7 @@ onMounted(() => {
:placeholder="$t('msg.info.enterTableName')"
/>
</a-form-item>
<!--
<div v-if="false" class="flex justify-end items-center">
<div
class="pointer flex flex-row items-center gap-x-1 cursor-pointer"
@click="isAdvanceOptVisible = !isAdvanceOptVisible"
>
{{ isAdvanceOptVisible ? $t('general.hideAll') : $t('general.showMore') }}
<component :is="iconMap.minusCircle" v-if="isAdvanceOptVisible" class="text-gray-500" />
<component :is="iconMap.plusCircle" v-else class="text-gray-500" />
</div>
</div>
-->
<div class="nc-table-advanced-options" :class="{ active: isAdvanceOptVisible }">
<!-- hint="Table name as saved in database" -->
<!-- <div v-if="!project.prefix" class="mb-2">{{ $t('msg.info.tableNameInDb') }}</div>
<a-form-item v-if="!project.prefix" v-bind="validateInfos.table_name">
<a-input v-model:value="table.table_name" size="large" hide-details :placeholder="$t('msg.info.tableNameInDb')" />
</a-form-item> -->
<div>
<div class="mb-1">
<!-- Add Default Columns -->

7
packages/nc-gui/components/general/DeleteModal.vue

@ -52,13 +52,6 @@ onKeyStroke('Enter', () => {
<slot name="entity-preview"></slot>
<!--
<div v-if="false" class="flex flex-row items-center py-2 px-3 border-1 border-gray-100 rounded-lg text-gray-700">
<GeneralIcon icon="warning" class="text-orange-500"></GeneralIcon>
<div class="pl-2.5 text-gray-500">This action cannot be undone</div>
</div>
-->
<div class="flex flex-row gap-x-2 mt-2.5 pt-2.5 justify-end">
<NcButton type="secondary" @click="visible = false">
{{ $t('general.cancel') }}

11
packages/nc-gui/components/project/View.vue

@ -115,17 +115,6 @@ watch(
</template>
<DashboardSettingsDataSources v-model:state="baseSettingsState" />
</a-tab-pane>
<!--
<a-tab-pane v-if="false && isUIAllowed('acl')" key="ui-acl">
<template #tab>
<div class="tab-title" data-testid="proj-view-tab__ui-acl">
<GeneralIcon icon="acl" />
<div>{{ $t('title.uiACL') }}</div>
</div>
</template>
<DashboardSettingsUIAclTabs class="mt-6" />
</a-tab-pane>
-->
</a-tabs>
</div>
</div>

2
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<typeof ColumnFilter>()

14
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, () => {
</NcSelect>
<a-tooltip placement="right" title="Remove">
<NcButton class="nc-group-by-item-remove-btn" size="small" type="text" @click.stop="removeFieldFromGroupBy(i)">
<NcButton
v-e="['c:group-by:remove']"
class="nc-group-by-item-remove-btn"
size="small"
type="text"
@click.stop="removeFieldFromGroupBy(i)"
>
<GeneralIcon icon="delete" class="" />
</NcButton>
</a-tooltip>
@ -208,6 +219,7 @@ watch(open, () => {
</div>
<NcButton
v-if="fieldsToGroupBy.length > _groupBy.length && _groupBy.length < 3"
v-e="['c:group-by:add']"
class="nc-add-group-btn"
style="width: fit-content"
size="small"

7
packages/nc-gui/components/workspace/ProjectList.vue

@ -139,13 +139,6 @@ const workspaceMoveProjectOnSuccess = async (workspaceId: string) => {
})
}
/*
const moveProject = (project: ProjectType) => {
selectedProjectToMove.value = project
isMoveDlgOpen.value = true
}
*/
const isDuplicateDlgOpen = ref(false)
const selectedProjectToDuplicate = ref()

Loading…
Cancel
Save