feat(admin): collapse create-feed form into accordion

Wrap the "Create New Feed" form in a native <details> accordion, collapsed
by default and auto-opened when no feeds exist. After creating a feed,
redirect to the "Your Feeds" anchor so the new feed is immediately visible.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Julien Herr
2026-05-23 21:41:25 +02:00
parent 5fc91a0be4
commit 3368b0d1d2
4 changed files with 44 additions and 6 deletions
+9 -4
View File
@@ -383,8 +383,13 @@ app.get("/", async (c) => {
</div>
</div>
<div class="card">
<h2>Create New Feed</h2>
<details
class="card create-feed-card"
open={feedsWithConfig.length === 0}
>
<summary class="create-feed-summary">
<h2>Create New Feed</h2>
</summary>
<form action="/admin/feeds/create" method="post">
<div class="form-group">
<label for="title">Feed Title</label>
@@ -458,7 +463,7 @@ app.get("/", async (c) => {
Create Feed
</button>
</form>
</div>
</details>
{message === "bulkDeleted" && (
<div class="card">
@@ -471,7 +476,7 @@ app.get("/", async (c) => {
</div>
)}
<div class="toolbar">
<div class="toolbar" id="your-feeds">
<div class="toolbar-group">
<h2 style="margin: 0;">Your Feeds</h2>
<span class="pill" id="feed-total-count">