aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--client/src/app/videos/+video-edit/video-add.component.ts2
-rw-r--r--client/src/main.ts15
-rw-r--r--client/src/polyfills.ts2
3 files changed, 13 insertions, 6 deletions
diff --git a/client/src/app/videos/+video-edit/video-add.component.ts b/client/src/app/videos/+video-edit/video-add.component.ts
index 324f26983..4c9dbf1bb 100644
--- a/client/src/app/videos/+video-edit/video-add.component.ts
+++ b/client/src/app/videos/+video-edit/video-add.component.ts
@@ -164,7 +164,7 @@ export class VideoAddComponent extends FormReactive implements OnInit, OnDestroy
164 164
165 const formData = new FormData() 165 const formData = new FormData()
166 formData.append('name', name) 166 formData.append('name', name)
167 // Put the video "private" -> we wait he validates the second step 167 // Put the video "private" -> we are waiting the user validation of the second step
168 formData.append('privacy', VideoPrivacy.PRIVATE.toString()) 168 formData.append('privacy', VideoPrivacy.PRIVATE.toString())
169 formData.append('nsfw', '' + nsfw) 169 formData.append('nsfw', '' + nsfw)
170 formData.append('commentsEnabled', '' + commentsEnabled) 170 formData.append('commentsEnabled', '' + commentsEnabled)
diff --git a/client/src/main.ts b/client/src/main.ts
index 9686ba4b8..4b18d163c 100644
--- a/client/src/main.ts
+++ b/client/src/main.ts
@@ -13,11 +13,18 @@ if (environment.production) {
13const bootstrap = () => platformBrowserDynamic() 13const bootstrap = () => platformBrowserDynamic()
14 .bootstrapModule(AppModule) 14 .bootstrapModule(AppModule)
15 .then(bootstrapModule => { 15 .then(bootstrapModule => {
16 // TODO: Uncomment and remove unregistration when https://github.com/angular/angular/issues/21191 is fixed
16 // TODO: Remove when https://github.com/angular/angular-cli/issues/8779 is fixed? 17 // TODO: Remove when https://github.com/angular/angular-cli/issues/8779 is fixed?
17 if ('serviceWorker' in navigator && environment.production) { 18 // if ('serviceWorker' in navigator && environment.production) {
18 navigator.serviceWorker.register('/ngsw-worker.js') 19 // navigator.serviceWorker.register('/ngsw-worker.js')
19 .catch(err => console.error('Cannot register service worker.', err)) 20 // .catch(err => console.error('Cannot register service worker.', err))
20 } 21 // }
22
23 navigator.serviceWorker.getRegistrations().then(registrations => {
24 for (const registration of registrations) {
25 registration.unregister()
26 }
27 })
21 28
22 return bootstrapModule 29 return bootstrapModule
23 }) 30 })
diff --git a/client/src/polyfills.ts b/client/src/polyfills.ts
index fe44c5e22..12b317101 100644
--- a/client/src/polyfills.ts
+++ b/client/src/polyfills.ts
@@ -61,7 +61,7 @@ import 'core-js/es7/reflect'
61 * user can disable parts of macroTask/DomEvents patch by setting following flags 61 * user can disable parts of macroTask/DomEvents patch by setting following flags
62 */ 62 */
63 63
64(window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame 64// (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
65// (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick 65// (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
66// (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames 66// (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
67/* 67/*