delete application + init confirm modal
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<nav class="flex gap-4 py-2 bg-gray-100">
|
||||
<nav class="flex gap-4 py-2">
|
||||
<a href="{{ route('project.application.configuration', Route::current()->parameters()) }}">Configuration</a>
|
||||
<a href="{{ route('project.application.deployments', Route::current()->parameters()) }}">Deployments</a>
|
||||
<livewire:project.application.deploy :applicationId="$applicationId" />
|
||||
|
||||
24
resources/views/components/confirm-modal.blade.php
Normal file
24
resources/views/components/confirm-modal.blade.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<script>
|
||||
document.addEventListener('alpine:init', () => {
|
||||
Alpine.data('confirmModal', () => ({
|
||||
open: false,
|
||||
message: 'Are you sure?',
|
||||
toggleConfirmModal(customMessage) {
|
||||
this.message = customMessage
|
||||
this.open = !this.open
|
||||
},
|
||||
}))
|
||||
})
|
||||
</script>
|
||||
<div x-cloak x-show="open" x-transition.opacity class="fixed inset-0 bg-slate-900/75"></div>
|
||||
<div x-cloak x-show="open" x-transition class="fixed inset-0 z-50 flex pt-10">
|
||||
<div @click.away="open = false" class="w-screen h-20 max-w-xl mx-auto bg-black rounded-lg">
|
||||
<div class="flex flex-col items-center justify-center h-full">
|
||||
<div class="pb-5 text-white" x-text="message"></div>
|
||||
<div>
|
||||
<button x-on:click="open = false">Cancel</button>
|
||||
<button x-on:click="$dispatch('confirm')">Confirm</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -15,12 +15,13 @@
|
||||
@livewireStyles
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<body x-data="confirmModal" x-on:keydown.escape="toggleConfirmModal">
|
||||
<x-navbar />
|
||||
<main>
|
||||
{{ $slot }}
|
||||
</main>
|
||||
|
||||
<x-confirm-modal />
|
||||
@livewireScripts
|
||||
</body>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user