aboutsummaryrefslogtreecommitdiffhomepage
path: root/client
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-08-22 16:13:26 +0200
committerChocobozzz <me@florianbigard.com>2019-08-22 16:13:26 +0200
commit4334445d043252661e62cf97f76b67a2c43e3750 (patch)
tree2d075ae7bc81001fd91e9ebc2caace3e89c258b2 /client
parentf9e387ed05d79d3f88f95056720fb244d04805d2 (diff)
downloadPeerTube-4334445d043252661e62cf97f76b67a2c43e3750.tar.gz
PeerTube-4334445d043252661e62cf97f76b67a2c43e3750.tar.zst
PeerTube-4334445d043252661e62cf97f76b67a2c43e3750.zip
Dismiss modals on pop state
Diffstat (limited to 'client')
-rw-r--r--client/src/app/app.component.ts9
1 files changed, 7 insertions, 2 deletions
diff --git a/client/src/app/app.component.ts b/client/src/app/app.component.ts
index 50c5f5b9b..065bdcaa4 100644
--- a/client/src/app/app.component.ts
+++ b/client/src/app/app.component.ts
@@ -8,9 +8,10 @@ import { debounceTime, filter, map, pairwise, skip } from 'rxjs/operators'
8import { Hotkey, HotkeysService } from 'angular2-hotkeys' 8import { Hotkey, HotkeysService } from 'angular2-hotkeys'
9import { I18n } from '@ngx-translate/i18n-polyfill' 9import { I18n } from '@ngx-translate/i18n-polyfill'
10import { fromEvent } from 'rxjs' 10import { fromEvent } from 'rxjs'
11import { ViewportScroller } from '@angular/common' 11import { PlatformLocation, ViewportScroller } from '@angular/common'
12import { PluginService } from '@app/core/plugins/plugin.service' 12import { PluginService } from '@app/core/plugins/plugin.service'
13import { HooksService } from '@app/core/plugins/hooks.service' 13import { HooksService } from '@app/core/plugins/hooks.service'
14import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
14 15
15@Component({ 16@Component({
16 selector: 'my-app', 17 selector: 'my-app',
@@ -35,7 +36,9 @@ export class AppComponent implements OnInit {
35 private screenService: ScreenService, 36 private screenService: ScreenService,
36 private hotkeysService: HotkeysService, 37 private hotkeysService: HotkeysService,
37 private themeService: ThemeService, 38 private themeService: ThemeService,
38 private hooks: HooksService 39 private hooks: HooksService,
40 private location: PlatformLocation,
41 private modalService: NgbModal
39 ) { } 42 ) { }
40 43
41 get serverVersion () { 44 get serverVersion () {
@@ -90,6 +93,8 @@ export class AppComponent implements OnInit {
90 fromEvent(window, 'resize') 93 fromEvent(window, 'resize')
91 .pipe(debounceTime(200)) 94 .pipe(debounceTime(200))
92 .subscribe(() => this.onResize()) 95 .subscribe(() => this.onResize())
96
97 this.location.onPopState(() => this.modalService.dismissAll())
93 } 98 }
94 99
95 isUserLoggedIn () { 100 isUserLoggedIn () {