This commit is contained in:
Andras Bacsai
2023-06-16 15:56:25 +02:00
parent ab1ea30dec
commit 8f3ef2b1c5
19 changed files with 130 additions and 23 deletions

View File

@@ -1,5 +1,6 @@
<div x-data="{ deleteDestination: false }">
<x-naked-modal show="deleteDestination" message='Are you sure you would like to delete this destination?' />
<x-naked-modal show="deleteDestination" title="Delete Destination"
message='This destination will be deleted. It is not reversible. <br>Please think again.' />
<form class="flex flex-col">
<div class="flex items-center gap-2">
<h1>Destination</h1>

View File

@@ -1,5 +1,6 @@
<div x-data="{ deletePrivateKey: false, showPrivateKey: false }">
<x-naked-modal show="deletePrivateKey" message='Are you sure you would like to delete this private key?' />
<x-naked-modal show="deletePrivateKey" title="Delete Private Key"
message='This private key will be deleted. It is not reversible. <br>Please think again.' />
<form class="flex flex-col gap-2" wire:submit.prevent='changePrivateKey'>
<div class="flex items-end gap-2">
<h1>Private Key</h1>

View File

@@ -1,10 +1,11 @@
<div x-data="{ deleteApplication: false }">
<x-naked-modal show="deleteApplication" title="Delete Application"
message='This application will be deleted. It is not reversible. <br>Please think again.' />
<h2>Danger Zone</h2>
<div class="">Woah. I hope you know what are you doing.</div>
<h3 class="pt-4">Delete Application</h3>
<div class="pb-4 ">This will stop your containers, delete all related data, etc. Beware! There is no coming
<div class="pb-4">This will stop your containers, delete all related data, etc. Beware! There is no coming
back!
</div>
<x-naked-modal show="deleteApplication" />
<x-forms.button x-on:click.prevent="deleteApplication = true">Yes, please, delete it.</x-forms.button>
<x-forms.button isWarning x-on:click.prevent="deleteApplication = true">Delete</x-forms.button>
</div>

View File

@@ -1,4 +1,6 @@
<div x-data="{ deleteEnvironment: false }">
<x-naked-modal show="deleteEnvironment" title="Delete Environment"
message='This environment will be deleted. It is not reversible. <br>Please think again.' />
<form wire:submit.prevent='submit' class="flex flex-col gap-2 xl:items-end xl:flex-row">
<x-forms.input id="env.key" label="Name" />
<x-forms.input type="password" id="env.value" label="Value" />
@@ -12,5 +14,4 @@
</x-forms.button>
</div>
</form>
<x-naked-modal show="deleteEnvironment" message="Are you sure you want to delete {{ $env->key }}?" />
</div>

View File

@@ -1,4 +1,6 @@
<div x-data="{ deleteStorage: false }">
<x-naked-modal show="deleteStorage" title="Delete Storage"
message='This storage will be deleted. It is not reversible. <br>Please think again.' />
<form wire:submit.prevent='submit' class="flex flex-col gap-2 xl:items-end xl:flex-row">
<x-forms.input id="storage.name" label="Name" required />
<x-forms.input id="storage.host_path" label="Source Path" />
@@ -12,5 +14,4 @@
</x-forms.button>
</div>
</form>
<x-naked-modal show="deleteStorage" message="Are you sure you want to delete {{ $storage->name }}?" />
</div>

View File

@@ -1,5 +1,6 @@
<div x-data="{ deleteEnvironment: false }">
<x-naked-modal show="deleteEnvironment" message='Are you sure you would like to delete this environment?' />
<x-naked-modal show="deleteEnvironment" title="Delete Environment"
message='This environment will be deleted. It is not reversible. <br>Please think again.' />
<x-forms.button x-on:click.prevent="deleteEnvironment = true">
Delete Environment
</x-forms.button>

View File

@@ -1,5 +1,6 @@
<div x-data="{ deleteProject: false }">
<x-naked-modal show="deleteProject" message='Are you sure you would like to delete this project?' />
<x-naked-modal show="deleteProject" title="Delete Project"
message='This project will be deleted. It is not reversible. <br>Please think again.' />
<x-forms.button x-on:click.prevent="deleteProject = true">
Delete Project
</x-forms.button>

View File

@@ -1,5 +1,6 @@
<div x-data="{ deleteServer: false }">
<x-naked-modal show="deleteServer" message='Are you sure you would like to delete this server?' />
<x-naked-modal show="deleteServer" title="Delete Server"
message='This server will be deleted. It is not reversible. <br>Please think again.' />
<form wire:submit.prevent='submit' class="flex flex-col">
<div class="flex gap-2">
<h2>General</h2>

View File

@@ -1,6 +1,6 @@
<div x-data="{ stopProxy: false }">
<x-naked-modal show="stopProxy" action="stopProxy"
message='Are you sure you would like to stop the proxy? All resources will be unavailable.' />
<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.' />
@if ($server->settings->is_reachable)
@if ($server->extra_attributes->proxy_type)
<div x-init="$wire.checkProxySettingsInSync">

View File

@@ -1,5 +1,6 @@
<div x-data="{ deleteSource: false }">
<x-naked-modal show="deleteSource" message='Are you sure you would like to delete this source?' />
<x-naked-modal show="deleteSource" title="Delete Source"
message='This source will be deleted. It is not reversible. <br>Please think again.' />
<form wire:submit.prevent='submit'>
<div class="flex items-center gap-2">
<h1>GitHub App</h1>

View File

@@ -0,0 +1,47 @@
<div x-data="{ deleteTeam: false }">
<x-naked-modal show="deleteTeam" title="Delete Team"
message='This team will be deleted. It is not reversible. <br>Please think again.' />
<h3>Danger Zone</h3>
<div class="pb-4">Woah. I hope you know what are you doing.</div>
<h4 class="pb-4">Delete Team</h4>
@if (session('currentTeam.id') === 0)
<div>This is the default team. You can't delete it.</div>
@elseif(auth()->user()->teams()->get()->count() === 1)
<div>You can't delete your last team.</div>
@else
@if (session('currentTeam')->isEmpty())
<div class="pb-4">This will delete your team. Beware! There is no coming back!</div>
<x-forms.button isWarning x-on:click.prevent="deleteTeam = true">
Delete
</x-forms.button>
@else
<div>
<div class="pb-4">You need to delete the following resources to be able to delete the team:</div>
<h4 class="pb-4">Projects:</h4>
<ul class="pl-8 list-disc">
@foreach (session('currentTeam')->projects as $resource)
<li>{{ $resource->name }}</li>
@endforeach
</ul>
<h4 class="py-4">Servers:</h4>
<ul class="pl-8 list-disc">
@foreach (session('currentTeam')->servers as $resource)
<li>{{ $resource->name }}</li>
@endforeach
</ul>
<h4 class="py-4">Private Keys:</h4>
<ul class="pl-8 list-disc">
@foreach (session('currentTeam')->privateKeys as $resource)
<li>{{ $resource->name }}</li>
@endforeach
</ul>
<h4 class="py-4">Sources:</h4>
<ul class="pl-8 list-disc">
@foreach (session('currentTeam')->sources() as $resource)
<li>{{ $resource->name }}</li>
@endforeach
</ul>
@endif
@endif
</div>