From ac3ffb8ab29f67889ef4683ea0d290c4e8929a09 Mon Sep 17 00:00:00 2001 From: Mahdi Date: Sun, 27 Sep 2026 18:00:59 +0330 Subject: [PATCH] Promote Leads to a top-level nav hub and expire login OTP after 90s. Leads items sit under their own hub after Customers; login OTP shows a countdown and returns to the mobile step when time runs out. --- apps/api/src/auth/auth.service.ts | 2 +- apps/web/src/layouts/AppLayout.vue | 31 +- apps/web/src/lib/nav-hubs.ts | 86 +- apps/web/src/views/LoginView.vue | 76 +- packages/shared/src/index.ts | 7739 ++++++++++++++-------------- 5 files changed, 4019 insertions(+), 3915 deletions(-) diff --git a/apps/api/src/auth/auth.service.ts b/apps/api/src/auth/auth.service.ts index 4e5bf95..17ec979 100644 --- a/apps/api/src/auth/auth.service.ts +++ b/apps/api/src/auth/auth.service.ts @@ -33,7 +33,7 @@ import { } from './dto'; const OTP_LENGTH = 6; -const OTP_TTL_SECONDS = 5 * 60; +const OTP_TTL_SECONDS = 90; const AVATAR_MAX_BYTES = 2 * 1024 * 1024; const AVATAR_EXT: Record = { 'image/jpeg': 'jpg', diff --git a/apps/web/src/layouts/AppLayout.vue b/apps/web/src/layouts/AppLayout.vue index 0dbe663..9c2f7ee 100644 --- a/apps/web/src/layouts/AppLayout.vue +++ b/apps/web/src/layouts/AppLayout.vue @@ -45,10 +45,12 @@ const dashboardActive = computed(() => route.path === '/'); const loyaltyActive = computed(() => pathIn(['/loyalty'])); const reportsActive = computed(() => pathIn(['/reports'])); const customersActive = computed(() => pathIn(['/contacts'])); +const leadsActive = computed(() => + pathIn(['/leads', '/settings/lead-stages', '/settings/lead-forms']), +); const salesActive = computed(() => pathIn([ '/pipeline', - '/leads', '/deals', '/quotes', '/invoices', @@ -68,7 +70,6 @@ const automationsActive = computed( ); const toolsActive = computed(() => pathIn([ - '/settings/lead-forms', '/projects', '/project-cards', '/inventory', @@ -82,7 +83,6 @@ const settingsActive = computed(() => '/settings/team', '/settings/audit-logs', '/settings/public-api', - '/settings/lead-stages', '/settings/custom-fields', '/settings/currencies', '/settings/tahesab', @@ -432,6 +432,21 @@ onUnmounted(() => { +