From 60ffa756539f99aeb867ac69671069f2f1e4b620 Mon Sep 17 00:00:00 2001 From: "Calum H." Date: Thu, 6 Nov 2025 21:55:07 +0000 Subject: [PATCH] feat: 2nd batch of withdraw QA changes (#4724) * polish: increase gap between svg and text in empty state * fix: use ts & change cancel btn style * fix: btn style * polish: new transaction page design * fix: navstack match nested + csv download * fix: lint & i18n * Add tooltip to CSV download button + standard btn style Signed-off-by: Calum H. * fix: lint & i18n --------- Signed-off-by: Calum H. --- apps/frontend/src/components/ui/NavStack.vue | 23 +- .../ui/dashboard/RevenueTransaction.vue | 76 +++-- apps/frontend/src/locales/en-US/index.json | 12 + apps/frontend/src/pages/dashboard.vue | 2 +- .../src/pages/dashboard/revenue/index.vue | 2 +- .../src/pages/dashboard/revenue/transfers.vue | 271 +++++++++++++----- packages/assets/generated-icons.ts | 4 + packages/assets/icons/arrow-down-left.svg | 5 + packages/assets/icons/generic-list.svg | 9 + 9 files changed, 299 insertions(+), 105 deletions(-) create mode 100644 packages/assets/icons/arrow-down-left.svg create mode 100644 packages/assets/icons/generic-list.svg diff --git a/apps/frontend/src/components/ui/NavStack.vue b/apps/frontend/src/components/ui/NavStack.vue index bba0baac..43d1188e 100644 --- a/apps/frontend/src/components/ui/NavStack.vue +++ b/apps/frontend/src/components/ui/NavStack.vue @@ -18,6 +18,7 @@ v-else-if="item.link ?? item.to" :to="(item.link ?? item.to) as string" class="nav-item inline-flex w-full cursor-pointer items-center gap-2 text-nowrap rounded-xl border-none bg-transparent px-4 py-2.5 text-left text-base font-semibold leading-tight text-button-text transition-all hover:bg-button-bg hover:text-contrast active:scale-[0.97]" + :class="{ 'is-active': isActive(item as NavStackLinkItem) }" > void) | null + matchNested?: boolean } type NavStackSeparator = { type: 'separator' } @@ -96,6 +98,8 @@ const props = defineProps<{ const ariaLabel = computed(() => props.ariaLabel ?? 'Section navigation') +const route = useRoute() + const slots = useSlots() const hasSlotContent = computed(() => { const content = slots.default?.() @@ -117,6 +121,19 @@ function getKey(item: NavStackEntry, idx: number) { return link ? `link-${link}` : `action-${(item as NavStackLinkItem).label}-${idx}` } +function isActive(item: NavStackLinkItem): boolean { + const link = item.link ?? item.to + if (!link) return false + + const currentPath = route.path + + if (item.matchNested) { + return currentPath.startsWith(link) + } + + return currentPath === link +} + const filteredItems = computed(() => props.items?.filter((x) => x.shown === undefined || x.shown)) @@ -124,11 +141,13 @@ const filteredItems = computed(() => props.items?.filter((x) => x.shown === unde li { text-align: unset; } -.router-link-exact-active.nav-item { +.router-link-exact-active.nav-item, +.nav-item.is-active { background: var(--color-button-bg-selected); color: var(--color-button-text-selected); } -.router-link-exact-active.nav-item .text-contrast { +.router-link-exact-active.nav-item .text-contrast, +.nav-item.is-active .text-contrast { color: var(--color-button-text-selected); } diff --git a/apps/frontend/src/components/ui/dashboard/RevenueTransaction.vue b/apps/frontend/src/components/ui/dashboard/RevenueTransaction.vue index 83313f39..ebb3ee3b 100644 --- a/apps/frontend/src/components/ui/dashboard/RevenueTransaction.vue +++ b/apps/frontend/src/components/ui/dashboard/RevenueTransaction.vue @@ -9,12 +9,12 @@
{{ - isIncome + transaction.type === 'payout_available' ? formatPayoutSource(transaction.payout_source) : formatMethodName(transaction.method_type || transaction.method) }} -