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

Show global options in the about page

Only shows the options when current user is admin.
This commit is contained in:
Shizun Ge 2020-12-29 19:43:37 -08:00 committed by fguillot
parent 926ddf6d09
commit 23e4183bec
16 changed files with 139 additions and 63 deletions

View file

@ -7,6 +7,7 @@ package ui // import "miniflux.app/ui"
import (
"net/http"
"miniflux.app/config"
"miniflux.app/http/request"
"miniflux.app/http/response/html"
"miniflux.app/ui/session"
@ -30,6 +31,7 @@ func (h *handler) showAboutPage(w http.ResponseWriter, r *http.Request) {
view.Set("user", user)
view.Set("countUnread", h.store.CountUnreadEntries(user.ID))
view.Set("countErrorFeeds", h.store.CountUserFeedsWithErrors(user.ID))
view.Set("globalConfigOptions", config.Opts.SortedOptions())
html.OK(w, r, view.Render("about"))
}