ui: redesign

This commit is contained in:
Andras Bacsai
2024-03-19 15:37:16 +01:00
parent 42715bba50
commit 91950e1891
40 changed files with 481 additions and 436 deletions

View File

@@ -6,10 +6,10 @@
<div class="relative flex flex-col text-white cursor-default box-without-bg bg-coolgray-100 w-96">
<div class="text-xl font-bold">Primary Server</div>
@if (str($resource->realStatus())->startsWith('running'))
<div title="{{ $resource->realStatus() }}" class="absolute bg-success -top-1 -left-1 badge badge-xs">
<div title="{{ $resource->realStatus() }}" class="absolute bg-success -top-1 -left-1 badge ">
</div>
@elseif (str($resource->realStatus())->startsWith('exited'))
<div title="{{ $resource->realStatus() }}" class="absolute bg-error -top-1 -left-1 badge badge-xs">
<div title="{{ $resource->realStatus() }}" class="absolute bg-error -top-1 -left-1 badge ">
</div>
@endif
<div>
@@ -34,10 +34,10 @@
<div class="relative flex flex-col box w-96">
@if (str(data_get($destination, 'pivot.status'))->startsWith('running'))
<div title="{{ data_get($destination, 'pivot.status') }}"
class="absolute bg-success -top-1 -left-1 badge badge-xs"></div>
class="absolute bg-success -top-1 -left-1 badge "></div>
@elseif (str(data_get($destination, 'pivot.status'))->startsWith('exited'))
<div title="{{ data_get($destination, 'pivot.status') }}"
class="absolute bg-error -top-1 -left-1 badge badge-xs"></div>
class="absolute bg-error -top-1 -left-1 badge "></div>
@endif
<div>
Server: {{ data_get($destination, 'server.name') }}

View File

@@ -8,8 +8,7 @@
<x-slot:content>
<livewire:project.shared.environment-variable.add />
</x-slot:content>
<button @click="slideOverOpen=true"
class="font-normal text-white normal-case border-none rounded btn btn-primary btn-sm no-animation">+ Add</button>
<button @click="slideOverOpen=true" class="button">+ Add</button>
</x-slide-over>
@endif
<x-forms.button

View File

@@ -1,15 +1,10 @@
<dialog id="newTask" class="modal">
<form method="dialog" class="flex flex-col gap-2 rounded modal-box" wire:submit='submit'>
<h3 class="text-lg font-bold">Add Scheduled Task</h3>
<x-forms.input placeholder="Run cron" id="name" label="Name" required />
<x-forms.input placeholder="php artisan schedule:run" id="command" label="Command" required />
<x-forms.input placeholder="0 0 * * * or daily" id="frequency" label="Frequency" required />
<x-forms.input placeholder="php" id="container" helper="You can leave it empty if your resource only have one container." label="Container name" />
<x-forms.button onclick="newTask.close()" type="submit">
Save
</x-forms.button>
</form>
<form method="dialog" class="modal-backdrop">
<button>close</button>
</form>
</dialog>
<form class="flex flex-col gap-2 rounded" wire:submit='submit'>
<x-forms.input placeholder="Run cron" id="name" label="Name" />
<x-forms.input placeholder="php artisan schedule:run" id="command" label="Command" />
<x-forms.input placeholder="0 0 * * * or daily" id="frequency" label="Frequency" />
<x-forms.input placeholder="php" id="container"
helper="You can leave it empty if your resource only have one container." label="Container name" />
<x-forms.button @click="slideOverOpen=false" type="submit">
Save
</x-forms.button>
</form>

View File

@@ -1,11 +1,15 @@
<div>
<div class="flex gap-2">
<h2 class="pb-4">Scheduled Tasks</h2>
<x-forms.button class="btn" onclick="newTask.showModal()">+ Add</x-forms.button>
<livewire:project.shared.scheduled-task.add />
<h2>Scheduled Tasks</h2>
<x-slide-over>
<x-slot:title>New Scheduled Task</x-slot:title>
<x-slot:content>
<livewire:project.shared.scheduled-task.add />
</x-slot:content>
<button @click="slideOverOpen=true" class="button">+ Add</button>
</x-slide-over>
</div>
<div class="flex flex-wrap gap-2">
<div class="flex flex-wrap gap-2 pt-4">
@forelse($resource->scheduled_tasks as $task)
<a class="flex flex-col box"
@if ($resource->type() == 'application')