mirror of
https://github.com/liamcottle/reticulum-meshchat.git
synced 2026-12-04 22:00:05 -05:00
add service worker and webmanifest to allow pwa install for android when using termux
This commit is contained in:
parent
a46a94e125
commit
a94ce1ad50
4 changed files with 28 additions and 0 deletions
|
|
@ -5,6 +5,7 @@
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||||
|
<link rel="manifest" href="/manifest.json">
|
||||||
<title>Reticulum MeshChat</title>
|
<title>Reticulum MeshChat</title>
|
||||||
|
|
||||||
<!-- scripts -->
|
<!-- scripts -->
|
||||||
|
|
@ -24,5 +25,11 @@
|
||||||
<body class="bg-gray-100">
|
<body class="bg-gray-100">
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
<script type="module" src="main.js"></script>
|
<script type="module" src="main.js"></script>
|
||||||
|
<script>
|
||||||
|
// install service worker
|
||||||
|
if('serviceWorker' in navigator){
|
||||||
|
navigator.serviceWorker.register('/service-worker.js');
|
||||||
|
}
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
BIN
src/frontend/public/favicons/favicon-512x512.png
Normal file
BIN
src/frontend/public/favicons/favicon-512x512.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
17
src/frontend/public/manifest.json
Normal file
17
src/frontend/public/manifest.json
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
"name": "MeshChat",
|
||||||
|
"short_name": "MeshChat",
|
||||||
|
"description": "A simple mesh network communications app powered by the Reticulum Network Stack.",
|
||||||
|
"scope": "/",
|
||||||
|
"start_url": "/",
|
||||||
|
"icons": [
|
||||||
|
{
|
||||||
|
"src": "/favicons/favicon-512x512.png",
|
||||||
|
"sizes": "512x512",
|
||||||
|
"type": "image/png"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"display": "standalone",
|
||||||
|
"theme_color": "#FFFFFF",
|
||||||
|
"background_color": "#FFFFFF"
|
||||||
|
}
|
||||||
4
src/frontend/public/service-worker.js
Normal file
4
src/frontend/public/service-worker.js
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
self.addEventListener('fetch',function() {
|
||||||
|
// this is required to meet the requirements for an installable pwa
|
||||||
|
// it allows the browser to ask the user if they want to install to their homescreen
|
||||||
|
});
|
||||||
Loading…
Add table
Add a link
Reference in a new issue