diff --git a/src/pages/login/index.vue b/src/pages/login/index.vue index 0492bcc..b9ba119 100644 --- a/src/pages/login/index.vue +++ b/src/pages/login/index.vue @@ -3,8 +3,15 @@
- + + + @@ -46,13 +53,22 @@
-
-
+
+
-
- +
+ + +
@@ -83,6 +99,12 @@ const languageOptions = [ const currentLocale = computed(() => getCurrentLocale()); const switchLanguage = (locale: string) => setLocale(locale); +function getCountryFlagPngUrl(iso2: string): string { + const country = (iso2 ?? "").trim().toLowerCase(); + if (!/^[a-z]{2}$/.test(country)) return "https://flagcdn.com/w40/un.png"; + return `https://flagcdn.com/w40/${country}.png`; +} + const selectedCountry = ref( findCountryCallingCode( (() => { @@ -98,10 +120,6 @@ const phone = ref(""); const code = ref(""); const phoneSubmitting = ref(false); -const selectedCountryDisplay = computed(() => { - return `${selectedCountry.value.name} (${selectedCountry.value.dialCode})`; -}); - const filteredCountries = computed(() => { const q = countrySearch.value.trim().toLowerCase(); if (!q) {