mirror of
https://github.com/bitwarden/web
synced 2025-12-15 15:53:18 +00:00
sweetalert: ported to sweetalert2 and simplified code. (#465)
No styling changes besides making the "primary" button-text bold (aligned with desktop app)
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import * as jq from 'jquery';
|
||||
import * as _swal from 'sweetalert';
|
||||
import { SweetAlert } from 'sweetalert/typings/core';
|
||||
import Swal from 'sweetalert2/src/sweetalert2.js';
|
||||
|
||||
import {
|
||||
BodyOutputType,
|
||||
@@ -53,8 +52,6 @@ import { ConstantsService } from 'jslib/services/constants.service';
|
||||
import { RouterService } from './services/router.service';
|
||||
|
||||
const BroadcasterSubscriptionId = 'AppComponent';
|
||||
// Hack due to Angular 5.2 bug
|
||||
const swal: SweetAlert = _swal as any;
|
||||
const IdleTimeout = 60000 * 10; // 10 minutes
|
||||
|
||||
@Component({
|
||||
@@ -165,7 +162,7 @@ export class AppComponent implements OnDestroy, OnInit {
|
||||
}
|
||||
|
||||
if (document.querySelector('.swal-modal') != null) {
|
||||
swal.close(undefined);
|
||||
Swal.close(undefined);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user