Add notebook delete, fix button styling, rename Share button

- Add delete notebook handler with ownership check and CASCADE delete
- Rename "Create Share Link" to "Share"
- Fix action button heights: use inline-flex + align-items for
  consistent sizing across <a> and <button> elements

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-25 09:43:57 -07:00
parent aeb12d9f50
commit 651eabe995
4 changed files with 25 additions and 3 deletions

View File

@@ -6,7 +6,11 @@
<a href="{{.PDFLink}}" class="btn">Download PDF</a>
{{if not .Shared}}
<form method="POST" action="/notebooks/{{.ID}}/share" style="display:inline;">
<button type="submit" class="btn">Create Share Link</button>
<button type="submit" class="btn">Share</button>
</form>
<form method="POST" action="/notebooks/{{.ID}}/delete" style="display:inline;"
onsubmit="return confirm('Delete this notebook from the server?');">
<button type="submit" class="btn" style="color: #c62828; border-color: #c62828;">Delete</button>
</form>
{{end}}
</div>