Skip to content

Commit

Permalink
fix(webui): better add to home screen support
Browse files Browse the repository at this point in the history
  • Loading branch information
Kussie committed Aug 6, 2021
1 parent 72b650a commit 43733fb
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 2 deletions.
1 change: 1 addition & 0 deletions komga-webui/public/index.html
Expand Up @@ -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 + "'"})]*/ '/'
Expand Down
30 changes: 30 additions & 0 deletions komga-webui/public/manifest.json
@@ -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"
}]
}
Expand Up @@ -97,6 +97,7 @@ class SecurityConfiguration(
"/apple-touch-icon-180x180.png",
"/android-chrome-192x192.png",
"/android-chrome-512x512.png",
"/manifest.json",
"/",
"/index.html"
)
Expand Down
Expand Up @@ -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",
Expand All @@ -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())

Expand Down

0 comments on commit 43733fb

Please sign in to comment.