|
1 | 1 | <x-filament::section wire:poll.10s :compact="true" class="!ring-0 !shadow-none !p-0"> |
2 | | - <x-slot name="heading"> |
3 | | - <div class="flex items-center space-x-2"> |
4 | | - <div> |
5 | | - {{ __('Comments') }} |
| 2 | + @if(config('nested-comments.show-heading', true)) |
| 3 | + <x-slot name="heading"> |
| 4 | + <div class="flex items-center space-x-2"> |
| 5 | + <div> |
| 6 | + {{ __('nested-comments::nested-comments.comments.general.comments') }} |
| 7 | + </div> |
| 8 | + @if(config('nested-comments.show-badge-counter', true)) |
| 9 | + <div> |
| 10 | + <x-filament::badge :color="config('nested-comments.badge-counter-color', 'danger')" :title="$this->comments->count()"> |
| 11 | + {{\Illuminate\Support\Number::forHumans($this->comments->count(),maxPrecision: 3, abbreviate: true)}} |
| 12 | + </x-filament::badge> |
| 13 | + </div> |
| 14 | + @endif |
6 | 15 | </div> |
7 | | - <div> |
8 | | - <x-filament::badge color="danger" :title="$this->comments->count()"> |
9 | | - {{\Illuminate\Support\Number::forHumans($this->comments->count(),maxPrecision: 3, abbreviate: true)}} |
10 | | - </x-filament::badge> |
11 | | - </div> |
12 | | - </div> |
13 | | - </x-slot> |
14 | | - <x-slot name="headerEnd"> |
15 | | - <x-filament::button wire:click.prevent="refreshComments()">Refresh</x-filament::button> |
16 | | - </x-slot> |
| 16 | + </x-slot> |
| 17 | + @endif |
| 18 | + @if(config('nested-comments.show-refresh-button', true)) |
| 19 | + <x-slot name="headerEnd"> |
| 20 | + <x-filament::button |
| 21 | + wire:click.prevent="refreshComments()" |
| 22 | + :color="config('nested-comments.color-refresh-button')" |
| 23 | + :icon="config('nested-comments.icon-refresh-button')" |
| 24 | + :outlined="config('nested-comments.outlined-refresh-button')" |
| 25 | + :tooltip="config('nested-comments.style-refresh-button', 'button') === 'icon' ? __('nested-comments::nested-comments.comments.form.buttons.refresh') : null" |
| 26 | + > |
| 27 | + @if(config('nested-comments.style-refresh-button', 'button') === 'button') |
| 28 | + {{ __('nested-comments::nested-comments.comments.form.buttons.refresh') }} |
| 29 | + @endif |
| 30 | + </x-filament::button> |
| 31 | + </x-slot> |
| 32 | + @endif |
17 | 33 | @foreach($this->comments as $comment) |
18 | 34 | <livewire:nested-comments::comment-card |
19 | 35 | :key="$comment->getKey()" |
|
0 commit comments