1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-12 14:23:32 +00:00

sweetalert: move to sweetalert2. (#388)

The styling got adjusted to stay as close as possible to the original sweetalert1 styles.
The only visible change is the button order, it is the same as in the web-vault now (OK - CANCEL instead of CANCEL - OK)

- Removed old postinstall gulp hack
- Added tsconfig type definition for sweetalert2 module typing.
This commit is contained in:
MartB
2020-02-24 15:45:02 +01:00
committed by GitHub
parent b2c67f789e
commit 84af4ee48f
6 changed files with 68 additions and 61 deletions

View File

@@ -29,16 +29,7 @@ function cleanupAotIssue() {
return del(['./node_modules/@types/uglify-js/node_modules/source-map/source-map.d.ts']);
}
// ref: https://github.com/t4t5/sweetalert/issues/890
function fixSweetAlert(cb) {
fs.writeFileSync(paths.node_modules + 'sweetalert/typings/sweetalert.d.ts',
'import swal, { SweetAlert } from "./core";export default swal;export as namespace swal;');
cb();
}
exports.clean = clean;
exports.cleanupAotIssue = cleanupAotIssue;
exports.webfonts = gulp.series(clean, webfonts);
exports['prebuild:renderer'] = gulp.parallel(webfonts, cleanupAotIssue);
exports.fixSweetAlert = fixSweetAlert;
exports.postinstall = fixSweetAlert;
exports['prebuild:renderer'] = gulp.parallel(webfonts, cleanupAotIssue);