Add pwa
@ -1,3 +1,20 @@
|
||||
module.exports = {
|
||||
reactStrictMode: true,
|
||||
}
|
||||
const withPWA = require("next-pwa");
|
||||
const runtimeCaching = require("next-pwa/cache");
|
||||
|
||||
const { PHASE_DEVELOPMENT_SERVER } = require("next/constants");
|
||||
|
||||
module.exports = (phase, { defaultConfig }) => {
|
||||
if (phase === PHASE_DEVELOPMENT_SERVER) {
|
||||
return {
|
||||
reactStrictMode: true,
|
||||
};
|
||||
}
|
||||
|
||||
return withPWA({
|
||||
reactStrictMode: true,
|
||||
pwa: {
|
||||
dest: "public",
|
||||
runtimeCaching,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
@ -10,6 +10,7 @@
|
||||
"dependencies": {
|
||||
"@microsoft/signalr": "^6.0.0",
|
||||
"next": "12.0.3",
|
||||
"next-pwa": "^5.4.0",
|
||||
"react": "17.0.2",
|
||||
"react-dom": "17.0.2",
|
||||
"tailwindcss": "^2.2.19"
|
||||
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
BIN
src/client/public/icons/icon-128x128.png
Normal file
After Width: | Height: | Size: 9.1 KiB |
BIN
src/client/public/icons/icon-144x144.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
src/client/public/icons/icon-152x152.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
src/client/public/icons/icon-16x16.png
Normal file
After Width: | Height: | Size: 761 B |
BIN
src/client/public/icons/icon-192x192.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
src/client/public/icons/icon-32x32.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
src/client/public/icons/icon-384x384.png
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
src/client/public/icons/icon-512x512.png
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
src/client/public/icons/icon-72x72.png
Normal file
After Width: | Height: | Size: 5.0 KiB |
BIN
src/client/public/icons/icon-96x96.png
Normal file
After Width: | Height: | Size: 6.7 KiB |
53
src/client/public/manifest.json
Normal file
@ -0,0 +1,53 @@
|
||||
{
|
||||
"name": "Todo",
|
||||
"short_name": "Todo",
|
||||
"theme_color": "#e5a00d",
|
||||
"background_color": "#282A2D",
|
||||
"display": "fullscreen",
|
||||
"orientation": "portrait",
|
||||
"scope": "/",
|
||||
"start_url": "/",
|
||||
"icons": [
|
||||
{
|
||||
"src": "icons/icon-72x72.png",
|
||||
"sizes": "72x72",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "icons/icon-96x96.png",
|
||||
"sizes": "96x96",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "icons/icon-128x128.png",
|
||||
"sizes": "128x128",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "icons/icon-144x144.png",
|
||||
"sizes": "144x144",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "icons/icon-152x152.png",
|
||||
"sizes": "152x152",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "icons/icon-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "icons/icon-384x384.png",
|
||||
"sizes": "384x384",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "icons/icon-512x512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png"
|
||||
}
|
||||
],
|
||||
"splash_pages": null
|
||||
}
|
1
src/client/public/sw.js
Normal file
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
1
src/client/public/workbox-4a677df8.js
Normal file
@ -1,11 +1,42 @@
|
||||
import { AppProps } from "next/app";
|
||||
import Head from "next/head";
|
||||
|
||||
import "@src/styles/tailwind.css";
|
||||
import SocketProvider from "@src/presentation/contexts/SocketContext";
|
||||
|
||||
const MyApp = ({ Component, pageProps }: AppProps) => (
|
||||
<SocketProvider>
|
||||
<Component {...pageProps} />
|
||||
</SocketProvider>
|
||||
<>
|
||||
<Head>
|
||||
<meta charSet="utf-8" />
|
||||
<meta httpEquiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"
|
||||
/>
|
||||
<meta name="description" content="Description" />
|
||||
<meta name="keywords" content="Keywords" />
|
||||
<title>Todo</title>
|
||||
|
||||
<link rel="manifest" href="/manifest.json" />
|
||||
<link
|
||||
href="/icons/favicon-16x16.png"
|
||||
rel="icon"
|
||||
type="image/png"
|
||||
sizes="16x16"
|
||||
/>
|
||||
<link
|
||||
href="/icons/favicon-32x32.png"
|
||||
rel="icon"
|
||||
type="image/png"
|
||||
sizes="32x32"
|
||||
/>
|
||||
<link rel="apple-touch-icon" href="/apple-icon.png"></link>
|
||||
<meta name="theme-color" content="#317EFB" />
|
||||
</Head>
|
||||
|
||||
<SocketProvider>
|
||||
<Component {...pageProps} />
|
||||
</SocketProvider>
|
||||
</>
|
||||
);
|
||||
export default MyApp;
|
||||
|