1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-21 18:11:09 +00:00

Add the ability to use custom css

This commit is contained in:
Alex McGrath 2020-03-31 00:54:02 +01:00 committed by Frédéric Guillot
parent ae8e5c4dbc
commit 7accdc4416
19 changed files with 67 additions and 12 deletions

View file

@ -21,6 +21,7 @@ type SettingsForm struct {
Timezone string
EntryDirection string
KeyboardShortcuts bool
CustomCSS string
}
// Merge updates the fields of the given user.
@ -31,6 +32,7 @@ func (s *SettingsForm) Merge(user *model.User) *model.User {
user.Timezone = s.Timezone
user.EntryDirection = s.EntryDirection
user.KeyboardShortcuts = s.KeyboardShortcuts
user.Extra["custom_css"] = s.CustomCSS
if s.Password != "" {
user.Password = s.Password
@ -74,5 +76,6 @@ func NewSettingsForm(r *http.Request) *SettingsForm {
Timezone: r.FormValue("timezone"),
EntryDirection: r.FormValue("entry_direction"),
KeyboardShortcuts: r.FormValue("keyboard_shortcuts") == "1",
CustomCSS: r.FormValue("custom_css"),
}
}