]> source.dussan.org Git - gitea.git/commit
Inline manifest.json (#14038)
authorsilverwind <me@silverwind.io>
Tue, 22 Dec 2020 11:13:50 +0000 (12:13 +0100)
committerGitHub <noreply@github.com>
Tue, 22 Dec 2020 11:13:50 +0000 (19:13 +0800)
commit3a21f8a9865d1112d1b847fb20710e6b735174ec
treea0dd55fa92457fec77dabc6d3e83311ec3af8bb9
parentcd607b5f98ccf66acd99a47309a3411a8e5c8993
Inline manifest.json (#14038)

* Inline manifest.json

Improve performance by eliminating this separate request and just inline
this small JSON in HTML directly as a data uri.

Also update previously static app name scripts to use AppName.

I've confirmed this as working via "Add to Homescreen" feature which
offered to save the shortcut under the new app name.

* prerender manifest data on startup

* move to settings

* restore setting.AppStartTime and use it on admin page

* use double quotes because template.URL escapes everything

* fix lint

* move variable to global context variable

* delete template file

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: zeripath <art27@cantab.net>
modules/context/context.go
modules/setting/setting.go
routers/admin/admin.go
routers/routes/macaron.go
templates/base/head.tmpl
templates/pwa/manifest_json.tmpl [deleted file]