From 12139820d136782fbac10c6eda6b06b9d0a8b4de Mon Sep 17 00:00:00 2001 From: Jeffrey Carl Faden Date: Mon, 19 Jun 2023 12:36:55 -0700 Subject: [PATCH] Fix crypto for Electron --- src/client.tsx | 5 +++++ src/styles/globalCss.scss | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/client.tsx b/src/client.tsx index e8b990abe..d1bcc7a46 100644 --- a/src/client.tsx +++ b/src/client.tsx @@ -37,6 +37,11 @@ if (teamSlug && host.indexOf(teamSlug) === 0) { } window.App.state.host = host; +// Hack for Electron (Cypress) +window.crypto.randomUUID = + window.crypto.randomUUID || + (() => Math.round(Math.random() * 10 ** 16).toString()); + if (!subdomain) { // escape domain periods to not appear as regex wildcards const subdomainMatch = window.location.host.match( diff --git a/src/styles/globalCss.scss b/src/styles/globalCss.scss index fd7d05054..380c34fa7 100644 --- a/src/styles/globalCss.scss +++ b/src/styles/globalCss.scss @@ -17,7 +17,8 @@ @import "~bootstrap/scss/buttons"; @import "~bootstrap/scss/dropdown"; @import "~bootstrap/scss/nav"; -@import "~bootstrap/scss/bootstrap"; +@import "~bootstrap/scss/list-group"; +@import "~bootstrap/scss/modal"; @import "~bootstrap/scss/helpers/visually-hidden"; @import "~bootstrap/scss/utilities/api";