aboutsummaryrefslogtreecommitdiffhomepage
path: root/ui
diff options
context:
space:
mode:
authorGravatar Frédéric Guillot <fred@miniflux.net>2019-07-26 21:13:06 -0700
committerGravatar Frédéric Guillot <fred@miniflux.net>2019-07-26 21:24:15 -0700
commit3d19313a7f655bc2626990650c4de8141485eea3 (patch)
treec7fb0ade2b0f2eac2ae42067342df2e584ad230d /ui
parent17aae725830cdd27131d40e20f3901d7da25e281 (diff)
Add option to disable feeds
Diffstat (limited to 'ui')
-rw-r--r--ui/feed_edit.go1
-rw-r--r--ui/form/feed.go3
-rw-r--r--ui/static/js/app.js4
3 files changed, 4 insertions, 4 deletions
diff --git a/ui/feed_edit.go b/ui/feed_edit.go
index a195613..a01c8c9 100644
--- a/ui/feed_edit.go
+++ b/ui/feed_edit.go
@@ -51,6 +51,7 @@ func (h *handler) showEditFeedPage(w http.ResponseWriter, r *http.Request) {
CategoryID: feed.Category.ID,
Username: feed.Username,
Password: feed.Password,
+ Disabled: feed.Disabled,
}
sess := session.New(h.store, request.SessionID(r))
diff --git a/ui/form/feed.go b/ui/form/feed.go
index 0151ea6..1a04acf 100644
--- a/ui/form/feed.go
+++ b/ui/form/feed.go
@@ -24,6 +24,7 @@ type FeedForm struct {
CategoryID int64
Username string
Password string
+ Disabled bool
}
// ValidateModification validates FeedForm fields
@@ -48,6 +49,7 @@ func (f FeedForm) Merge(feed *model.Feed) *model.Feed {
feed.ParsingErrorMsg = ""
feed.Username = f.Username
feed.Password = f.Password
+ feed.Disabled = f.Disabled
return feed
}
@@ -69,5 +71,6 @@ func NewFeedForm(r *http.Request) *FeedForm {
CategoryID: int64(categoryID),
Username: r.FormValue("feed_username"),
Password: r.FormValue("feed_password"),
+ Disabled: r.FormValue("disabled") == "1",
}
}
diff --git a/ui/static/js/app.js b/ui/static/js/app.js
index f054cc0..cae1d45 100644
--- a/ui/static/js/app.js
+++ b/ui/static/js/app.js
@@ -118,10 +118,6 @@ function markPageAsRead() {
function handleEntryStatus(element) {
let currentEntry = findEntry(element);
if (currentEntry) {
- // The order is important here,
- // On the unread page, the read item will be hidden.
- // If "goToNextListItem" first, it may go to an item about to hide:
- // Imagine that user click 'mark as read' right below the '.current-item'
toggleEntryStatus(currentEntry);
if (isListView() && currentEntry.classList.contains('current-item')) {
goToNextListItem();