Improve the json manifest dynamic generation as it was flawed.
This commit is contained in:
parent
b0e42ea848
commit
f0c4788d51
@ -31,24 +31,23 @@
|
|||||||
<script>
|
<script>
|
||||||
window.FileBrowser = JSON.parse(`[{[ .Json ]}]`);
|
window.FileBrowser = JSON.parse(`[{[ .Json ]}]`);
|
||||||
|
|
||||||
var baseFullURL = window.location.protocol + "//" + window.location.hostname + ":" + window.location.port + window.FileBrowser.BaseURL;
|
var fullStaticURL = window.location.origin + "/" + window.FileBrowser.StaticURL;
|
||||||
|
|
||||||
var dynamicManifest = {
|
var dynamicManifest = {
|
||||||
"name": window.FileBrowser.Name || 'File Browser',
|
"name": window.FileBrowser.Name || 'File Browser',
|
||||||
"short_name": window.FileBrowser.Name || 'File Browser',
|
"short_name": window.FileBrowser.Name || 'File Browser',
|
||||||
"icons": [
|
"icons": [
|
||||||
{
|
{
|
||||||
"src": baseFullURL + "/static/img/icons/android-chrome-192x192.png",
|
"src": fullStaticURL + "/img/icons/android-chrome-192x192.png",
|
||||||
"sizes": "192x192",
|
"sizes": "192x192",
|
||||||
"type": "image/png"
|
"type": "image/png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"src": baseFullURL + "/static/img/icons/android-chrome-512x512.png",
|
"src": fullStaticURL + "/img/icons/android-chrome-512x512.png",
|
||||||
"sizes": "512x512",
|
"sizes": "512x512",
|
||||||
"type": "image/png"
|
"type": "image/png"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"start_url": baseFullURL,
|
"start_url": window.location.origin + window.FileBrowser.BaseURL,
|
||||||
"display": "standalone",
|
"display": "standalone",
|
||||||
"background_color": "#ffffff",
|
"background_color": "#ffffff",
|
||||||
"theme_color": "#455a64"
|
"theme_color": "#455a64"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user