diff options
author | Chocobozzz <me@florianbigard.com> | 2018-02-26 11:44:54 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-02-26 11:44:54 +0100 |
commit | fed951557277a6f783c75909f4cbeb21c4159133 (patch) | |
tree | ba5d6b8141116b3d147add4d0b918a13a5aafa4f /client/src | |
parent | 73c695919c6569bfb667c36fc5a6b9b862130a0d (diff) | |
download | PeerTube-fed951557277a6f783c75909f4cbeb21c4159133.tar.gz PeerTube-fed951557277a6f783c75909f4cbeb21c4159133.tar.zst PeerTube-fed951557277a6f783c75909f4cbeb21c4159133.zip |
Disable service worker
Diffstat (limited to 'client/src')
-rw-r--r-- | client/src/app/videos/+video-edit/video-add.component.ts | 2 | ||||
-rw-r--r-- | client/src/main.ts | 15 | ||||
-rw-r--r-- | client/src/polyfills.ts | 2 |
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) { | |||
13 | const bootstrap = () => platformBrowserDynamic() | 13 | const 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 | /* |