mirror of https://github.com/usememos/memos.git
feat: add `manifest.json` for pwa (#144)
* chore: update `i18nStore` * feat: add pwa `manifest.json`
This commit is contained in:
parent
87f5ac8b71
commit
dfac877957
|
|
@ -5,10 +5,18 @@
|
||||||
<link rel="icon" href="/logo.png" type="image/*" />
|
<link rel="icon" href="/logo.png" type="image/*" />
|
||||||
<meta name="theme-color" content="#f6f5f4" />
|
<meta name="theme-color" content="#f6f5f4" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
|
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
|
||||||
|
<link rel="manifest" href="/manifest.json" />
|
||||||
<title>Memos</title>
|
<title>Memos</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
<script type="module" src="/src/main.tsx"></script>
|
<script type="module" src="/src/main.tsx"></script>
|
||||||
|
<script>
|
||||||
|
window.addEventListener("load", () => {
|
||||||
|
if ("serviceWorker" in navigator) {
|
||||||
|
navigator.serviceWorker.register("/sw.js");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
{
|
||||||
|
"short_name": "Memos",
|
||||||
|
"name": "Memos",
|
||||||
|
"icons": [
|
||||||
|
{
|
||||||
|
"src": "/logo.png",
|
||||||
|
"type": "image/png",
|
||||||
|
"sizes": "200x200"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"start_url": "/",
|
||||||
|
"background_color": "#f6f5f4",
|
||||||
|
"display": "standalone",
|
||||||
|
"scope": "/",
|
||||||
|
"theme_color": "#f6f5f4",
|
||||||
|
"description": "usememos/memos"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
self.addEventListener("install", (event) => {
|
||||||
|
event.waitUntil((async () => {})());
|
||||||
|
});
|
||||||
|
|
||||||
|
self.addEventListener("activate", (event) => {
|
||||||
|
event.waitUntil((async () => {})());
|
||||||
|
});
|
||||||
|
|
||||||
|
self.addEventListener("fetch", (event) => {});
|
||||||
|
|
||||||
Loading…
Reference in New Issue