add icon and service worker to allow pwa install

This commit is contained in:
liamcottle
2025-02-13 15:44:46 +13:00
parent 666c1ddf5c
commit c5f5ca7f35
5 changed files with 36 additions and 0 deletions

View File

@@ -1,5 +1,8 @@
<template>
<div class="flex bg-white p-2 border-b h-16">
<div class="my-auto mr-2">
<img src="/icon.png" class="size-12 rounded"/>
</div>
<div class="my-auto mr-auto overflow-hidden">
<div class="font-bold">MeshCore Client</div>
<div class="text-sm truncate">

View File

@@ -1,9 +1,21 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, interactive-widget=resizes-content">
<title>MeshCore Client</title>
<meta name="title" content="MeshCore Client">
<meta name="description" content="A simple, mobile friendly, web based MeshCore client.">
<link rel="icon" type="image/png" href="icon.png"/>
<link rel="manifest" href="/manifest.json">
<!-- Open Graph / Facebook -->
<meta property="og:type" content="website">
<meta property="og:url" content="https://meshcore.liamcottle.net">
<meta property="og:title" content="MeshCore Client">
<meta property="og:description" content="A simple, mobile friendly, web based MeshCore client.">
</head>
<body>
<div id="app" class="bg-gray-100"></div>

BIN
src/public/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

17
src/public/manifest.json Normal file
View File

@@ -0,0 +1,17 @@
{
"name": "MeshCore",
"short_name": "MeshCore",
"description": "A simple, mobile friendly, web based MeshCore client.",
"scope": "/",
"start_url": "/",
"icons": [
{
"src": "icon.png",
"sizes": "512x512",
"type": "image/png"
}
],
"display": "standalone",
"theme_color": "#FFFFFF",
"background_color": "#FFFFFF"
}

View 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
});