Browse Source

refactor(gui-v2): code cleanup

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/3096/head
Pranav C 2 years ago
parent
commit
7fbe982015
  1. 2
      packages/nc-gui-v2/components.d.ts
  2. 3
      packages/nc-gui-v2/components/smartsheet-toolbar/ColumnFilter.vue
  3. 3
      packages/nc-gui-v2/components/smartsheet-toolbar/FieldsMenu.vue
  4. 3
      packages/nc-gui-v2/components/smartsheet-toolbar/SortListMenu.vue
  5. 2
      packages/nc-gui-v2/components/smartsheet/Toolbar.vue
  6. 4
      packages/nc-gui-v2/components/smartsheet/sidebar/MenuTop.vue
  7. 4
      packages/nc-gui-v2/nuxt.config.ts
  8. 4
      packages/nc-gui-v2/pages/nc/[projectId]/index/index.vue

2
packages/nc-gui-v2/components.d.ts vendored

@ -91,6 +91,7 @@ declare module '@vue/runtime-core' {
MdiContentSave: typeof import('~icons/mdi/content-save')['default']
MdiDeleteOutline: typeof import('~icons/mdi/delete-outline')['default']
MdiDiscord: typeof import('~icons/mdi/discord')['default']
MdiDotsHorizontal: typeof import('~icons/mdi/dots-horizontal')['default']
MdiDotsVertical: typeof import('~icons/mdi/dots-vertical')['default']
MdiDownload: typeof import('~icons/mdi/download')['default']
MdiDrag: typeof import('~icons/mdi/drag')['default']
@ -120,6 +121,7 @@ declare module '@vue/runtime-core' {
MdiPlus: typeof import('~icons/mdi/plus')['default']
MdiPlusOutline: typeof import('~icons/mdi/plus-outline')['default']
MdiReload: typeof import('~icons/mdi/reload')['default']
MdiSearch: typeof import('~icons/mdi/search')['default']
MdiShieldLockOutline: typeof import('~icons/mdi/shield-lock-outline')['default']
MdiSlack: typeof import('~icons/mdi/slack')['default']
MdiStar: typeof import('~icons/mdi/star')['default']

3
packages/nc-gui-v2/components/smartsheet-toolbar/ColumnFilter.vue

@ -273,8 +273,7 @@ defineExpose({
.nc-filter-grid {
display: grid;
grid-template-columns: 18px 70px auto auto auto;
column-gap: 12px;
row-gap: 12px;
@apply gap-[12px]
align-items: center;
}

3
packages/nc-gui-v2/components/smartsheet-toolbar/FieldsMenu.vue

@ -122,7 +122,4 @@ const onMove = (event: { moved: { newIndex: number } }) => {
:deep(.ant-checkbox-inner) {
@apply transform scale-60;
}
:deep(::placeholder) {
//@apply !text-xs;
}
</style>

3
packages/nc-gui-v2/components/smartsheet-toolbar/SortListMenu.vue

@ -100,7 +100,6 @@ watch(
.sort-grid {
display: grid;
grid-template-columns: 22px auto 150px;
column-gap: 12px;
row-gap: 12px;
@apply gap-[12px];
}
</style>

2
packages/nc-gui-v2/components/smartsheet/Toolbar.vue

@ -6,7 +6,7 @@ const { isGrid, isForm } = useSmartsheetStoreOrThrow()
<template>
<div class="nc-table-toolbar w-full py-1 flex gap-1 items-center h-[48px] px-2" style="z-index: 7">
<SmartsheetToolbarSearchData v-if="isGrid" class="flex-shrink mr-2" />
<SmartsheetToolbarSearchData v-if="isGrid" class="shrink mr-2" />
<SmartsheetToolbarFieldsMenu v-if="isGrid" :show-system-fields="false" />

4
packages/nc-gui-v2/components/smartsheet/sidebar/MenuTop.vue

@ -237,10 +237,6 @@ function onDeleted() {
.active {
@apply bg-primary/20 text-primary font-weight-medium;
.nc-icon {
//@apply !text-pink-500;
}
}
}
</style>

4
packages/nc-gui-v2/nuxt.config.ts

@ -6,6 +6,8 @@ import IconsResolver from 'unplugin-icons/resolver'
import Components from 'unplugin-vue-components/vite'
import { AntDesignVueResolver } from 'unplugin-vue-components/resolvers'
import monacoEditorPlugin from 'vite-plugin-monaco-editor'
import { themeColors } from './utils/colorsUtils'
// https://v3.nuxtjs.org/api/configuration/nuxt.config
export default defineNuxtConfig({
@ -50,7 +52,7 @@ export default defineNuxtConfig({
css: {
preprocessorOptions: {
less: {
modifyVars: { 'primary-color': '#4351e8', 'text-color': 'rgba(61, 61, 61, 1)' },
modifyVars: { 'primary-color': themeColors.primary, 'text-color': 'rgba(61, 61, 61, 1)' },
javascriptEnabled: true,
},
},

4
packages/nc-gui-v2/pages/nc/[projectId]/index/index.vue

@ -45,7 +45,7 @@ const icon = (tab: TabItem) => {
<template>
<div class="h-full w-full nc-container pt-[9px]">
<div class="h-full w-full flex flex-col">
<div class="">
<div>
<a-tabs v-model:activeKey="activeTabIndex" type="editable-card" @edit="closeTab">
<a-tab-pane v-for="(tab, i) in tabs" :key="i">
<template #tab>
@ -145,7 +145,7 @@ const icon = (tab: TabItem) => {
</a-tabs>
</div>
<NuxtPage class="" />
<NuxtPage />
</div>
<DlgTableCreate v-if="tableCreateDialog" v-model="tableCreateDialog" />

Loading…
Cancel
Save