fix(webui): better add to home screen support

This commit is contained in:
Ben Kuskopf 2021-08-06 15:49:21 +10:00 committed by GitHub
parent 72b650afde
commit 43733fbec3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 36 additions and 2 deletions

View file

@ -13,6 +13,7 @@
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" th:href="@{/favicon-16x16.png}">
<meta name="msapplication-TileColor" content="#08397f">
<meta name="msapplication-TileImage" th:content="@{/mstile-144x144.png}" content="/mstile-144x144.png">
<link rel="manifest" th:href="@{/manifest.json}" href="/manifest.json">
<script th:inline="javascript">
/*<![CDATA[*/
window.resourceBaseUrl = /*[(<%="$"%>{"'" + baseUrl + "'"})]*/ '/'

View file

@ -0,0 +1,30 @@
{
"name": "Komga",
"short_name": "Komga",
"start_url": ".",
"display": "standalone",
"background_color": "#08397f",
"theme_color": "black",
"description": "Free and open source comics/mangas media server",
"icons": [{
"src": "/favicon-32x32.png",
"sizes": "32x32",
"type": "image/png"
}, {
"src": "/mstile-144x144.png",
"sizes": "144x144",
"type": "image/png"
}, {
"src": "/apple-touch-icon.png",
"sizes": "180x180",
"type": "image/png"
}, {
"src": "/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
}, {
"src": "/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}]
}

View file

@ -97,6 +97,7 @@ class SecurityConfiguration(
"/apple-touch-icon-180x180.png",
"/android-chrome-192x192.png",
"/android-chrome-512x512.png",
"/manifest.json",
"/",
"/index.html"
)

View file

@ -37,7 +37,8 @@ class WebMvcConfiguration : WebMvcConfigurer {
"/apple-touch-icon.png",
"/apple-touch-icon-180x180.png",
"/android-chrome-192x192.png",
"/android-chrome-512x512.png"
"/android-chrome-512x512.png",
"/manifest.json"
)
.addResourceLocations(
"classpath:public/index.html",
@ -48,7 +49,8 @@ class WebMvcConfiguration : WebMvcConfigurer {
"classpath:public/apple-touch-icon.png",
"classpath:public/apple-touch-icon-180x180.png",
"classpath:public/android-chrome-192x192.png",
"classpath:public/android-chrome-512x512.png"
"classpath:public/android-chrome-512x512.png",
"classpath:public/manifest.json"
)
.setCacheControl(CacheControl.noStore())