|
1 | 1 | <x-dashboard-tile :position="$position">
|
2 | 2 | <div class="grid grid-rows-auto-1 gap-2 h-full">
|
3 | 3 | <div class="flex items-center justify-center">
|
4 |
| - <h1 class="text-xl leading-none mt-1">{{$title ?? 'Forge Servers'}}</h1> |
| 4 | + <h1 class="text-xl leading-none mt-1">{{ $title ?? 'Forge Servers' }}</h1> |
5 | 5 | </div>
|
6 | 6 |
|
7 |
| - <div class="h-full overflow-scroll"> |
| 7 | + <div class="h-full overflow-auto"> |
8 | 8 | <ul wire:poll.{{ $refreshIntervalInSeconds }}s class="self-center divide-y-2 divide-canvas">
|
9 |
| - @if(count($servers)) |
10 |
| - @foreach($servers as $server) |
11 |
| - <li class="py-1"> |
12 |
| - <div class="my-2"> |
13 |
| - <div class="font-medium"> |
14 |
| - <span class="rounded-full h-3 w-3 inline-block mr-1 @if($server['isReady']) bg-green-200 @else bg-gray-200 @endif"></span> |
15 |
| - {{ $server['name'] }} |
16 |
| - </div> |
17 |
| - <div class="text-gray-700 text-sm">{{ $server['provider'] }}</div> |
18 |
| - <div class="text-gray-700 text-sm">{{ $server['ipAddress'] }}</div> |
19 |
| - <div class="mt-1"> |
20 |
| - @foreach($server['tags'] as $tag) |
21 |
| - <span class="bg-gray-200 rounded p-1 text-xs text-gray-600 mb-1 inline-block">{{ $tag['name'] }}</span> |
22 |
| - @endforeach |
23 |
| - </div> |
| 9 | + @forelse($servers as $server) |
| 10 | + <li class="my-2 py-2"> |
| 11 | + <div class="font-medium"> |
| 12 | + <span class="rounded-full h-3 w-3 inline-block mr-1 @if($server['isReady']) bg-green-300 @else bg-gray-200 @endif"></span> |
| 13 | + {{ $server['name'] }} |
| 14 | + </div> |
| 15 | + <div class="text-gray-700 text-sm">{{ $server['provider'] }} · {{ $server['ipAddress'] }}</div> |
| 16 | + @if($server['tags']) |
| 17 | + <div class="mt-1"> |
| 18 | + @foreach($server['tags'] as $tag) |
| 19 | + <span class="bg-gray-200 rounded p-1 text-xs text-gray-600 mb-1 inline-block">{{ $tag['name'] }}</span> |
| 20 | + @endforeach |
24 | 21 | </div>
|
25 |
| - </li> |
26 |
| - @endforeach |
27 |
| - @else |
28 |
| - <div class="bg-yellow-300 pl-2 p-2 rounded-md"> |
29 |
| - <span class="inline-block"> |
30 |
| - <div class="rounded-full h-4 w-4 flex items-center justify-center bg-yellow-900 text-white text-xs inline-block">!</div> |
31 |
| - </span> |
32 |
| - <span class="text-xs text-yellow-900 leading-none break-words">Currently there are no servers. Make sure you have configured the background command.</span> |
| 22 | + @endif |
| 23 | + </li> |
| 24 | + @empty |
| 25 | + <div class="bg-yellow-300 pl-2 p-2 text-yellow-900 rounded-md"> |
| 26 | + <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 inline-block" viewBox="0 0 20 20" fill="currentColor"> |
| 27 | + <path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z" clip-rule="evenodd" /> |
| 28 | + </svg> |
| 29 | + <span class="text-xs leading-none break-words">Currently there are no servers. Make sure you have configured the background command.</span> |
33 | 30 | </div>
|
34 |
| - @endif |
| 31 | + @endforelse |
35 | 32 | </ul>
|
36 | 33 | </div>
|
37 | 34 | </div>
|
|
0 commit comments