diff options
author | Chocobozzz <me@florianbigard.com> | 2019-08-22 17:16:48 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-08-22 17:16:48 +0200 |
commit | 001ed2d40c8d2c8f494f5dc7f91ed62d56df10fd (patch) | |
tree | 9a88235affe49fce4b7ce2df192931cffaec32e9 /client/src/app/shared/confirm | |
parent | d5c8932a601c1854db0a2e399ccaf26e17385f1a (diff) | |
parent | 60c2bc80b82c71bd63bdb1fcf64d4d49491ce5c8 (diff) | |
download | PeerTube-001ed2d40c8d2c8f494f5dc7f91ed62d56df10fd.tar.gz PeerTube-001ed2d40c8d2c8f494f5dc7f91ed62d56df10fd.tar.zst PeerTube-001ed2d40c8d2c8f494f5dc7f91ed62d56df10fd.zip |
Merge branch 'release/1.4.0' into develop
Diffstat (limited to 'client/src/app/shared/confirm')
-rw-r--r-- | client/src/app/shared/confirm/confirm.component.ts | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/client/src/app/shared/confirm/confirm.component.ts b/client/src/app/shared/confirm/confirm.component.ts index 53aed14d7..763454c4f 100644 --- a/client/src/app/shared/confirm/confirm.component.ts +++ b/client/src/app/shared/confirm/confirm.component.ts | |||
@@ -3,6 +3,7 @@ import { ConfirmService } from '@app/core/confirm/confirm.service' | |||
3 | import { I18n } from '@ngx-translate/i18n-polyfill' | 3 | import { I18n } from '@ngx-translate/i18n-polyfill' |
4 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' | 4 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' |
5 | import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref' | 5 | import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref' |
6 | import { POP_STATE_MODAL_DISMISS } from '@app/shared/misc/constants' | ||
6 | 7 | ||
7 | @Component({ | 8 | @Component({ |
8 | selector: 'my-confirm', | 9 | selector: 'my-confirm', |
@@ -63,6 +64,11 @@ export class ConfirmComponent implements OnInit { | |||
63 | 64 | ||
64 | this.openedModal.result | 65 | this.openedModal.result |
65 | .then(() => this.confirmService.confirmResponse.next(true)) | 66 | .then(() => this.confirmService.confirmResponse.next(true)) |
66 | .catch(() => this.confirmService.confirmResponse.next(false)) | 67 | .catch((reason: string) => { |
68 | // If the reason was that the user used the back button, we don't care about the confirm dialog result | ||
69 | if (!reason || reason !== POP_STATE_MODAL_DISMISS) { | ||
70 | this.confirmService.confirmResponse.next(false) | ||
71 | } | ||
72 | }) | ||
67 | } | 73 | } |
68 | } | 74 | } |