From 5b620f77b38aca51e4daec9243cae4edf9da5699 Mon Sep 17 00:00:00 2001 From: Ruslan Bakiev <572431+veikab@users.noreply.github.com> Date: Thu, 15 Jan 2026 15:45:26 +0700 Subject: [PATCH] Improve hub page: new RouteStepper, HubProductCard with ApexCharts - Redesign RouteStepper: nodes connected by lines with distance on line - Add HubProductCard component with sparkline chart background - Auto-select first product when hub page loads - Remove placeholder with package-x icon - Add ApexCharts plugin for charts - Pass startName/endName to RouteStepper for route visualization --- app/components/catalog/HubProductCard.vue | 112 +++++++++++++++++++++ app/components/catalog/OfferResultCard.vue | 9 +- app/components/catalog/RouteStepper.vue | 62 ++++++++++-- app/pages/catalog/hubs/[id].vue | 28 +++--- app/plugins/apexcharts.client.ts | 5 + package.json | 4 +- pnpm-lock.yaml | 86 +++++++++++++++- 7 files changed, 275 insertions(+), 31 deletions(-) create mode 100644 app/components/catalog/HubProductCard.vue create mode 100644 app/plugins/apexcharts.client.ts diff --git a/app/components/catalog/HubProductCard.vue b/app/components/catalog/HubProductCard.vue new file mode 100644 index 0000000..448c91b --- /dev/null +++ b/app/components/catalog/HubProductCard.vue @@ -0,0 +1,112 @@ + + + diff --git a/app/components/catalog/OfferResultCard.vue b/app/components/catalog/OfferResultCard.vue index 31980da..c842ff4 100644 --- a/app/components/catalog/OfferResultCard.vue +++ b/app/components/catalog/OfferResultCard.vue @@ -12,7 +12,12 @@ - + @@ -26,6 +31,8 @@ const props = withDefaults(defineProps<{ currency?: string | null unit?: string | null stages?: RouteStage[] + startName?: string + endName?: string }>(), { stages: () => [] }) diff --git a/app/components/catalog/RouteStepper.vue b/app/components/catalog/RouteStepper.vue index cb85275..1aedb79 100644 --- a/app/components/catalog/RouteStepper.vue +++ b/app/components/catalog/RouteStepper.vue @@ -1,14 +1,41 @@