AykutSarac пре 3 година
родитељ
комит
2ca1e85151
7 измењених фајлова са 791 додато и 18 уклоњено
  1. 6 1
      next.config.js
  2. 1 0
      package.json
  3. BIN
      public/192.png
  4. BIN
      public/512.png
  5. 23 0
      public/manifest.json
  6. 2 0
      src/pages/_document.tsx
  7. 759 17
      yarn.lock

+ 6 - 1
next.config.js

@@ -1,4 +1,4 @@
-const withTM = require("next-transpile-modules")(["reaflow"]);
+const withTM = require("next-transpile-modules")(["reaflow", "next-pwa"]);
 
 const nextConfig = withTM({
   reactStrictMode: true,
@@ -14,6 +14,11 @@ const nextConfig = withTM({
     styledComponents: true,
     swcMinify: true,
   },
+  pwa: {
+    dest: "public",
+    register: true,
+    skipWaiting: true,
+  },
 });
 
 module.exports = nextConfig;

+ 1 - 0
package.json

@@ -44,6 +44,7 @@
     "gh-pages": "^3.2.3",
     "jest": "^28",
     "jest-environment-jsdom": "^28.0.0",
+    "next-pwa": "^5.5.2",
     "prettier": "^2.6.2",
     "ts-node": "^10.7.0",
     "typescript": "4.6.3"



+ 23 - 0
public/manifest.json

@@ -0,0 +1,23 @@
+{
+  "name": "JSON Visio",
+  "short_name": "JSON Visio",
+  "theme_color": "#36393e",
+  "background_color": "#36393e",
+  "display": "standalone",
+  "orientation": "landscape",
+  "scope": "/",
+  "start_url": "/editor",
+  "icons": [
+    {
+      "src": "/192.png",
+      "sizes": "192x192",
+      "type": "image/png"
+    },
+
+    {
+      "src": "/512.png",
+      "sizes": "512x512",
+      "type": "image/png"
+    }
+  ]
+}

+ 2 - 0
src/pages/_document.tsx

@@ -72,6 +72,8 @@ class MyDocument extends Document {
             href="https://fonts.googleapis.com/css2?family=Catamaran:wght@300;400;500;600;700&family=PT+Sans:wght@400;500;700&display=swap"
             rel="stylesheet"
           />
+          <link rel="manifest" href="/manifest.json" />
+          <meta name="theme-color" content="#36393E" />
         </Head>
         <body>
           <Main />

Разлика између датотеке није приказан због своје велике величине
+ 759 - 17
yarn.lock


Неке датотеке нису приказане због велике количине промена