mirror of
https://github.com/miniflux/v2.git
synced 2025-08-26 18:21:01 +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
|
@ -44,12 +44,21 @@ func (h *handler) showWebManifest(w http.ResponseWriter, r *http.Request) {
|
|||
BackgroundColor string `json:"background_color"`
|
||||
}
|
||||
|
||||
displayMode := "standalone"
|
||||
if request.IsAuthenticated(r) {
|
||||
user, err := h.store.UserByID(request.UserID(r))
|
||||
if err != nil {
|
||||
json.ServerError(w, r, err)
|
||||
return
|
||||
}
|
||||
displayMode = user.DisplayMode
|
||||
}
|
||||
themeColor := model.ThemeColor(request.UserTheme(r))
|
||||
manifest := &webManifest{
|
||||
Name: "Miniflux",
|
||||
ShortName: "Miniflux",
|
||||
Description: "Minimalist Feed Reader",
|
||||
Display: "standalone",
|
||||
Display: displayMode,
|
||||
StartURL: route.Path(h.router, "unread"),
|
||||
ThemeColor: themeColor,
|
||||
BackgroundColor: themeColor,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue