From a6820c7db8d2388fbc33b3a8b2d456bdf8ae1c34 Mon Sep 17 00:00:00 2001 From: nfebe Date: Sat, 27 Jun 2026 18:23:37 +0100 Subject: [PATCH] feat: Add admin console UI with outreach and onboarding updates Add an admin area, reached from the avatar menu when the signed-in user is an administrator. It has its own left-rail shell with an overview dashboard (KPIs, charts and rankings), demographics, a searchable user table whose rows open a detailed profile, and outreach: a history of sent emails plus a composer with a formatted (markdown) body, a header image, attachments, audience or specific-user targeting, and a live preview of the rendered email. Refresh the marketing surfaces to match the assistant-first direction: the login slides now lead with the assistant and bank integrations, the onboarding flow gets a brand-washed background and illustrated steps with a country step, and the emoji and stripe cards in onboarding and the learning modal are replaced with vector icons and clean surfaces. --- assets/scss/_onboarding.scss | 36 +- components/EmptyState.vue | 143 ++- components/TAvatar.vue | 11 +- components/admin/OutreachComposer.vue | 690 ++++++++++++++ components/admin/UserDetail.vue | 242 +++++ components/auth/AuthCarousel.vue | 118 ++- components/modals/LearningModal.vue | 133 ++- components/onboarding/OnboardingWizard.vue | 41 +- i18n/locales/en.json | 98 +- layouts/admin.vue | 29 + layouts/onboarding.vue | 5 +- middleware/admin.ts | 15 + pages/admin/index.vue | 1007 ++++++++++++++++++++ pages/login.vue | 5 +- pages/onboarding.vue | 72 +- services/api/adminApi.ts | 157 +++ tests/components/TAvatar.test.ts | 42 + tests/utils/countries.test.ts | 17 + utils/configurationKeys.ts | 1 + utils/countries.ts | 27 + 20 files changed, 2713 insertions(+), 176 deletions(-) create mode 100644 components/admin/OutreachComposer.vue create mode 100644 components/admin/UserDetail.vue create mode 100644 layouts/admin.vue create mode 100644 middleware/admin.ts create mode 100644 pages/admin/index.vue create mode 100644 services/api/adminApi.ts create mode 100644 tests/components/TAvatar.test.ts create mode 100644 tests/utils/countries.test.ts create mode 100644 utils/countries.ts diff --git a/assets/scss/_onboarding.scss b/assets/scss/_onboarding.scss index 9553a08..c386dc1 100644 --- a/assets/scss/_onboarding.scss +++ b/assets/scss/_onboarding.scss @@ -96,18 +96,25 @@ } .step-icon { - width: 60px; - height: 60px; - background: $primary-light; - border-radius: 50%; + width: 88px; + height: 88px; + border-radius: 26px; + background: + radial-gradient(120% 120% at 30% 18%, $primary-light, transparent 72%), + linear-gradient( + 135deg, + rgba(var(--color-primary-rgb), 0.16), + rgba(var(--color-primary-rgb), 0.04) + ); + box-shadow: $elevation-1; display: flex; align-items: center; justify-content: center; margin: 0 auto; svg { - width: 28px; - height: 28px; + width: 46px; + height: 46px; color: $primary; } } @@ -178,10 +185,12 @@ align-items: center; justify-content: center; gap: 0.5rem; + box-shadow: 0 6px 16px -6px rgba(var(--color-primary-rgb), 0.55); &:hover:not(:disabled) { background: $primary-hover; transform: translateY(-1px); + box-shadow: 0 10px 22px -8px rgba(var(--color-primary-rgb), 0.6); } &:disabled { @@ -218,18 +227,21 @@ } .completion-icon { - width: 80px; - height: 80px; - background: linear-gradient(135deg, $success 0%, $primary-dark 100%); - border-radius: 50%; + width: 96px; + height: 96px; + background: + radial-gradient(120% 120% at 30% 18%, rgba(255, 255, 255, 0.28), transparent 60%), + linear-gradient(135deg, $success 0%, $primary-dark 100%); + border-radius: 30px; + box-shadow: $elevation-2; display: flex; align-items: center; justify-content: center; margin: 0 auto 1.5rem auto; svg { - width: 40px; - height: 40px; + width: 48px; + height: 48px; color: $text-inverse; } } diff --git a/components/EmptyState.vue b/components/EmptyState.vue index 1ec39fc..4e33b43 100644 --- a/components/EmptyState.vue +++ b/components/EmptyState.vue @@ -1,6 +1,8 @@ diff --git a/components/admin/UserDetail.vue b/components/admin/UserDetail.vue new file mode 100644 index 0000000..252d862 --- /dev/null +++ b/components/admin/UserDetail.vue @@ -0,0 +1,242 @@ + + + + + diff --git a/components/auth/AuthCarousel.vue b/components/auth/AuthCarousel.vue index 9eebac4..64327f0 100644 --- a/components/auth/AuthCarousel.vue +++ b/components/auth/AuthCarousel.vue @@ -2,8 +2,25 @@