fix: remove old modal

This commit is contained in:
Andras Bacsai
2023-07-28 13:31:47 +02:00
parent 331b85c57e
commit 0d56d3a555
14 changed files with 86 additions and 99 deletions

View File

@@ -1,19 +1,21 @@
<div x-data="{ changeLocalhost: false }">
<x-modal yesOrNo modalId="{{ $modalId }}" modalTitle="Delete Server">
<div>
<x-modal yesOrNo modalId="deleteServer" modalTitle="Delete Server">
<x-slot:modalBody>
<p>This server will be deleted. It is not reversible. <br>Please think again..</p>
</x-slot:modalBody>
</x-modal>
<x-naked-modal show="changeLocalhost" action="submit" title="Change localhost"
message='You could lost a lot of functionalities if you change the server details of the server where Coolify is running on.<br>Please think again.' />
<x-modal yesOrNo modalId="changeLocalhost" modalTitle="Change Localhost" action="submit">
<x-slot:modalBody>
<p>You could lost a lot of functionalities if you change the server details of the server where Coolify is
running on.<br>Please think again.</p>
</x-slot:modalBody>
</x-modal>
@if ($server->settings->is_reachable)
<form wire:submit.prevent='submit' class="flex flex-col">
<div class="flex gap-2">
<h2>General</h2>
@if ($server->id === 0)
<x-forms.button x-on:click.prevent="changeLocalhost = true">Save</x-forms.button>
<x-forms.button isModal modalId="changeLocalhost">Save</x-forms.button>
@else
<x-forms.button type="submit">Save</x-forms.button>
@endif
@@ -86,7 +88,7 @@
back!
</div>
@if ($server->id !== 0 || isDev())
<x-forms.button isError isModal modalId="{{ $modalId }}">
<x-forms.button isError isModal modalId="deleteServer">
Delete
</x-forms.button>
@endif

View File

@@ -1,6 +1,4 @@
<div x-data="{ stopProxy: false }">
<x-naked-modal show="stopProxy" action="stopProxy" title="Stop Proxy"
message='This proxy will be stopped. It is not reversible. <br>All resources will be unavailable. <br>Please think again.' />
<div>
@if ($server->settings->is_usable)
@if ($server->proxy->type)
<div x-init="$wire.checkProxySettingsInSync">

View File

@@ -1,6 +1,14 @@
<div>
@if (data_get($server, 'proxy.type'))
@if (data_get($server, 'proxy.status') === 'running')
<x-modal yesOrNo modalId="stopProxy" modalTitle="Stop Proxy" action="stop">
<x-slot:modalBody>
<p>This proxy will be stopped. It is not reversible. <br>All resources will be unavailable.
<br>Please think
again.
</p>
</x-slot:modalBody>
</x-modal>
<div class="flex gap-4">
<div class="group">
<label tabindex="0" class="flex items-center gap-2 cursor-pointer hover:text-white"> Links
@@ -49,8 +57,9 @@
</svg>Restart</div>
</li>
<li>
<div class="rounded-none hover:bg-red-500 hover:text-white" wire:click='stop'><svg
xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" viewBox="0 0 24 24"
<x-forms.button isModal noStyle modalId="stopProxy"
class="rounded-none hover:bg-red-500 hover:text-white">
<svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" viewBox="0 0 24 24"
stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round"
stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
@@ -59,7 +68,9 @@
<path d="M14 5.5a1.5 1.5 0 0 1 3 0v6.5" />
<path
d="M17 7.5a1.5 1.5 0 0 1 3 0v8.5a6 6 0 0 1 -6 6h-2h.208a6 6 0 0 1 -5.012 -2.7a69.74 69.74 0 0 1 -.196 -.3c-.312 -.479 -1.407 -2.388 -3.286 -5.728a1.5 1.5 0 0 1 .536 -2.022a1.867 1.867 0 0 1 2.28 .28l1.47 1.47" />
</svg>Stop</div>
</svg>Stop
</x-forms.button>
</li>
</ul>
</div>