mirror of
https://github.com/miniflux/v2.git
synced 2025-08-01 17:38:37 +00:00
Add reading time for entries
This commit is contained in:
parent
499fb1f7df
commit
ee5a8a05c9
25 changed files with 813 additions and 653 deletions
|
@ -23,6 +23,7 @@ type SettingsForm struct {
|
|||
EntryDirection string
|
||||
EntriesPerPage int
|
||||
KeyboardShortcuts bool
|
||||
ShowReadingTime bool
|
||||
CustomCSS string
|
||||
}
|
||||
|
||||
|
@ -35,6 +36,7 @@ func (s *SettingsForm) Merge(user *model.User) *model.User {
|
|||
user.EntryDirection = s.EntryDirection
|
||||
user.EntriesPerPage = s.EntriesPerPage
|
||||
user.KeyboardShortcuts = s.KeyboardShortcuts
|
||||
user.ShowReadingTime = s.ShowReadingTime
|
||||
user.Extra["custom_css"] = s.CustomCSS
|
||||
|
||||
if s.Password != "" {
|
||||
|
@ -88,6 +90,7 @@ func NewSettingsForm(r *http.Request) *SettingsForm {
|
|||
EntryDirection: r.FormValue("entry_direction"),
|
||||
EntriesPerPage: int(entriesPerPage),
|
||||
KeyboardShortcuts: r.FormValue("keyboard_shortcuts") == "1",
|
||||
ShowReadingTime: r.FormValue("show_reading_time") == "1",
|
||||
CustomCSS: r.FormValue("custom_css"),
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,6 +34,7 @@ func (h *handler) showSettingsPage(w http.ResponseWriter, r *http.Request) {
|
|||
EntryDirection: user.EntryDirection,
|
||||
EntriesPerPage: user.EntriesPerPage,
|
||||
KeyboardShortcuts: user.KeyboardShortcuts,
|
||||
ShowReadingTime: user.ShowReadingTime,
|
||||
CustomCSS: user.Extra["custom_css"],
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue