feat: Host CRUD complete — edit, full form fields, connect, toast

- Add UpdateHost handler + PUT /hosts/:id route
- CreateHost now accepts all fields (port, username, auth, notes)
- host_modal.html: full form with port, username, auth type toggle, edit mode
- host_list.html: edit button dispatches edit-host event with host data
- Connect button links to /terminal?host={id} for pre-selection
- Terminal page reads selected host from query param
- Toast notification system via Alpine.js events
- Add default template function for fallback values
This commit is contained in:
swanadiva
2026-07-07 15:51:57 +07:00
parent 3df8416d9b
commit 301115b74d
8 changed files with 285 additions and 58 deletions
+1
View File
@@ -31,6 +31,7 @@
</div>
</div>
<script id="hosts-data" type="application/json">{{.HostsJSON}}</script>
<script id="selected-host" type="application/json">"{{.SelectedHost}}"</script>
<script src="/static/xterm/xterm.js"></script>
<script src="/static/js/terminal.js"></script>
</body>