From 5a69a61d4841a35d7ddcb761a688db8c688314d6 Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Sun, 11 Nov 2018 11:28:29 -0800 Subject: Move UI middlewares and routes to ui package --- ui/static_manifest.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'ui/static_manifest.go') diff --git a/ui/static_manifest.go b/ui/static_manifest.go index 51369a2..50e7e98 100644 --- a/ui/static_manifest.go +++ b/ui/static_manifest.go @@ -13,8 +13,7 @@ import ( "miniflux.app/model" ) -// WebManifest renders web manifest file. -func (c *Controller) WebManifest(w http.ResponseWriter, r *http.Request) { +func (h *handler) showWebManifest(w http.ResponseWriter, r *http.Request) { type webManifestIcon struct { Source string `json:"src"` Sizes string `json:"sizes"` @@ -38,13 +37,13 @@ func (c *Controller) WebManifest(w http.ResponseWriter, r *http.Request) { ShortName: "Miniflux", Description: "Minimalist Feed Reader", Display: "minimal-ui", - StartURL: route.Path(c.router, "unread"), + StartURL: route.Path(h.router, "unread"), ThemeColor: themeColor, BackgroundColor: themeColor, Icons: []webManifestIcon{ - webManifestIcon{Source: route.Path(c.router, "appIcon", "filename", "icon-120.png"), Sizes: "120x120", Type: "image/png"}, - webManifestIcon{Source: route.Path(c.router, "appIcon", "filename", "icon-192.png"), Sizes: "192x192", Type: "image/png"}, - webManifestIcon{Source: route.Path(c.router, "appIcon", "filename", "icon-512.png"), Sizes: "512x512", Type: "image/png"}, + webManifestIcon{Source: route.Path(h.router, "appIcon", "filename", "icon-120.png"), Sizes: "120x120", Type: "image/png"}, + webManifestIcon{Source: route.Path(h.router, "appIcon", "filename", "icon-192.png"), Sizes: "192x192", Type: "image/png"}, + webManifestIcon{Source: route.Path(h.router, "appIcon", "filename", "icon-512.png"), Sizes: "512x512", Type: "image/png"}, }, } -- cgit v1.2.3