mirror of
https://github.com/miniflux/v2.git
synced 2025-08-06 17:41:00 +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
|
@ -73,6 +73,12 @@ func ValidateUserModification(store *storage.Storage, userID int64, changes *mod
|
|||
}
|
||||
}
|
||||
|
||||
if changes.DisplayMode != nil {
|
||||
if err := validateDisplayMode(*changes.DisplayMode); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -124,3 +130,10 @@ func validateEntriesPerPage(entriesPerPage int) *ValidationError {
|
|||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func validateDisplayMode(displayMode string) *ValidationError {
|
||||
if displayMode != "fullscreen" && displayMode != "standalone" && displayMode != "minimal-ui" && displayMode != "browser" {
|
||||
return NewValidationError("error.invalid_display_mode")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue