Skip to content

Commit

Permalink
Merge pull request #188 from DSACMS/dependabot/npm_and_yarn/frontend/…
Browse files Browse the repository at this point in the history
…electron-33.0.2

Bump electron from 28.0.0 to 33.0.2 in /frontend
  • Loading branch information
natalialuzuriaga authored Oct 31, 2024
2 parents 7c2c3e1 + 44b124b commit eb5917e
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 28 deletions.
46 changes: 23 additions & 23 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"devDependencies": {
"@electron-toolkit/eslint-config-prettier": "^2.0.0",
"@playwright/test": "^1.48.2",
"electron": "^28.0.0",
"electron": "^33.0.2",
"electron-builder": "^24.13.3",
"eslint": "^9.13.0",
"prettier": "^3.3.3"
Expand Down
2 changes: 1 addition & 1 deletion frontend/pages/success.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ <h4 class="usa-alert__heading">Error</h4>
<li>Open your results file in Excel.</li>
<li>Find the records with the <b>same cluster_id</b>,<br><b>which means they could be duplicates.</b></li>
</ol>
<a href="https://github.com/DSACMS/dedupliFHIR/blob/main/research/sept-2024/examples-use-clusterid-to-find-possible-duplicates.md" id="find-duplicates-link" target="_blank">(How to find possible duplicates.)</a>
<a href="https://github.com/DSACMS/dedupliFHIR/blob/main/research/sept-2024/how-to-find-possible-duplicates.md" id="find-duplicates-link" target="_blank">(How to find possible duplicates.)</a>
</p>
</div>
<button type="button" class="usa-button" id="save-file">Save the results file</button>
Expand Down
3 changes: 2 additions & 1 deletion frontend/preload.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const { ipcRenderer, contextBridge } = require("electron");
const { ipcRenderer, contextBridge, webUtils } = require("electron");

contextBridge.exposeInMainWorld("electronAPI", {
pathForFile: (file) => webUtils.getPathForFile(file),
runProgram: (filePath, fileFormat) =>
ipcRenderer.invoke("runProgram", filePath, fileFormat),
saveFile: () => ipcRenderer.invoke("dialog:saveFile"),
Expand Down
6 changes: 4 additions & 2 deletions frontend/renderer/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,16 @@ submitButton.addEventListener("click", () => {
var selectedFile = fileInput.files[0];

if (selectedFile) {
const filePath = window.electronAPI.pathForFile(selectedFile);

console.log("File Name:", selectedFile.name);
console.log("File Path:", selectedFile.path);
console.log("File Path:", filePath);
console.log("File Size:", selectedFile.size, "bytes");
console.log("File Type:", selectedFile.type);

fileInputAlert.style.display = "none";

window.electronAPI.runProgram(selectedFile.path, selectedFormat);
window.electronAPI.runProgram(filePath, selectedFormat);
}
} else {
// Displays error if no file selected
Expand Down

0 comments on commit eb5917e

Please sign in to comment.