From c592e38569f2c3333e14b175afd04d21432baeae Mon Sep 17 00:00:00 2001 From: Matt Date: Wed, 4 Jun 2025 02:55:02 +0200 Subject: [PATCH] Replace v-phone-input with custom PhoneInput component Implement a custom PhoneInput component to replace the third-party v-phone-input library. The new component provides country selection, phone number formatting, and integrates seamlessly with Vuetify's form controls. Updated CreateInterestModal and InterestDetailsModal to use the new component. --- components/CreateInterestModal.vue | 6 +- components/InterestDetailsModal.vue | 6 +- components/PhoneInput.vue | 197 ++++++++++++++++++++++++++++ plugins/v-phone-input.client.ts | 13 -- 4 files changed, 203 insertions(+), 19 deletions(-) create mode 100644 components/PhoneInput.vue delete mode 100644 plugins/v-phone-input.client.ts diff --git a/components/CreateInterestModal.vue b/components/CreateInterestModal.vue index 35d5abf..22995a2 100644 --- a/components/CreateInterestModal.vue +++ b/components/CreateInterestModal.vue @@ -76,14 +76,13 @@ > - @@ -313,6 +312,7 @@ + + diff --git a/plugins/v-phone-input.client.ts b/plugins/v-phone-input.client.ts deleted file mode 100644 index 98e2e3b..0000000 --- a/plugins/v-phone-input.client.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineNuxtPlugin } from '#app' -import { createVPhoneInput } from 'v-phone-input' -import 'v-phone-input/dist/v-phone-input.css' - -export default defineNuxtPlugin((nuxtApp) => { - const vPhoneInput = createVPhoneInput({ - defaultCountry: 'US', - preferredCountries: ['US', 'FR', 'ES', 'PT', 'GB'], - enableSearchingCountry: true, - }) - - nuxtApp.vueApp.use(vPhoneInput) -})