Compare commits

...

2 Commits

2 changed files with 1 additions and 9 deletions

View File

@ -46,20 +46,14 @@ if (!function_exists('mta_host')) {
if ($sub) {
return domain_host($sub);
}
// 3⃣ Notfall: statischer Fallback
return domain_host('mx');
}
}
if (! function_exists('countryFlag')) {
/**
* Gibt das Flag-Emoji eines Landes zurück anhand des ISO-Codes (z. B. "de" 🇩🇪).
*/
function countryFlag(string $code): string
{
$code = strtoupper($code);
// Unicode-Magic: A -> 🇦, B -> 🇧 etc.
return implode('', array_map(
fn($char) => mb_chr(ord($char) + 127397, 'UTF-8'),
str_split($code)

View File

@ -5,9 +5,7 @@
<select wire:model.defer="locale"
class="w-full h-11 rounded-xl border border-white/10 bg-white/[0.04] px-3 text-white/90">
@foreach (config('mailwolt.language') as $key => $lang)
<option value="{{ $lang['locale'] }}">
{{ countryFlag($lang['flag']) }} {{ $lang['label'] }}
</option>
<option value="{{ $lang['locale'] }}">{{ $lang['label'] }}</option>
@endforeach
</select>
@error('locale') <p class="text-xs text-rose-400 mt-1">{{ $message }}</p> @enderror