Update modal input behavior and limit-reached layout
This commit is contained in:
parent
54834891fb
commit
04c92ec4bd
0
app/Http/Livewire/Server/New/ByIp.php
Normal file
0
app/Http/Livewire/Server/New/ByIp.php
Normal file
@ -90,8 +90,7 @@ public function loadServices(bool $force = false)
|
||||
$this->allServices = getServiceTemplates();
|
||||
$this->services = $this->allServices->filter(function ($service, $key) {
|
||||
return str_contains(strtolower($key), strtolower($this->search));
|
||||
});;
|
||||
$this->dispatch('success', 'Successfully loaded services.');
|
||||
});
|
||||
}
|
||||
} catch (\Throwable $e) {
|
||||
return handleError($e, $this);
|
||||
|
@ -1,4 +1,4 @@
|
||||
<div class="flex flex-col items-center justify-center h-screen">
|
||||
<div class="flex flex-col items-center justify-center h-32">
|
||||
<span class="text-xl font-bold text-white">You have reached the limit of {{ $name }} you can create.</span>
|
||||
<span>Please <a class="text-white underline "href="{{ route('subscription.show') }}">upgrade your
|
||||
subscription</a> to create more
|
||||
|
@ -6,7 +6,7 @@
|
||||
'action' => 'delete',
|
||||
'content' => null,
|
||||
])
|
||||
<div x-data="{ modalOpen: false }" :class="{ 'z-40': modalOpen }" class="relative w-auto h-auto">
|
||||
<div x-data="{ modalOpen: false }" :class="{ 'z-40': modalOpen }" @keydown.window.escape="modalOpen=false" class="relative w-auto h-auto">
|
||||
@if ($content)
|
||||
<div @click="modalOpen=true">
|
||||
{{ $content }}
|
||||
|
@ -1,14 +1,9 @@
|
||||
<x-layout>
|
||||
<div class="flex items-start gap-2">
|
||||
<h1>Destinations</h1>
|
||||
<x-slide-over fullScreen closeWithX>
|
||||
<x-slot:title>New Destination</x-slot:title>
|
||||
<x-slot:content>
|
||||
<x-modal-input buttonTitle="+ Add" title="New Destination">
|
||||
<livewire:destination.new.docker :server_id="$server_id" />
|
||||
</x-slot:content>
|
||||
<button @click="slideOverOpen=true" class="button">+
|
||||
Add</button>
|
||||
</x-slide-over>
|
||||
</x-modal-input>
|
||||
</div>
|
||||
<div class="subtitle">Endpoints to deploy your resources.</div>
|
||||
<div class="grid gap-2 lg:grid-cols-2">
|
||||
|
@ -38,8 +38,7 @@
|
||||
<div class="flex items-center group">
|
||||
<a class="mx-4 rounded hover:no-underline"
|
||||
href="{{ route('project.resource.create', ['project_uuid' => data_get($project, 'uuid'), 'environment_name' => data_get($project, 'environments.0.name', 'production')]) }}">
|
||||
<span
|
||||
class="p-2 font-bold on-box">+
|
||||
<span class="p-2 font-bold on-box">+
|
||||
Add Resource</span>
|
||||
</a>
|
||||
<a class="mx-4"
|
||||
@ -59,18 +58,11 @@ class="p-2 font-bold on-box">+
|
||||
</div>
|
||||
@else
|
||||
<div class="flex flex-col gap-1">
|
||||
<div class='font-bold text-warning'>No projects found.</div>
|
||||
<div class="flex gap-1">Add your first project
|
||||
<div>
|
||||
<x-slide-over fullScreen closeWithX>
|
||||
<x-slot:title>New Project</x-slot:title>
|
||||
<x-slot:content>
|
||||
<div class='font-bold dark:text-warning'>No projects found.</div>
|
||||
<div class="flex items-center gap-1">
|
||||
<x-modal-input buttonTitle="Add" title="New Project">
|
||||
<livewire:project.add-empty />
|
||||
</x-slot:content>
|
||||
<div class="underline cursor-pointer dark:text-white" @click="slideOverOpen=true">here
|
||||
</div>
|
||||
</x-slide-over>
|
||||
</div> or
|
||||
</x-modal-input> your first project or
|
||||
go to the <a class="underline dark:text-white" href="{{ route('onboarding') }}">onboarding</a> page.
|
||||
</div>
|
||||
</div>
|
||||
@ -111,40 +103,30 @@ class="p-2 font-bold on-box">+
|
||||
@else
|
||||
@if ($private_keys->count() === 0)
|
||||
<div class="flex flex-col gap-1">
|
||||
<div class='font-bold text-warning'>No private keys found.</div>
|
||||
<div class="flex gap-1">Before you can add your server, first add a private key
|
||||
<div>
|
||||
<x-slide-over fullScreen closeWithX>
|
||||
<x-slot:title>New Private Key</x-slot:title>
|
||||
<x-slot:content>
|
||||
<div class='font-bold dark:text-warning'>No private keys found.</div>
|
||||
<div class="flex items-center gap-1">Before you can add your server, first <x-modal-input
|
||||
buttonTitle="add" title="New Private Key">
|
||||
<livewire:security.private-key.create from="server" />
|
||||
</x-slot:content>
|
||||
<div class="underline cursor-pointer dark:text-white" @click="slideOverOpen=true">here
|
||||
</div>
|
||||
</x-slide-over>
|
||||
</div> or
|
||||
</x-modal-input> a private key
|
||||
or
|
||||
go to the <a class="underline dark:text-white" href="{{ route('onboarding') }}">onboarding</a>
|
||||
page.
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<div class="flex gap-1">
|
||||
<span class='font-bold text-warning'>No servers found.</span> Add your first server
|
||||
<div>
|
||||
<x-slide-over fullScreen closeWithX>
|
||||
<x-slot:title>New Server</x-slot:title>
|
||||
<x-slot:content>
|
||||
<span class='font-bold text-warning'>No servers found.</span>
|
||||
<x-modal-input buttonTitle="Add"
|
||||
title="New Server">
|
||||
<livewire:server.create />
|
||||
</x-slot:content>
|
||||
<div class="underline cursor-pointer dark:text-white" @click="slideOverOpen=true">here
|
||||
</div>
|
||||
</x-slide-over>
|
||||
</div> or
|
||||
</x-modal-input> your first server
|
||||
or
|
||||
go to the <a class="underline dark:text-white" href="{{ route('onboarding') }}">onboarding</a>
|
||||
page.
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
@if ($servers->count() > 0 && $projects->count() > 0)
|
||||
<div class="flex items-center gap-2">
|
||||
<h3 class="py-4">Deployments</h3>
|
||||
@if (count($deployments_per_server) > 0)
|
||||
@ -183,6 +165,7 @@ class="p-2 font-bold on-box">+
|
||||
<div>No deployments running.</div>
|
||||
@endforelse
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
<script>
|
||||
|
@ -1,17 +1,11 @@
|
||||
<div>
|
||||
<div class="flex items-start gap-2">
|
||||
<h1>Servers</h1>
|
||||
<x-slide-over fullScreen closeWithX>
|
||||
<x-slot:title>New Server</x-slot:title>
|
||||
<x-slot:content>
|
||||
<x-modal-input buttonTitle="+ Add" title="New Server">
|
||||
<livewire:server.create />
|
||||
</x-slot:content>
|
||||
<button @click="slideOverOpen=true" class="button">+
|
||||
Add</button>
|
||||
</x-slide-over>
|
||||
</x-modal-input>
|
||||
</div>
|
||||
<div class="subtitle">All your servers are here.</div>
|
||||
|
||||
<div class="grid gap-2 lg:grid-cols-2">
|
||||
@forelse ($servers as $server)
|
||||
<a href="{{ route('server.show', ['server_uuid' => data_get($server, 'uuid')]) }}"
|
||||
|
Loading…
Reference in New Issue
Block a user