Skip to content

Commit eed49ec

Browse files
committed
fix lang selector styles in view and edit mode
1 parent 023d4b7 commit eed49ec

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

packages/localization/resources/views/lang-selector.blade.php

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -153,27 +153,29 @@
153153
@if ($this instanceof \Filament\Resources\Pages\ListRecords)
154154
<x-filament::dropdown.list.item :href="$targetUrl" :icon="$locale->display_flag"
155155
wire:click="changeLanguage('{{ $locale->locale_variant }}')">
156-
<div style="display: flex; align-items: center; justify-content: space-between; width: 100%;">
157-
<span>{{ $locale->display_name }}</span>
156+
<div style="display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 8px;">
157+
<span
158+
style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0;">{{ $locale->display_name }}</span>
158159
@if(isset($translationStatus) && $translationStatus === 'deleted')
159160
<x-filament::icon-button icon="heroicon-o-trash" size="md" color="danger" tooltip="Übersetzung gelöscht"
160-
style="margin-left: 8px;" />
161+
style="flex-shrink: 0;" />
161162
@else
162163
<x-filament::icon-button icon="heroicon-o-plus-circle" size="md" color="success"
163-
tooltip="Übersetzung hinzufügen" style="margin-left: 8px;" />
164+
tooltip="Übersetzung hinzufügen" style="flex-shrink: 0;" />
164165
@endif
165166
</div>
166167
</x-filament::dropdown.list.item>
167168
@else
168169
<x-filament::dropdown.list.item :href="$targetUrl" :icon="$locale->display_flag" tag="a">
169-
<div style="display: flex; align-items: center; justify-content: space-between; width: 100%;">
170-
<span>{{ $locale->display_name }}</span>
170+
<div style="display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 8px;">
171+
<span
172+
style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0;">{{ $locale->display_name }}</span>
171173
@if(isset($translationStatus) && $translationStatus === 'deleted')
172174
<x-filament::icon-button icon="heroicon-o-trash" size="xs" color="danger" tooltip="Übersetzung gelöscht"
173-
style="margin-left: 8px;" />
175+
style="flex-shrink: 0;" />
174176
@else
175177
<x-filament::icon-button icon="heroicon-o-plus-circle" size="xs" color="success"
176-
tooltip="Übersetzung hinzufügen" style="margin-left: 8px;" />
178+
tooltip="Übersetzung hinzufügen" style="flex-shrink: 0;" />
177179
@endif
178180
</div>
179181
</x-filament::dropdown.list.item>

0 commit comments

Comments
 (0)