Refactor dashboard view to remove unnecessary code and improve readability
This commit is contained in:
@@ -15,11 +15,6 @@
|
|||||||
subscription is activated.<br> Please be patient.</span>
|
subscription is activated.<br> Please be patient.</span>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
@if ($servers->count() === 0)
|
|
||||||
No resources found. Add your first server & private key <a class="text-white underline"
|
|
||||||
href="{{ route('server.create') }}">here</a> or go to the <a class="text-white underline"
|
|
||||||
href="{{ route('onboarding') }}">onboarding page</a>.
|
|
||||||
@endif
|
|
||||||
<h3 class="pb-4">Projects</h3>
|
<h3 class="pb-4">Projects</h3>
|
||||||
<div class="grid grid-cols-1 gap-2 xl:grid-cols-2">
|
<div class="grid grid-cols-1 gap-2 xl:grid-cols-2">
|
||||||
@forelse ($projects as $project)
|
@forelse ($projects as $project)
|
||||||
@@ -59,19 +54,16 @@
|
|||||||
</div>
|
</div>
|
||||||
@empty
|
@empty
|
||||||
<div>
|
<div>
|
||||||
No project found.
|
No projects found. Add your first server <a class="text-white underline"
|
||||||
<x-forms.button class="btn" onclick="newEmptyProject.showModal()">+ Add</x-forms.button>
|
onclick="newEmptyProject.showModal()">here</a> or
|
||||||
|
go to the <a class="text-white underline" href="{{ route('onboarding') }}">onboarding page.</a>
|
||||||
<livewire:project.add-empty />
|
<livewire:project.add-empty />
|
||||||
</div>
|
</div>
|
||||||
@endforelse
|
@endforelse
|
||||||
</div>
|
</div>
|
||||||
<h3 class="py-4">Servers</h3>
|
<h3 class="py-4">Servers</h3>
|
||||||
@if ($servers->count() === 1)
|
|
||||||
<div class="grid grid-cols-1 gap-2">
|
|
||||||
@else
|
|
||||||
<div class="grid grid-cols-1 gap-2 xl:grid-cols-2">
|
<div class="grid grid-cols-1 gap-2 xl:grid-cols-2">
|
||||||
@endif
|
@forelse ($servers as $server)
|
||||||
@foreach ($servers as $server)
|
|
||||||
<a href="{{ route('server.show', ['server_uuid' => data_get($server, 'uuid')]) }}"
|
<a href="{{ route('server.show', ['server_uuid' => data_get($server, 'uuid')]) }}"
|
||||||
@class([
|
@class([
|
||||||
'gap-2 border cursor-pointer box group',
|
'gap-2 border cursor-pointer box group',
|
||||||
@@ -98,8 +90,14 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="flex-1"></div>
|
<div class="flex-1"></div>
|
||||||
</a>
|
</a>
|
||||||
@endforeach
|
@empty
|
||||||
|
<div>
|
||||||
|
No servers found.
|
||||||
|
Add your first server <a class="text-white underline" href="{{ route('server.create') }}">here</a> or
|
||||||
|
go to the <a class="text-white underline" href="{{ route('onboarding') }}">onboarding page.</a>
|
||||||
|
</div>
|
||||||
|
@endforelse
|
||||||
|
</div>
|
||||||
<div class="flex items-center gap-2">
|
<div class="flex items-center gap-2">
|
||||||
<h3 class="py-4">Deployments</h3>
|
<h3 class="py-4">Deployments</h3>
|
||||||
@if (count($deployments_per_server) > 0)
|
@if (count($deployments_per_server) > 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user