frontend: hide/show ServerCreate Form

This commit is contained in:
Frank Agerholm 2026-01-25 18:12:35 +01:00
commit 9fda6b5a5c
No known key found for this signature in database
4 changed files with 97 additions and 6 deletions

View file

@ -177,13 +177,13 @@ onMounted(() => {
@click="saveEdit(server.id)"
class="bg-green-600 text-white px-2 py-1 rounded mr-2"
>
Speichern
<Icon name="heroicons:check" class="w-5 h-5" />
</button>
<button
@click="cancelEdit"
class="bg-gray-400 text-white px-2 py-1 rounded"
>
Abbrechen
<Icon name="heroicons:x-mark" class="w-5 h-5" />
</button>
</template>
@ -192,7 +192,7 @@ onMounted(() => {
@click="startEdit(server)"
class="bg-blue-600 text-white px-2 py-1 rounded"
>
Bearbeiten
<Icon name="heroicons:pencil-square" class="w-5 h-5" />
</button>
</template>
</td>
@ -202,11 +202,21 @@ onMounted(() => {
</div>
<button
@click="showCreateForm = !showCreateForm"
class="bg-blue-600 text-white px-4 py-2 rounded hover:bg-blue-700"
class="flex items-center gap-2 text-blue-600 hover:text-blue-800"
>
{{ showCreateForm ? "Formular ausblenden" : "Neuen Server anlegen" }}
<Icon
v-if="showCreateForm"
name="heroicons:eye-slash"
class="w-5 h-5"
/>
<Icon
v-else
name="heroicons:document-plus"
class="w-5 h-5"
/>
</button>
<!-- Neues Server-Formular -->
<Transition name="fade">
<div v-if="showCreateForm" class="p-4 bg-white shadow rounded space-y-4">