An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
Added confirmation modal for switching proxies
ShadowArcanist8c005435b542
diff --git a/resources/views/components/modal-confirmation.blade.php b/resources/views/components/modal-confirmation.blade.phpindex 0d185782f2..1c82614a64 100644--- a/resources/views/components/modal-confirmation.blade.php+++ b/resources/views/components/modal-confirmation.blade.php@@ -11,6 +11,7 @@'content' => null,'checkboxes' => [],'actions' => [],+ 'warningMessage' => null,'confirmWithText' => true,'confirmationText' => 'Confirm Deletion','confirmationLabel' => 'Please confirm the execution of the actions by entering the Name below',@@ -228,7 +229,7 @@<div x-show="step === 2"><div class="p-4 mb-4 text-white border-l-4 border-red-500 bg-error" role="alert"><p class="font-bold">Warning</p>- <p>This operation is permanent and cannot be undone. Please think again before proceeding!+ <p>{!! $warningMessage ?: 'This operation is permanent and cannot be undone. Please think again before proceeding!' !!}</p></div><div class="mb-4">The following actions will be performed:</div>diff --git a/resources/views/livewire/server/proxy.blade.php b/resources/views/livewire/server/proxy.blade.phpindex db2fd28274..9100fc2a01 100644--- a/resources/views/livewire/server/proxy.blade.php+++ b/resources/views/livewire/server/proxy.blade.php@@ -4,24 +4,22 @@<div x-init="$wire.loadProxyConfiguration">@if ($selectedProxy !== 'NONE')<form wire:submit='submit'>- <div class="flex items-center gap-2">- <h2>Configuration</h2>- @if ($server->proxy->status === 'exited' || $server->proxy->status === 'removing')- <x-forms.button canGate="update" :canResource="$server" wire:click.prevent="changeProxy">Switch- Proxy</x-forms.button>- @else- <x-forms.button canGate="update" :canResource="$server" disabled- wire:click.prevent="changeProxy">Switch Proxy</x-forms.button>- @endif- <x-forms.button canGate="update" :canResource="$server" type="submit">Save</x-forms.button>- </div>- <div class="pb-4 "> <svg class="inline-flex w-6 h-6 mr-2 dark:text-warning" viewBox="0 0 256 256"- xmlns="http://www.w3.org/2000/svg">- <path fill="currentColor"- d="M240.26 186.1L152.81 34.23a28.74 28.74 0 0 0-49.62 0L15.74 186.1a27.45 27.45 0 0 0 0 27.71A28.31 28.31 0 0 0 40.55 228h174.9a28.31 28.31 0 0 0 24.79-14.19a27.45 27.45 0 0 0 .02-27.71m-20.8 15.7a4.46 4.46 0 0 1-4 2.2H40.55a4.46 4.46 0 0 1-4-2.2a3.56 3.56 0 0 1 0-3.73L124 46.2a4.77 4.77 0 0 1 8 0l87.44 151.87a3.56 3.56 0 0 1 .02 3.73M116 136v-32a12 12 0 0 1 24 0v32a12 12 0 0 1-24 0m28 40a16 16 0 1 1-16-16a16 16 0 0 1 16 16" />- </svg>Before switching proxies, please read <a class="underline dark:text-white"- href="https://coolify.io/docs/knowledge-base/server/proxies#switch-between-proxies">this</a>.- </div>+ <div class="flex items-center gap-2">+ <h2>Configuration</h2>+ @if ($server->proxy->status === 'exited' || $server->proxy->status === 'removing')+ @can('update', $server)+ <x-modal-confirmation title="Confirm Proxy Switching?" buttonTitle="Switch Proxy"+ submitAction="changeProxy" :actions="[+ 'Custom proxy configurations may be reset to their default settings.'+ ]" warningMessage="This operation may cause issues. Please refer to the guide <a href='https://coolify.io/docs/knowledge-base/server/proxies#switch-between-proxies' target='_blank' class='underline text-white'>switching between proxies</a> before proceeding!" step2ButtonText="Switch Proxy" :confirmWithText="false" :confirmWithPassword="false">+ </x-modal-confirmation>+ @endcan+ @else+ <x-forms.button canGate="update" :canResource="$server"+ wire:click="$dispatch('error', 'Currently running proxy must be stopped before switching proxy')">Switch Proxy</x-forms.button>+ @endif+ <x-forms.button canGate="update" :canResource="$server" type="submit">Save</x-forms.button>+ </div><h3>Advanced</h3><div class="pb-4 w-96"><x-forms.checkbox canGate="update" :canResource="$server"