From bd96a78ce0897df1bfea186aa12dba3fd8c01186 Mon Sep 17 00:00:00 2001 From: braks <78412429+bcakmakoglu@users.noreply.github.com> Date: Fri, 5 Aug 2022 10:35:09 +0200 Subject: [PATCH] feat(gui-v2): add `useSidebar` composable # What's changed? * replace global sidebar state with `useSidebar` composable --- packages/nc-gui-v2/app.vue | 58 ++--- packages/nc-gui-v2/assets/style-v2.scss | 2 +- .../components/cell/attachment/index.vue | 5 +- .../components/dashboard/TreeView.vue | 2 +- .../nc-gui-v2/components/smartsheet/Grid.vue | 15 +- .../components/smartsheet/sidebar/index.vue | 10 +- packages/nc-gui-v2/composables/index.ts | 1 + .../nc-gui-v2/composables/useGlobal/state.ts | 4 - .../nc-gui-v2/composables/useGlobal/types.ts | 1 - .../composables/useInjectionState/index.ts | 2 +- .../nc-gui-v2/composables/useSidebar/index.ts | 48 +++++ packages/nc-gui-v2/layouts/default.vue | 2 +- packages/nc-gui-v2/package-lock.json | 199 +++++++----------- packages/nc-gui-v2/package.json | 2 +- packages/nc-gui-v2/pages/index/index.vue | 36 ++-- .../pages/index/user/index/index.vue | 14 +- .../nc-gui-v2/pages/nc/[projectId]/index.vue | 22 +- .../pages/nc/[projectId]/index/index.vue | 17 +- .../nc-gui-v2/pages/project/index/[id].vue | 18 +- .../pages/project/index/create-external.vue | 13 +- .../nc-gui-v2/pages/project/index/create.vue | 22 +- packages/nc-gui-v2/plugins/state.ts | 8 +- 22 files changed, 240 insertions(+), 261 deletions(-) create mode 100644 packages/nc-gui-v2/composables/useSidebar/index.ts diff --git a/packages/nc-gui-v2/app.vue b/packages/nc-gui-v2/app.vue index 3fe585a1a1..0f1f6d8e31 100644 --- a/packages/nc-gui-v2/app.vue +++ b/packages/nc-gui-v2/app.vue @@ -1,21 +1,27 @@