From 7179bf52e423d016bb376a4a92a7c41d4615c549 Mon Sep 17 00:00:00 2001 From: Simon Hill Date: Mon, 9 Feb 2026 00:06:47 +1100 Subject: [PATCH] Add localized currency selection and rates --- app/components/PricingPlanCard.vue | 14 +- app/components/landing/PricingPlans.vue | 31 ++- app/components/profile/BasicSettings.vue | 65 +++++ app/pages/profile/settings.vue | 3 +- app/plugins/currency.client.ts | 12 + app/utils/currency.ts | 228 ++++++++++++++++++ app/utils/pricing.ts | 9 + .../migration.sql | 2 + prisma/schema.prisma | 1 + server/api/currency/rates.get.ts | 5 + server/api/profile/dashboard.get.ts | 2 + server/api/profile/index.get.ts | 4 +- server/plugins/currency-rates.ts | 5 + server/utils/currencyRates.ts | 89 +++++++ server/utils/schemas/profile.ts | 1 + 15 files changed, 464 insertions(+), 7 deletions(-) create mode 100644 app/plugins/currency.client.ts create mode 100644 app/utils/currency.ts create mode 100644 prisma/migrations/20260208120500_add_currency_preference/migration.sql create mode 100644 server/api/currency/rates.get.ts create mode 100644 server/plugins/currency-rates.ts create mode 100644 server/utils/currencyRates.ts diff --git a/app/components/PricingPlanCard.vue b/app/components/PricingPlanCard.vue index 117fb4d7..73bd6925 100644 --- a/app/components/PricingPlanCard.vue +++ b/app/components/PricingPlanCard.vue @@ -27,7 +27,7 @@

{{ plan.name }}

- {{ formatPrice(plan.monthlyPrice) }} + {{ formatPriceLocalized(plan.monthlyPrice, currencyContext) }} / month
@@ -70,7 +70,7 @@