ui: redesign

This commit is contained in:
Andras Bacsai
2024-03-20 12:54:06 +01:00
parent 91950e1891
commit b61860b3ab
85 changed files with 1537 additions and 961 deletions

View File

@@ -5,7 +5,7 @@
<div class="pb-4">This will stop your containers, delete all related data, etc. Beware! There is no coming
back!
</div>
<x-new-modal isErrorButton buttonTitle="Delete">
<x-modal-confirmation isErrorButton buttonTitle="Delete">
This resource will be deleted. It is not reversible. <br>Please think again.
</x-new-modal>
</x-modal-confirmation>
</div>

View File

@@ -55,12 +55,12 @@
<x-forms.button isError
wire:click="stop('{{ data_get($destination, 'server.id') }}')">Stop</x-forms.button>
@endif
<x-new-modal
<x-modal-confirmation
action="removeServer({{ data_get($destination, 'id') }},{{ data_get($destination, 'server.id') }})"
isErrorButton buttonTitle="Remove Server">
This will stop the running application in this server and remove it as a deployment
destination.<br><br>Please think again.
</x-new-modal>
</x-modal-confirmation>
</div>
@endforeach

View File

@@ -39,10 +39,10 @@
@endif
<div class="flex gap-2">
@if ($isLocked)
<x-new-modal isErrorButton buttonTitle="Delete">
<x-modal-confirmation isErrorButton buttonTitle="Delete">
You will delete environment variable <span
class="font-bold text-warning">{{ $env->key }}</span>.
</x-new-modal>
</x-modal-confirmation>
@else
@if ($isDisabled)
<x-forms.button disabled type="submit">
@@ -51,10 +51,10 @@
<x-forms.button wire:click='lock'>
Lock
</x-forms.button>
<x-new-modal isErrorButton buttonTitle="Delete">
<x-modal-confirmation isErrorButton buttonTitle="Delete">
You will delete environment variable <span
class="font-bold text-warning">{{ $env->key }}</span>.
</x-new-modal>
</x-modal-confirmation>
@else
<x-forms.button type="submit">
Update
@@ -62,10 +62,10 @@
<x-forms.button wire:click='lock'>
Lock
</x-forms.button>
<x-new-modal isErrorButton buttonTitle="Delete">
<x-modal-confirmation isErrorButton buttonTitle="Delete">
You will delete environment variable <span
class="font-bold text-warning">{{ $env->key }}</span>.
</x-new-modal>
</x-modal-confirmation>
@endif
@endif
</div>

View File

@@ -50,7 +50,7 @@
@endif
</div>
</div>
<div class="container w-full pt-10 mx-auto">
<div class="w-full pt-10 mx-auto">
<livewire:activity-monitor header="Command output" />
</div>
</div>

View File

@@ -11,7 +11,7 @@
<div>
<div class="grid grid-cols-1 gap-2 pb-4 lg:grid-cols-4">
@foreach ($server->destinations() as $destination)
<x-new-modal action="cloneTo({{ data_get($destination, 'id') }})">
<x-modal-confirmation action="cloneTo({{ data_get($destination, 'id') }})">
<x:slot name="content">
<div class="flex flex-col gap-2 box">
<div class="font-bold text-white">{{ $server->name }}</div>
@@ -19,7 +19,7 @@
</div>
</x:slot>
<div>You are about to clone this resource.</div>
</x-new-modal>
</x-modal-confirmation>
@endforeach
</div>
</div>
@@ -37,7 +37,7 @@
@forelse ($projects as $project)
<div class="flex flex-row flex-wrap gap-2">
@foreach ($project->environments as $environment)
<x-new-modal action="moveTo({{ data_get($environment, 'id') }})">
<x-modal-confirmation action="moveTo({{ data_get($environment, 'id') }})">
<x:slot name="content">
<div class="flex flex-col gap-2 box">
<div class="font-bold text-white">{{ $project->name }}</div>
@@ -45,7 +45,7 @@
</div>
</x:slot>
<div>You are about to move this resource.</div>
</x-new-modal>
</x-modal-confirmation>
@endforeach
</div>
@empty

View File

@@ -13,9 +13,9 @@
<x-forms.button type="submit">
Save
</x-forms.button>
<x-new-modal isErrorButton buttonTitle="Delete Scheduled Task">
<x-modal-confirmation isErrorButton buttonTitle="Delete Scheduled Task">
You will delete scheduled task <span class="font-bold text-warning">{{ $task->name }}</span>.
</x-new-modal>
</x-modal-confirmation>
</div>
</div>
<div class="flex w-full gap-2">

View File

@@ -1,28 +1,18 @@
<dialog id="newStorage" class="modal">
<form method="dialog" class="flex flex-col gap-2 rounded modal-box" wire:submit='submit'>
<h3 class="text-lg font-bold">Add Storage Volume</h3>
@if ($isSwarm)
<h5>Swarm Mode detected: You need to set a shared volume (EFS/NFS/etc) on all the worker nodes if you would like to use a persistent volumes.</h5>
@endif
<x-forms.input placeholder="pv-name" id="name" label="Name" required helper="Volume name." />
@if ($isSwarm)
<x-forms.input placeholder="/root" id="host_path" label="Source Path" required helper="Directory on the host system." />
@else
<x-forms.input placeholder="/root" id="host_path" label="Source Path" helper="Directory on the host system." />
@endif
<x-forms.input placeholder="/tmp/root" id="mount_path" label="Destination Path" required helper="Directory inside the container." />
<x-forms.button type="submit">
Save
</x-forms.button>
</form>
<form method="dialog" class="modal-backdrop">
<button>close</button>
</form>
<script>
document.addEventListener('livewire:initialized', () => {
Livewire.on('closeStorageModal', () => {
document.getElementById('newStorage').close()
})
})
</script>
</dialog>
<form class="flex flex-col gap-2 rounded" wire:submit='submit'>
@if ($isSwarm)
<h5>Swarm Mode detected: You need to set a shared volume (EFS/NFS/etc) on all the worker nodes if you would
like to use a persistent volumes.</h5>
@endif
<x-forms.input placeholder="pv-name" id="name" label="Name" required helper="Volume name." />
@if ($isSwarm)
<x-forms.input placeholder="/root" id="host_path" label="Source Path" required
helper="Directory on the host system." />
@else
<x-forms.input placeholder="/root" id="host_path" label="Source Path" helper="Directory on the host system." />
@endif
<x-forms.input placeholder="/tmp/root" id="mount_path" label="Destination Path" required
helper="Directory inside the container." />
<x-forms.button type="submit" @click="slideOverOpen=false">
Save
</x-forms.button>
</form>

View File

@@ -24,12 +24,12 @@
<x-forms.button type="submit">
Update
</x-forms.button>
<x-new-modal isErrorButton buttonTitle="Delete">
<x-modal-confirmation isErrorButton buttonTitle="Delete">
This storage will be deleted <span class="font-bold text-warning">{{ $storage->name }}</span>. It
is
not
reversible. <br>Please think again.
</x-new-modal>
</x-modal-confirmation>
</div>
@endif
</form>

View File

@@ -9,7 +9,7 @@
helper="See details in our <a target='_blank' class='text-white underline' href='https://coolify.io/docs/api/authentication'>documentation</a>."
label="Deploy Webhook (auth required)" id="deploywebhook"></x-forms.input>
</div>
@if ($resource->type() !== 'service')
@if ($resource->type() === 'application')
<div>
<h3>Manual Git Webhooks</h3>
@if ($githubManualWebhook && $gitlabManualWebhook)
@@ -35,7 +35,10 @@
</div>
<div class="flex gap-2">
<x-forms.input readonly label="Bitbucket" id="bitbucketManualWebhook"></x-forms.input>
<x-forms.input type="password" helper="Need to set a secret to be able to use this webhook. It should match with the secret in Bitbucket." label="Bitbucket Webhook Secret" id="resource.manual_webhook_secret_bitbucket"></x-forms.input>
<x-forms.input type="password"
helper="Need to set a secret to be able to use this webhook. It should match with the secret in Bitbucket."
label="Bitbucket Webhook Secret"
id="resource.manual_webhook_secret_bitbucket"></x-forms.input>
</div>
<x-forms.button type="submit">Save</x-forms.button>
</form>