fix(feeds): simplify import endpoint path and improve note UI

This commit is contained in:
Nicola Zangrandi 2025-02-28 17:37:39 +01:00
parent 69bb3aea03
commit c8a0fdda83
Signed by: wasp
GPG key ID: 43C1470D890F23ED
2 changed files with 21 additions and 6 deletions

View file

@ -30,7 +30,7 @@ func (h *Handler) RegisterRoutes(router *gin.RouterGroup) {
feeds.DELETE("/:id", h.handleDeleteFeed) feeds.DELETE("/:id", h.handleDeleteFeed)
feeds.POST("/:id/refresh", h.handleRefreshFeed) feeds.POST("/:id/refresh", h.handleRefreshFeed)
feeds.POST("/refresh", h.handleRefreshAllFeeds) feeds.POST("/refresh", h.handleRefreshAllFeeds)
feeds.POST("/import/opml", h.handleImportOPML) feeds.POST("/import", h.handleImportOPML)
// Entry routes // Entry routes
feeds.GET("/entries", h.handleListEntries) feeds.GET("/entries", h.handleListEntries)

View file

@ -64,6 +64,26 @@
<h1 class="title">{note.title}</h1> <h1 class="title">{note.title}</h1>
</div> </div>
</div> </div>
<div class="level-right">
<div class="level-item">
<div class="buttons">
<a href="/" class="button">
<span class="icon">
<i class="fas fa-arrow-left"></i>
</span>
<span>Back to Notes</span>
</a>
{#if !isEditing}
<button class="button is-primary" onclick={() => (isEditing = true)}>
<span class="icon">
<i class="fas fa-edit"></i>
</span>
<span>Edit</span>
</button>
{/if}
</div>
</div>
</div>
</div> </div>
{#if isEditing} {#if isEditing}
<div class="field"> <div class="field">
@ -102,11 +122,6 @@
<!-- eslint-disable-next-line svelte/no-at-html-tags --> <!-- eslint-disable-next-line svelte/no-at-html-tags -->
{@html html} {@html html}
{/await} {/await}
<div class="field is-grouped mt-4">
<div class="control">
<button class="button is-primary" onclick={() => (isEditing = true)}>Edit</button>
</div>
</div>
</div> </div>
{/if} {/if}