mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 08:58:41 +00:00
Make 2nd file download async to fix (#9711)
# Addresses #9680 - Add 100ms timeout before 2nd key is downloaded from browser - Fix file decoding to correctly download both keys - Fix copy # Checklist for submitter - [x] Manual QA for all new/changed functionality Co-authored-by: Jacob Shandling <jacob@fleetdm.com> Co-authored-by: Roberto Dip <roberto@fleetdm.com>
This commit is contained in:
parent
c2d557588d
commit
429edde09f
1 changed files with 4 additions and 2 deletions
|
|
@ -105,7 +105,7 @@ const Mdm = (): JSX.Element => {
|
|||
|
||||
const privateFilename = "fleet-apple-mdm-bm-private.key";
|
||||
const privateFile = new global.window.File(
|
||||
[keys.decodedPublic],
|
||||
[keys.decodedPrivate],
|
||||
privateFilename,
|
||||
{
|
||||
type: "application/x-pem-file",
|
||||
|
|
@ -113,7 +113,9 @@ const Mdm = (): JSX.Element => {
|
|||
);
|
||||
|
||||
FileSaver.saveAs(publicFile);
|
||||
FileSaver.saveAs(privateFile);
|
||||
setTimeout(() => {
|
||||
FileSaver.saveAs(privateFile);
|
||||
}, 100);
|
||||
} else {
|
||||
renderFlash(
|
||||
"error",
|
||||
|
|
|
|||
Loading…
Reference in a new issue