1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-01 17:38:37 +00:00

fix(ui): Redirect correctly post feed removal from category feeds list

Currently, removing a feed from `/category/{id}/feeds` redirects incorrectly to `/feeds`. This change fixes it so that
removing a feed will now correctly redirect to `/category/{id}/feeds`. Removing a feed from `/feeds` is unaffected and
will work as it does currently.

To fix this, a new UI endpoint `/category/{categoryID}/feed/{feedID}/remove` is added and a corresponding handler method
to validate and perform the removal from DB.
This commit is contained in:
Sangeeth Sudheer 2025-01-27 12:56:38 +05:30 committed by Frédéric Guillot
parent fba23cf464
commit e40446ad3c
5 changed files with 44 additions and 2 deletions

View file

@ -66,7 +66,11 @@
data-label-yes="{{ t "confirm.yes" }}"
data-label-no="{{ t "confirm.no" }}"
data-label-loading="{{ t "confirm.loading" }}"
data-url="{{ route "removeFeed" "feedID" .ID }}">{{ icon "delete" }}<span class="icon-label">{{ t "action.remove" }}</span></button>
{{ if $.categoryID }}
data-url="{{ route "removeCategoryFeed" "categoryID" $.categoryID "feedID" .ID }}"
{{ else }}
data-url="{{ route "removeFeed" "feedID" .ID }}"
{{ end }}>{{ icon "delete" }}<span class="icon-label">{{ t "action.remove" }}</span></button>
</li>
{{ if .UnreadCount }}
<li class="item-meta-icons-mark-as-read">