mirror of
https://github.com/miniflux/v2.git
synced 2025-08-01 17:38:37 +00:00
Make web app display mode configurable
The change is visible after reinstalling the web app. It's not compatible with all browsers. See https://developer.mozilla.org/en-US/docs/Web/Manifest/display
This commit is contained in:
parent
053b1d0f8d
commit
0d935a863f
23 changed files with 182 additions and 12 deletions
|
@ -28,6 +28,7 @@ type User struct {
|
|||
ShowReadingTime bool `json:"show_reading_time"`
|
||||
EntrySwipe bool `json:"entry_swipe"`
|
||||
LastLoginAt *time.Time `json:"last_login_at"`
|
||||
DisplayMode string `json:"display_mode"`
|
||||
}
|
||||
|
||||
// UserCreationRequest represents the request to create a user.
|
||||
|
@ -55,6 +56,7 @@ type UserModificationRequest struct {
|
|||
KeyboardShortcuts *bool `json:"keyboard_shortcuts"`
|
||||
ShowReadingTime *bool `json:"show_reading_time"`
|
||||
EntrySwipe *bool `json:"entry_swipe"`
|
||||
DisplayMode *string `json:"display_mode"`
|
||||
}
|
||||
|
||||
// Patch updates the User object with the modification request.
|
||||
|
@ -114,6 +116,10 @@ func (u *UserModificationRequest) Patch(user *User) {
|
|||
if u.EntrySwipe != nil {
|
||||
user.EntrySwipe = *u.EntrySwipe
|
||||
}
|
||||
|
||||
if u.DisplayMode != nil {
|
||||
user.DisplayMode = *u.DisplayMode
|
||||
}
|
||||
}
|
||||
|
||||
// UseTimezone converts last login date to the given timezone.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue