Procházet zdrojové kódy

Fixes manifest

main
Steve Ruiz před 4 roky
rodič
revize
84971eea30
6 změnil soubory, kde provedl 10 přidání a 23 odebrání
  1. 1
    1
      components/editor.tsx
  2. 1
    11
      pages/_app.tsx
  3. 3
    8
      pages/_document.tsx
  4. 2
    2
      public/manifest.json
  5. 1
    1
      public/sw.js.map
  6. 2
    0
      state/storage.ts

+ 1
- 1
components/editor.tsx Zobrazit soubor

@@ -27,7 +27,7 @@ export default function Editor() {
27 27
       <StylePanel />
28 28
       <Canvas />
29 29
       <ToolsPanel />
30
-      {/* <StatusBar /> */}
30
+      <StatusBar />
31 31
     </Layout>
32 32
   )
33 33
 }

+ 1
- 11
pages/_app.tsx Zobrazit soubor

@@ -4,17 +4,7 @@ import 'styles/globals.css'
4 4
 
5 5
 function MyApp({ Component, pageProps }: AppProps) {
6 6
   globalStyles()
7
-  return (
8
-    <>
9
-      <head>
10
-        <meta
11
-          name="viewport"
12
-          content="minimum-scale=1, initial-scale=1, width=device-width, shrink-to-fit=no, user-scalable=no, viewport-fit=cover"
13
-        />
14
-      </head>
15
-      <Component {...pageProps} />
16
-    </>
17
-  )
7
+  return <Component {...pageProps} />
18 8
 }
19 9
 
20 10
 export default MyApp

+ 3
- 8
pages/_document.tsx Zobrazit soubor

@@ -28,6 +28,8 @@ class MyDocument extends NextDocument {
28 28
     return (
29 29
       <Html lang="en">
30 30
         <Head>
31
+          <link rel="manifest" href="/manifest.json" />
32
+          <link rel="shortcut icon" href="/favicon.ico" />
31 33
           <meta name="application-name" content="tldraw" />
32 34
           <meta name="apple-mobile-web-app-capable" content="yes" />
33 35
           <meta name="apple-mobile-web-app-status-bar-style" content="black" />
@@ -35,14 +37,7 @@ class MyDocument extends NextDocument {
35 37
           <meta name="description" content="A tiny little drawing app." />
36 38
           <meta name="format-detection" content="telephone=no" />
37 39
           <meta name="mobile-web-app-capable" content="yes" />
38
-          <meta
39
-            name="msapplication-config"
40
-            content="/static/icons/browserconfig.xml"
41
-          />
42
-          <meta name="msapplication-TileColor" content="#3174d7" />
43
-          <meta name="msapplication-tap-highlight" content="no" />
44
-          <meta name="theme-color" content="#ffffff" />
45
-
40
+          <meta name="theme-color" content="#fafafa" />
46 41
           <meta name="twitter:card" content="summary" />
47 42
           <meta name="twitter:url" content="https://tldraw.com" />
48 43
           <meta name="twitter:title" content="tldraw" />

+ 2
- 2
public/manifest.json Zobrazit soubor

@@ -13,8 +13,8 @@
13 13
       "type": "image/png"
14 14
     }
15 15
   ],
16
-  "theme_color": "#FFFFFF",
17
-  "background_color": "#FFFFFF",
16
+  "theme_color": "#fafafa",
17
+  "background_color": "#fafafa",
18 18
   "start_url": "/",
19 19
   "display": "minimal-ui",
20 20
   "orientation": "portrait"

+ 1
- 1
public/sw.js.map Zobrazit soubor

@@ -1 +1 @@
1
-{"version":3,"file":"sw.js","sources":["../../../../../private/var/folders/3w/cj9n4h8j7xl3b82k45v7xw2r0000gn/T/af88887397cd2af68f658e66ccc7f5cc/sw.js"],"sourcesContent":["import {registerRoute as workbox_routing_registerRoute} from '/Users/stephenruiz/Developer/GitHub/code-slate/node_modules/workbox-routing/registerRoute.mjs';\nimport {NetworkFirst as workbox_strategies_NetworkFirst} from '/Users/stephenruiz/Developer/GitHub/code-slate/node_modules/workbox-strategies/NetworkFirst.mjs';\nimport {NetworkOnly as workbox_strategies_NetworkOnly} from '/Users/stephenruiz/Developer/GitHub/code-slate/node_modules/workbox-strategies/NetworkOnly.mjs';\nimport {clientsClaim as workbox_core_clientsClaim} from '/Users/stephenruiz/Developer/GitHub/code-slate/node_modules/workbox-core/clientsClaim.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\nimportScripts(\n  \n);\n\n\n\n\n\n\n\nself.skipWaiting();\n\nworkbox_core_clientsClaim();\n\n\n\nworkbox_routing_registerRoute(\"/\", new workbox_strategies_NetworkFirst({ \"cacheName\":\"start-url\", plugins: [{ cacheWillUpdate: async ({request, response, event, state}) => { if (response && response.type === 'opaqueredirect') { return new Response(response.body, {status: 200, statusText: 'OK', headers: response.headers}); } return response; } }] }), 'GET');\nworkbox_routing_registerRoute(/.*/i, new workbox_strategies_NetworkOnly({ \"cacheName\":\"dev\", plugins: [] }), 'GET');\n\n\n\n\n"],"names":["importScripts","self","skipWaiting","workbox_core_clientsClaim","workbox_routing_registerRoute","workbox_strategies_NetworkFirst","plugins","cacheWillUpdate","request","response","event","state","type","Response","body","status","statusText","headers","workbox_strategies_NetworkOnly"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGoJ;EACpJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAGAA,aAAa;EAUbC,IAAI,CAACC,WAAL;AAEAC,sBAAyB;AAIzBC,uBAA6B,CAAC,GAAD,EAAM,IAAIC,oBAAJ,CAAoC;EAAE,eAAY,WAAd;EAA2BC,EAAAA,OAAO,EAAE,CAAC;EAAEC,IAAAA,eAAe,EAAE,OAAO;EAACC,MAAAA,OAAD;EAAUC,MAAAA,QAAV;EAAoBC,MAAAA,KAApB;EAA2BC,MAAAA;EAA3B,KAAP,KAA6C;EAAE,UAAIF,QAAQ,IAAIA,QAAQ,CAACG,IAAT,KAAkB,gBAAlC,EAAoD;EAAE,eAAO,IAAIC,QAAJ,CAAaJ,QAAQ,CAACK,IAAtB,EAA4B;EAACC,UAAAA,MAAM,EAAE,GAAT;EAAcC,UAAAA,UAAU,EAAE,IAA1B;EAAgCC,UAAAA,OAAO,EAAER,QAAQ,CAACQ;EAAlD,SAA5B,CAAP;EAAiG;;EAAC,aAAOR,QAAP;EAAkB;EAA5O,GAAD;EAApC,CAApC,CAAN,EAAmU,KAAnU,CAA7B;AACAL,uBAA6B,CAAC,KAAD,EAAQ,IAAIc,mBAAJ,CAAmC;EAAE,eAAY,KAAd;EAAqBZ,EAAAA,OAAO,EAAE;EAA9B,CAAnC,CAAR,EAAgF,KAAhF,CAA7B;;"}
1
+{"version":3,"file":"sw.js","sources":["../../../../../private/var/folders/3w/cj9n4h8j7xl3b82k45v7xw2r0000gn/T/c3a33184c37956dfaa3e384f35b959c0/sw.js"],"sourcesContent":["import {registerRoute as workbox_routing_registerRoute} from '/Users/stephenruiz/Developer/GitHub/code-slate/node_modules/workbox-routing/registerRoute.mjs';\nimport {NetworkFirst as workbox_strategies_NetworkFirst} from '/Users/stephenruiz/Developer/GitHub/code-slate/node_modules/workbox-strategies/NetworkFirst.mjs';\nimport {NetworkOnly as workbox_strategies_NetworkOnly} from '/Users/stephenruiz/Developer/GitHub/code-slate/node_modules/workbox-strategies/NetworkOnly.mjs';\nimport {clientsClaim as workbox_core_clientsClaim} from '/Users/stephenruiz/Developer/GitHub/code-slate/node_modules/workbox-core/clientsClaim.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\nimportScripts(\n  \n);\n\n\n\n\n\n\n\nself.skipWaiting();\n\nworkbox_core_clientsClaim();\n\n\n\nworkbox_routing_registerRoute(\"/\", new workbox_strategies_NetworkFirst({ \"cacheName\":\"start-url\", plugins: [{ cacheWillUpdate: async ({request, response, event, state}) => { if (response && response.type === 'opaqueredirect') { return new Response(response.body, {status: 200, statusText: 'OK', headers: response.headers}); } return response; } }] }), 'GET');\nworkbox_routing_registerRoute(/.*/i, new workbox_strategies_NetworkOnly({ \"cacheName\":\"dev\", plugins: [] }), 'GET');\n\n\n\n\n"],"names":["importScripts","self","skipWaiting","workbox_core_clientsClaim","workbox_routing_registerRoute","workbox_strategies_NetworkFirst","plugins","cacheWillUpdate","request","response","event","state","type","Response","body","status","statusText","headers","workbox_strategies_NetworkOnly"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGoJ;EACpJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAGAA,aAAa;EAUbC,IAAI,CAACC,WAAL;AAEAC,sBAAyB;AAIzBC,uBAA6B,CAAC,GAAD,EAAM,IAAIC,oBAAJ,CAAoC;EAAE,eAAY,WAAd;EAA2BC,EAAAA,OAAO,EAAE,CAAC;EAAEC,IAAAA,eAAe,EAAE,OAAO;EAACC,MAAAA,OAAD;EAAUC,MAAAA,QAAV;EAAoBC,MAAAA,KAApB;EAA2BC,MAAAA;EAA3B,KAAP,KAA6C;EAAE,UAAIF,QAAQ,IAAIA,QAAQ,CAACG,IAAT,KAAkB,gBAAlC,EAAoD;EAAE,eAAO,IAAIC,QAAJ,CAAaJ,QAAQ,CAACK,IAAtB,EAA4B;EAACC,UAAAA,MAAM,EAAE,GAAT;EAAcC,UAAAA,UAAU,EAAE,IAA1B;EAAgCC,UAAAA,OAAO,EAAER,QAAQ,CAACQ;EAAlD,SAA5B,CAAP;EAAiG;;EAAC,aAAOR,QAAP;EAAkB;EAA5O,GAAD;EAApC,CAApC,CAAN,EAAmU,KAAnU,CAA7B;AACAL,uBAA6B,CAAC,KAAD,EAAQ,IAAIc,mBAAJ,CAAmC;EAAE,eAAY,KAAd;EAAqBZ,EAAAA,OAAO,EAAE;EAA9B,CAAnC,CAAR,EAAgF,KAAhF,CAA7B;;"}

+ 2
- 0
state/storage.ts Zobrazit soubor

@@ -45,6 +45,8 @@ class Storage {
45 45
 
46 46
     localStorage.setItem(`${CURRENT_VERSION}_lastOpened`, data.document.id)
47 47
 
48
+    console.log('loaded', data.document)
49
+
48 50
     // Let's also save the loaded document to local storage
49 51
     this.saveToLocalStorage(data, data.document.id)
50 52
 

Načítá se…
Zrušit
Uložit