Un-collapse connection form + add New Device to nav

The 'Create Connection' form now shows directly when clicking an
unconnected port instead of being hidden inside a <details> element
requiring two clicks. Added a 'New Device' nav link that jumps to
the create form on the overview page.
master
Joca 2026-06-09 19:10:59 -03:00
parent c56c512764
commit a75b7267c5
Signed by: jocadbz
GPG Key ID: B1836DCE2F50BDF7
2 changed files with 3 additions and 2 deletions

View File

@ -12,6 +12,7 @@
<a href="/" class="nav-brand">Wireplanner</a> <a href="/" class="nav-brand">Wireplanner</a>
<div class="nav-links"> <div class="nav-links">
<a href="/">Overview</a> <a href="/">Overview</a>
<a href="/#create-device">New Device</a>
<a href="/models">Models</a> <a href="/models">Models</a>
<a href="/wall-sockets">Wall Sockets</a> <a href="/wall-sockets">Wall Sockets</a>
</div> </div>

View File

@ -29,7 +29,7 @@
<section> <section>
<h2>Devices</h2> <h2>Devices</h2>
<div class="grid"> <div class="grid" id="create-device">
{{range .Devices}} {{range .Devices}}
<a href="/devices/{{.ID}}" class="card"> <a href="/devices/{{.ID}}" class="card">
<strong>{{.Name}}</strong> <strong>{{.Name}}</strong>
@ -40,7 +40,7 @@
<div class="empty-state">No devices yet. Create one or add a rack first.</div> <div class="empty-state">No devices yet. Create one or add a rack first.</div>
{{end}} {{end}}
</div> </div>
<details> <details id="create-device">
<summary>Create Device</summary> <summary>Create Device</summary>
<form method="POST" action="/devices/add"> <form method="POST" action="/devices/add">
<label>Name <input name="name" required></label> <label>Name <input name="name" required></label>