From 885c0dc50092d76ca085f63f44aba296cde71da9 Mon Sep 17 00:00:00 2001 From: Nivedin <53208152+nivedin@users.noreply.github.com> Date: Wed, 29 Mar 2023 23:49:34 +0530 Subject: [PATCH] fix: sh-admin dashboard bugs and UI polish (#56) --- .../public/images/youre_lost.svg | 76 +++++ .../hoppscotch-sh-admin/src/components.d.ts | 9 +- .../src/components/app/Header.vue | 82 +++-- .../src/components/app/Sidebar.vue | 158 ++++++--- .../src/components/dashboard/MetricsCard.vue | 27 ++ .../src/components/users/InviteModal.vue | 71 ++++ .../src/components/users/Table.vue | 170 ++++++++++ .../src/composables/usePagedQuery.ts | 2 +- .../src/layouts/default.vue | 2 +- packages/hoppscotch-sh-admin/src/pages/_.vue | 56 ++++ .../src/pages/dashboard.vue | 101 ++---- .../src/pages/users/_id.vue | 203 ++++++------ .../src/pages/users/index.vue | 311 ++++-------------- .../src/pages/users/invited.vue | 138 ++++---- 14 files changed, 815 insertions(+), 591 deletions(-) create mode 100644 packages/hoppscotch-sh-admin/public/images/youre_lost.svg create mode 100644 packages/hoppscotch-sh-admin/src/components/dashboard/MetricsCard.vue create mode 100644 packages/hoppscotch-sh-admin/src/components/users/InviteModal.vue create mode 100644 packages/hoppscotch-sh-admin/src/components/users/Table.vue create mode 100644 packages/hoppscotch-sh-admin/src/pages/_.vue diff --git a/packages/hoppscotch-sh-admin/public/images/youre_lost.svg b/packages/hoppscotch-sh-admin/public/images/youre_lost.svg new file mode 100644 index 00000000..ea33353f --- /dev/null +++ b/packages/hoppscotch-sh-admin/public/images/youre_lost.svg @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/hoppscotch-sh-admin/src/components.d.ts b/packages/hoppscotch-sh-admin/src/components.d.ts index 8f7e04f7..bb9353b8 100644 --- a/packages/hoppscotch-sh-admin/src/components.d.ts +++ b/packages/hoppscotch-sh-admin/src/components.d.ts @@ -13,18 +13,15 @@ declare module '@vue/runtime-core' { AppModal: typeof import('./components/app/Modal.vue')['default'] AppSidebar: typeof import('./components/app/Sidebar.vue')['default'] AppToast: typeof import('./components/app/Toast.vue')['default'] + DashboardMetricsCard: typeof import('./components/dashboard/MetricsCard.vue')['default'] HoppButtonPrimary: typeof import('@hoppscotch/ui')['HoppButtonPrimary'] HoppButtonSecondary: typeof import('@hoppscotch/ui')['HoppButtonSecondary'] HoppSmartAnchor: typeof import('@hoppscotch/ui')['HoppSmartAnchor'] HoppSmartConfirmModal: typeof import('@hoppscotch/ui')['HoppSmartConfirmModal'] HoppSmartItem: typeof import('@hoppscotch/ui')['HoppSmartItem'] + HoppSmartSpinner: typeof import('@hoppscotch/ui')['HoppSmartSpinner'] IconLucideInbox: typeof import('~icons/lucide/inbox')['default'] - IconLucideLayoutDashboard: typeof import('~icons/lucide/layout-dashboard')['default'] - IconLucideMenu: typeof import('~icons/lucide/menu')['default'] - IconLucideSidebarClose: typeof import('~icons/lucide/sidebar-close')['default'] - IconLucideSidebarOpen: typeof import('~icons/lucide/sidebar-open')['default'] IconLucideUser: typeof import('~icons/lucide/user')['default'] - IconLucideUsers: typeof import('~icons/lucide/users')['default'] ProfilePicture: typeof import('./components/profile/Picture.vue')['default'] TeamsAddMembers: typeof import('./components/teams/AddMembers.vue')['default'] TeamsDetails: typeof import('./components/teams/Details.vue')['default'] @@ -32,6 +29,8 @@ declare module '@vue/runtime-core' { TeamsMembers: typeof import('./components/teams/Members.vue')['default'] TeamsPendingInvites: typeof import('./components/teams/PendingInvites.vue')['default'] Tippy: typeof import('vue-tippy')['Tippy'] + UsersInviteModal: typeof import('./components/users/InviteModal.vue')['default'] + UsersTable: typeof import('./components/users/Table.vue')['default'] } } diff --git a/packages/hoppscotch-sh-admin/src/components/app/Header.vue b/packages/hoppscotch-sh-admin/src/components/app/Header.vue index 53a3c721..8e1c9113 100644 --- a/packages/hoppscotch-sh-admin/src/components/app/Header.vue +++ b/packages/hoppscotch-sh-admin/src/components/app/Header.vue @@ -1,31 +1,32 @@