From 0c36e8f16ffe69ade21772d72530435fed8d1728 Mon Sep 17 00:00:00 2001 From: Braks <78412429+bcakmakoglu@users.noreply.github.com> Date: Tue, 5 Jul 2022 21:50:47 +0200 Subject: [PATCH] refactor(gui-v2): replace `useUser` with global state # What's changed? * instead of using the useUser composable, we inject a global state containing user and token --- .../nc-gui-v2/components/smartsheet/Grid.vue | 8 ++-- packages/nc-gui-v2/composables/metas.ts | 8 +--- .../nc-gui-v2/composables/useGlobalState.ts | 3 ++ packages/nc-gui-v2/composables/user.ts | 16 ------- packages/nc-gui-v2/nuxt-shim.d.ts | 3 +- packages/nc-gui-v2/pages/signin.vue | 29 ++++++------ packages/nc-gui-v2/pages/signup.vue | 27 ++++++----- packages/nc-gui-v2/plugins/api.ts | 47 +++++-------------- packages/nc-gui-v2/plugins/state.ts | 9 +++- packages/nc-gui-v2/plugins/tele.ts | 5 +- 10 files changed, 58 insertions(+), 97 deletions(-) delete mode 100644 packages/nc-gui-v2/composables/user.ts diff --git a/packages/nc-gui-v2/components/smartsheet/Grid.vue b/packages/nc-gui-v2/components/smartsheet/Grid.vue index c5ccf2169c..21d8e9e280 100644 --- a/packages/nc-gui-v2/components/smartsheet/Grid.vue +++ b/packages/nc-gui-v2/components/smartsheet/Grid.vue @@ -1,6 +1,5 @@