]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Fix service worker registration
authorChocobozzz <me@florianbigard.com>
Thu, 22 Feb 2018 10:54:17 +0000 (11:54 +0100)
committerChocobozzz <me@florianbigard.com>
Thu, 22 Feb 2018 10:54:24 +0000 (11:54 +0100)
client/.angular-cli.json
client/src/environments/environment.ts
client/src/index.html
client/src/manifest.json
server/controllers/client.ts

index 3bdc50492866cb5d980b30319c40cfba41bc1c0e..643e1b319884e7db1ef06c7a08c4daff30d4a3ea 100644 (file)
           "output": "./client/assets/images",
           "allowOutsideOutDir": false
         },
-                {
-          "glob": "",
-          "input": "./manifest.json",
-          "output": "./manifest.json",
-          "allowOutsideOutDir": false
-        }
+        "./manifest.json"
       ],
       "deployUrl": "client/",
       "index": "index.html",
index 42b8baee8bb3d076de13fff44bb393cc8b73135a..364da6745c9ac1d1a1e55ac135c0f11923ad3d97 100644 (file)
@@ -1,4 +1,3 @@
-// The file contents for the current environment will overwrite these during build.
 // The build system defaults to the dev environment which uses `environment.ts`, but if you do
 // `ng build --env=prod` then `environment.prod.ts` will be used instead.
 // The list of which env maps to which file can be found in `.angular-cli.json`.
index 8ff89f6a46d37a508ab61b38e602303cd8d92d7e..a824a39e2b8b89a1cb41eb293ffa21687093d4da 100644 (file)
@@ -7,6 +7,8 @@
     <meta name="viewport" content="width=device-width, initial-scale=1">
     <meta name="description" content="PeerTube, a decentralized video streaming platform using P2P (BitTorrent) directly in the web browser" />
 
+    <meta name="theme-color" content="#fff" />
+
     <!-- Web Manifest file -->
     <link rel="manifest" href="/manifest.json">
 
index 53cfa40c59d2e2aaa543bb54938fd4810590d8bc..707efb973023b81a0a1f5a54ef7a1ba1ad2f2cf6 100644 (file)
@@ -1,6 +1,6 @@
 {
-  "background_color": "white",
-  "theme_color": "black",
+  "background_color": "#fff",
+  "theme_color": "#fff",
   "description": "A federated video streaming platform using P2P",
   "display": "standalone",
   "orientation": "any",
index f07e421b4795cbe0473dcd11ac796efbd2b6b67a..f5124c55bed6b0b6c61ded93371988c4befbe1fd 100644 (file)
@@ -12,6 +12,7 @@ const clientsRouter = express.Router()
 const distPath = join(root(), 'client', 'dist')
 const assetsImagesPath = join(root(), 'client', 'dist', 'client', 'assets', 'images')
 const manifestPath = join(root(), 'client', 'dist', 'manifest.json')
+const serviceWorkerPath = join(root(), 'client', 'dist', 'ngsw-worker.js')
 const embedPath = join(distPath, 'standalone', 'videos', 'embed.html')
 const indexPath = join(distPath, 'index.html')
 
@@ -27,6 +28,7 @@ clientsRouter.use('/videos/embed', (req: express.Request, res: express.Response,
 
 // Static HTML/CSS/JS client files
 clientsRouter.use('/manifest.json', express.static(manifestPath, { maxAge: STATIC_MAX_AGE }))
+clientsRouter.use('/ngsw-worker.js', express.static(serviceWorkerPath, { maxAge: STATIC_MAX_AGE }))
 clientsRouter.use('/client', express.static(distPath, { maxAge: STATIC_MAX_AGE }))
 clientsRouter.use('/client/assets/images', express.static(assetsImagesPath, { maxAge: STATIC_MAX_AGE }))