use naked modal

This commit is contained in:
Andras Bacsai 2023-05-04 22:39:40 +02:00
parent c4a4801414
commit 1e98cddaa6
5 changed files with 13 additions and 11 deletions

View File

@ -20,7 +20,7 @@
@livewireStyles @livewireStyles
</head> </head>
<body x-data="confirmModal"> <body>
@auth @auth
<x-navbar /> <x-navbar />
@endauth @endauth
@ -28,7 +28,6 @@
{{ $slot }} {{ $slot }}
</main> </main>
<x-confirm-modal />
@livewireScripts @livewireScripts
@auth @auth
<script> <script>

View File

@ -1,4 +1,5 @@
<div> <div x-data="{ deleteDestination: false }">
<x-naked-modal show="deleteDestination" message='Are you sure you would like to delete this destination?' />
<form class="flex flex-col gap-4" wire:submit.prevent='submit'> <form class="flex flex-col gap-4" wire:submit.prevent='submit'>
<x-inputs.input id="destination.name" label="Name" /> <x-inputs.input id="destination.name" label="Name" />
<x-inputs.input id="destination.server.ip" label="Server IP" readonly /> <x-inputs.input id="destination.server.ip" label="Server IP" readonly />
@ -9,7 +10,7 @@
<x-inputs.button> <x-inputs.button>
Submit Submit
</x-inputs.button> </x-inputs.button>
<x-inputs.button confirm='Are you sure you would like to delete this private key?' confirmAction="delete"> <x-inputs.button isWarning x-on:click="deleteDestination = true">
Delete Delete
</x-inputs.button> </x-inputs.button>
</div> </div>

View File

@ -1,4 +1,5 @@
<div> <div x-data="{ deletePrivateKey: false }">
<x-naked-modal show="deletePrivateKey" message='Are you sure you would like to delete this private key?' />
<form class="flex flex-col gap-2 w-96" wire:submit.prevent='changePrivateKey'> <form class="flex flex-col gap-2 w-96" wire:submit.prevent='changePrivateKey'>
<x-inputs.input id="private_key.name" label="Name" required /> <x-inputs.input id="private_key.name" label="Name" required />
<x-inputs.input id="private_key.description" label="Description" /> <x-inputs.input id="private_key.description" label="Description" />
@ -6,7 +7,7 @@
<x-inputs.button type="submit"> <x-inputs.button type="submit">
Submit Submit
</x-inputs.button> </x-inputs.button>
<x-inputs.button confirm='Are you sure you would like to delete this private key?' confirmAction="delete"> <x-inputs.button isWarning x-on:click="deletePrivateKey = true">
Delete Delete
</x-inputs.button> </x-inputs.button>
</form> </form>

View File

@ -1,5 +1,5 @@
<div> <div x-data="{ deleteApplication: false }">
<x-naked-modal show="deleteApplication" />
@if ($application->status === 'running') @if ($application->status === 'running')
<x-inputs.button wire:click='start'>Restart</x-inputs.button> <x-inputs.button wire:click='start'>Restart</x-inputs.button>
<x-inputs.button wire:click='forceRebuild'>Force Rebuild</x-inputs.button> <x-inputs.button wire:click='forceRebuild'>Force Rebuild</x-inputs.button>
@ -8,7 +8,7 @@
<x-inputs.button wire:click='start'>Start</x-inputs.button> <x-inputs.button wire:click='start'>Start</x-inputs.button>
<x-inputs.button wire:click='forceRebuild'>Start (no cache)</x-inputs.button> <x-inputs.button wire:click='forceRebuild'>Start (no cache)</x-inputs.button>
@endif @endif
<x-inputs.button confirmAction="delete" confirm='Are you sure you would like to delete this application?'> <x-inputs.button isWarning x-on:click="deleteApplication = true">
Delete</x-inputs.button> Delete</x-inputs.button>
<span wire:poll.5000ms='pollingStatus'> <span wire:poll.5000ms='pollingStatus'>
@if ($application->status === 'running') @if ($application->status === 'running')

View File

@ -1,4 +1,5 @@
<div> <div x-data="{ deleteServer: false }">
<x-naked-modal show="deleteServer" message='Are you sure you would like to delete this server?' />
<form wire:submit.prevent='submit' class="flex flex-col"> <form wire:submit.prevent='submit' class="flex flex-col">
<div class="flex flex-col gap-2 xl:flex-row"> <div class="flex flex-col gap-2 xl:flex-row">
<div class="flex flex-col w-96"> <div class="flex flex-col w-96">
@ -21,7 +22,7 @@
<x-inputs.button type="submit">Submit</x-inputs.button> <x-inputs.button type="submit">Submit</x-inputs.button>
<x-inputs.button wire:click.prevent='checkServer'>Check Server</x-inputs.button> <x-inputs.button wire:click.prevent='checkServer'>Check Server</x-inputs.button>
<x-inputs.button wire:click.prevent='installDocker'>Install Docker</x-inputs.button> <x-inputs.button wire:click.prevent='installDocker'>Install Docker</x-inputs.button>
<x-inputs.button confirm="Are you sure you would like to delete this application?" confirmAction="delete"> <x-inputs.button isWarning x-on:click="deleteServer = true">
Delete Delete
</x-inputs.button> </x-inputs.button>
</div> </div>