From a2ef6f75318fdbc4b4fc544190b63e0222839282 Mon Sep 17 00:00:00 2001 From: Edward Moyse Date: Fri, 18 Aug 2023 14:19:50 +0200 Subject: [PATCH 1/3] Attempt to workaround Issuing loading configuration on Safari #582 This is NOT a clean solution but I do not know what else to try --- packages/phoenix-event-display/src/helpers/file.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/phoenix-event-display/src/helpers/file.ts b/packages/phoenix-event-display/src/helpers/file.ts index 47339645..9f95d18e 100644 --- a/packages/phoenix-event-display/src/helpers/file.ts +++ b/packages/phoenix-event-display/src/helpers/file.ts @@ -43,4 +43,7 @@ export const loadFile = ( reader.readAsText(configFile); }; inputFile.click(); + setTimeout(() => { + console.log('Let us just wait a second'); +}, 1000); }; From bab353898d8a9de2fcb5c7121ce5efb94ed6b7b1 Mon Sep 17 00:00:00 2001 From: Edward Moyse Date: Fri, 18 Aug 2023 14:33:27 +0200 Subject: [PATCH 2/3] Prettier fixes --- packages/phoenix-event-display/src/helpers/file.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/phoenix-event-display/src/helpers/file.ts b/packages/phoenix-event-display/src/helpers/file.ts index 9f95d18e..e4dc5237 100644 --- a/packages/phoenix-event-display/src/helpers/file.ts +++ b/packages/phoenix-event-display/src/helpers/file.ts @@ -7,7 +7,7 @@ export const saveFile = ( data: string, fileName: string, - contentType: string = 'application/json', + contentType: string = 'application/json' ) => { const blob = new Blob([data], { type: contentType }); const tempAnchor = document.createElement('a'); @@ -25,7 +25,7 @@ export const saveFile = ( */ export const loadFile = ( onFileRead: (data: string) => void, - contentType: string = 'application/json', + contentType: string = 'application/json' ) => { // Create a mock input file element and use that to read the file let inputFile = document.createElement('input'); @@ -45,5 +45,5 @@ export const loadFile = ( inputFile.click(); setTimeout(() => { console.log('Let us just wait a second'); -}, 1000); + }, 1000); }; From 43c97956b289f2220352c7c994198ac01ad4b5a3 Mon Sep 17 00:00:00 2001 From: Edward Moyse Date: Fri, 25 Aug 2023 12:28:22 +0200 Subject: [PATCH 3/3] Prettier fixes --- packages/phoenix-event-display/src/helpers/file.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/phoenix-event-display/src/helpers/file.ts b/packages/phoenix-event-display/src/helpers/file.ts index e4dc5237..f02d2f1d 100644 --- a/packages/phoenix-event-display/src/helpers/file.ts +++ b/packages/phoenix-event-display/src/helpers/file.ts @@ -7,7 +7,7 @@ export const saveFile = ( data: string, fileName: string, - contentType: string = 'application/json' + contentType: string = 'application/json', ) => { const blob = new Blob([data], { type: contentType }); const tempAnchor = document.createElement('a'); @@ -25,7 +25,7 @@ export const saveFile = ( */ export const loadFile = ( onFileRead: (data: string) => void, - contentType: string = 'application/json' + contentType: string = 'application/json', ) => { // Create a mock input file element and use that to read the file let inputFile = document.createElement('input');