Skip to content

Commit

Permalink
pwa test (#152)
Browse files Browse the repository at this point in the history
* pwa test

* update images

* update images
  • Loading branch information
notV4l authored Sep 19, 2023
1 parent cfcf64b commit abdf954
Show file tree
Hide file tree
Showing 12 changed files with 2,041 additions and 30 deletions.
5 changes: 5 additions & 0 deletions web/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,8 @@ yarn-error.log*
# typescript
*.tsbuildinfo
next-env.d.ts

#pwa
/public/sw.js
/public/sw.js.map
/public/workbox-*
10 changes: 9 additions & 1 deletion web/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,12 @@ const nextConfig = {
},
};

module.exports = nextConfig;

const withPWA = require("next-pwa");

module.exports = withPWA({
dest: "public",
register: true,
skipWaiting: true,
// disable: process.env.NODE_ENV === 'development'
})(nextConfig);
1 change: 1 addition & 0 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"howler": "^2.2.3",
"js-cookie": "^3.0.5",
"next": "13.2.4",
"next-pwa": "^5.6.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-query": "^3.39.2",
Expand Down
Binary file added web/public/android-chrome-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web/public/android-chrome-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web/public/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web/public/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web/public/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web/public/favicon.ico
Binary file not shown.
21 changes: 21 additions & 0 deletions web/public/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"theme_color": "#11ED83",
"background_color": "#172217",
"display": "fullscreen",
"scope": "/",
"start_url": "/",
"name": "RollYourOwn",
"short_name": "RYO",
"icons": [
{
"src": "/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
]
}
13 changes: 12 additions & 1 deletion web/src/pages/_document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,18 @@ import { Html, Head, Main, NextScript } from "next/document";
export default function Document() {
return (
<Html lang="en">
<Head />
<Head>
{/* icons */}
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
<link rel="apple-touch-icon" href="/icon.png" />

{/* pwa */}
<link rel="manifest" href="/manifest.json" />
<meta name="theme-color" content="#11ED83" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
</Head>
<body>
<Main />
<NextScript />
Expand Down
2,021 changes: 1,993 additions & 28 deletions web/yarn.lock

Large diffs are not rendered by default.

1 comment on commit abdf954

@vercel
Copy link

@vercel vercel bot commented on abdf954 Sep 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

rollyourown – ./

rollyourown-git-main.preview.cartridge.gg
rollyourown.preview.cartridge.gg

Please sign in to comment.