From bddbff77b5ce06a61e4409c31da5dbf91e328c2e Mon Sep 17 00:00:00 2001 From: braks <78412429+bcakmakoglu@users.noreply.github.com> Date: Mon, 18 Jul 2022 17:39:07 +0200 Subject: [PATCH] refactor(gui-v2): replace v-app with ant-layout --- packages/nc-gui-v2/app.vue | 109 +++++++++++-------------- packages/nc-gui-v2/components.d.ts | 7 ++ packages/nc-gui-v2/layouts/default.vue | 4 +- packages/nc-gui-v2/windi.config.ts | 2 +- 4 files changed, 57 insertions(+), 65 deletions(-) diff --git a/packages/nc-gui-v2/app.vue b/packages/nc-gui-v2/app.vue index be28380e7f..5b2d7de197 100644 --- a/packages/nc-gui-v2/app.vue +++ b/packages/nc-gui-v2/app.vue @@ -12,23 +12,18 @@ const signOut = () => { $state.signOut() navigateTo('/signin') } + +const toggleSidebar = useToggle($state.sidebarOpen) diff --git a/packages/nc-gui-v2/components.d.ts b/packages/nc-gui-v2/components.d.ts index e4ed0f5edc..32a8b59b9d 100644 --- a/packages/nc-gui-v2/components.d.ts +++ b/packages/nc-gui-v2/components.d.ts @@ -7,6 +7,13 @@ export {} declare module '@vue/runtime-core' { export interface GlobalComponents { + ADropdown: typeof import('ant-design-vue/es')['Dropdown'] + ALayout: typeof import('ant-design-vue/es')['Layout'] + ALayoutContent: typeof import('ant-design-vue/es')['LayoutContent'] + ALayoutHeader: typeof import('ant-design-vue/es')['LayoutHeader'] + AMenu: typeof import('ant-design-vue/es')['Menu'] + AMenuDivider: typeof import('ant-design-vue/es')['MenuDivider'] + AMenuItem: typeof import('ant-design-vue/es')['MenuItem'] ATable: typeof import('ant-design-vue/es')['Table'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] diff --git a/packages/nc-gui-v2/layouts/default.vue b/packages/nc-gui-v2/layouts/default.vue index eb5cfba8fe..ccb531fd33 100644 --- a/packages/nc-gui-v2/layouts/default.vue +++ b/packages/nc-gui-v2/layouts/default.vue @@ -18,11 +18,11 @@ export default { diff --git a/packages/nc-gui-v2/windi.config.ts b/packages/nc-gui-v2/windi.config.ts index d1ac1d659b..22fb6d899d 100644 --- a/packages/nc-gui-v2/windi.config.ts +++ b/packages/nc-gui-v2/windi.config.ts @@ -15,7 +15,7 @@ import colors, { themeColors } from './utils/colorsUtils' export default defineConfig({ extract: { - include: ['**/*.{vue,html,jsx,tsx,css}'], + include: ['**/*.{vue,html,jsx,tsx,css,scss}'], exclude: ['node_modules', '.git'], },