refactor: Improve modal confirmation titles and button labels

This commit is contained in:
Andras Bacsai
2024-09-26 13:07:01 +02:00
parent 174923de98
commit f3ec4ca4a3

View File

@@ -76,7 +76,7 @@
@endif @endif
@if ($application->fqdn) @if ($application->fqdn)
<span class="flex gap-1 text-xs">{{ Str::limit($application->fqdn, 60) }} <span class="flex gap-1 text-xs">{{ Str::limit($application->fqdn, 60) }}
<x-modal-input title="Edit Domains"> <x-modal-input title="Edit Domains" closeOutside="false">
<x-slot:content> <x-slot:content>
<span class="cursor-pointer"> <span class="cursor-pointer">
<svg xmlns="http://www.w3.org/2000/svg" <svg xmlns="http://www.w3.org/2000/svg"
@@ -107,15 +107,14 @@
Settings Settings
</a> </a>
@if (str($application->status)->contains('running')) @if (str($application->status)->contains('running'))
<x-modal-confirmation <x-modal-confirmation title="Confirm Service Application Restart?"
title="Confirm Service Application Restart?" buttonTitle="Restart"
buttonTitle="Restart" submitAction="restartApplication({{ $application->id }})" :actions="[
submitAction="restartApplication({{ $application->id }})" 'The selected service application will be unavailable during the restart.',
:actions="['The selected service application will be unavailable during the restart.', 'If the service application is currently in use data could be lost.']" 'If the service application is currently in use data could be lost.',
:confirmWithText="false" ]"
:confirmWithPassword="false" :confirmWithText="false" :confirmWithPassword="false"
step2ButtonText="Restart Service Container" step2ButtonText="Restart Service Container" />
/>
@endif @endif
</div> </div>
</div> </div>
@@ -155,15 +154,13 @@
Settings Settings
</a> </a>
@if (str($database->status)->contains('running')) @if (str($database->status)->contains('running'))
<x-modal-confirmation <x-modal-confirmation title="Confirm Service Database Restart?"
title="Confirm Service Database Restart?" buttonTitle="Restart" submitAction="restartDatabase({{ $database->id }})"
buttonTitle="Restart" :actions="[
submitAction="restartDatabase({{ $database->id }})" 'This service database will be unavailable during the restart.',
:actions="['This service database will be unavailable during the restart.', 'If the service database is currently in use data could be lost.']" 'If the service database is currently in use data could be lost.',
:confirmWithText="false" ]" :confirmWithText="false" :confirmWithPassword="false"
:confirmWithPassword="false" step2ButtonText="Restart Database" />
step2ButtonText="Restart Database"
/>
@endif @endif
</div> </div>
</div> </div>
@@ -183,7 +180,8 @@
lazy /> lazy />
@endforeach @endforeach
@foreach ($databases as $database) @foreach ($databases as $database)
<livewire:project.service.storage wire:key="database-{{ $database->id }}" :resource="$database" lazy /> <livewire:project.service.storage wire:key="database-{{ $database->id }}" :resource="$database"
lazy />
@endforeach @endforeach
</div> </div>
<div x-cloak x-show="activeTab === 'scheduled-tasks'"> <div x-cloak x-show="activeTab === 'scheduled-tasks'">