-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into DAP-986-consumer
- Loading branch information
Showing
14 changed files
with
255 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,76 +1,76 @@ | ||
{ | ||
"name": "dats", | ||
"version": "0.0.0", | ||
"description": "Digital Archives Transfer Service", | ||
"author": "CITZ IMB/CIRMO", | ||
"main": "./out/main/index.js", | ||
"type": "module", | ||
"build": { | ||
"extraFiles": [ | ||
{ | ||
"from": "out/cjs-workers/copyWorker.cjs", | ||
"to": "resources/copyWorker.cjs" | ||
}, | ||
{ | ||
"from": "out/cjs-workers/metadataWorker.cjs", | ||
"to": "resources/metadataWorker.cjs" | ||
} | ||
], | ||
"publish": [ | ||
{ | ||
"provider": "github", | ||
"owner": "bcgov", | ||
"repo": "citz-grs-dats" | ||
} | ||
], | ||
"productName": "DATS" | ||
}, | ||
"scripts": { | ||
"typecheck:node": "tsc --noEmit -p tsconfig.node.json --composite false", | ||
"typecheck:web": "tsc --noEmit -p tsconfig.web.json --composite false", | ||
"typecheck": "npm run typecheck:node && npm run typecheck:web", | ||
"dev": "electron-vite dev", | ||
"build": "npm run typecheck && electron-vite build && npm run build:workers", | ||
"build:workers": "vite build --config es.workers.vite.config.ts && vite build --config cjs.workers.vite.config.ts", | ||
"postinstall": "electron-builder install-app-deps", | ||
"build:unpack": "npm run build && electron-builder --dir", | ||
"build:win": "npm run build && electron-builder --win", | ||
"build:mac": "electron-vite build && electron-builder --mac", | ||
"build:linux": "electron-vite build && electron-builder --linux", | ||
"bump:patch": "node bump-version patch", | ||
"bump:minor": "node bump-version minor", | ||
"bump:major": "node bump-version major" | ||
}, | ||
"dependencies": { | ||
"@bcgov/bc-sans": "2.1.0", | ||
"@bcgov/citz-imb-sso-js-core": "1.0.0", | ||
"@bcgov/design-system-react-components": "0.4.0", | ||
"@electron-toolkit/preload": "3.0.1", | ||
"@electron-toolkit/utils": "3.0.0", | ||
"electron-cookies": "1.1.0", | ||
"electron-updater": "6.3.9", | ||
"@emotion/react": "11.13.3", | ||
"@emotion/styled": "11.13.0", | ||
"@mui/icons-material": "6.1.6", | ||
"@mui/material": "6.1.6", | ||
"@mui/x-data-grid": "7.22.1", | ||
"@mui/x-date-pickers": "7.22.2", | ||
"dayjs": "1.11.13", | ||
"react-router-dom": "6.27.0" | ||
}, | ||
"devDependencies": { | ||
"@biomejs/biome": "1.9.3", | ||
"@electron-toolkit/tsconfig": "1.0.1", | ||
"@types/node": "20.14.8", | ||
"@types/react": "18.3.3", | ||
"@types/react-dom": "18.3.0", | ||
"@vitejs/plugin-react": "4.3.1", | ||
"electron": "31.0.2", | ||
"electron-builder": "24.13.3", | ||
"electron-vite": "2.3.0", | ||
"react": "18.3.1", | ||
"react-dom": "18.3.1", | ||
"typescript": "5.5.2", | ||
"vite": "5.3.1" | ||
} | ||
"name": "dats", | ||
"version": "0.0.1", | ||
"description": "Digital Archives Transfer Service", | ||
"author": "CITZ IMB/CIRMO", | ||
"main": "./out/main/index.js", | ||
"type": "module", | ||
"build": { | ||
"extraFiles": [ | ||
{ | ||
"from": "out/cjs-workers/copyWorker.cjs", | ||
"to": "resources/copyWorker.cjs" | ||
}, | ||
{ | ||
"from": "out/cjs-workers/metadataWorker.cjs", | ||
"to": "resources/metadataWorker.cjs" | ||
} | ||
], | ||
"publish": [ | ||
{ | ||
"provider": "github", | ||
"owner": "bcgov", | ||
"repo": "citz-grs-dats" | ||
} | ||
], | ||
"productName": "DATS" | ||
}, | ||
"scripts": { | ||
"typecheck:node": "tsc --noEmit -p tsconfig.node.json --composite false", | ||
"typecheck:web": "tsc --noEmit -p tsconfig.web.json --composite false", | ||
"typecheck": "npm run typecheck:node && npm run typecheck:web", | ||
"dev": "electron-vite dev", | ||
"build": "npm run typecheck && electron-vite build && npm run build:workers", | ||
"build:workers": "vite build --config es.workers.vite.config.ts && vite build --config cjs.workers.vite.config.ts", | ||
"postinstall": "electron-builder install-app-deps", | ||
"build:unpack": "npm run build && electron-builder --dir", | ||
"build:win": "npm run build && electron-builder --win", | ||
"build:mac": "electron-vite build && electron-builder --mac", | ||
"build:linux": "electron-vite build && electron-builder --linux", | ||
"bump:patch": "node bump-version patch", | ||
"bump:minor": "node bump-version minor", | ||
"bump:major": "node bump-version major" | ||
}, | ||
"dependencies": { | ||
"@bcgov/bc-sans": "2.1.0", | ||
"@bcgov/citz-imb-sso-js-core": "1.0.0", | ||
"@bcgov/design-system-react-components": "0.4.0", | ||
"@electron-toolkit/preload": "3.0.1", | ||
"@electron-toolkit/utils": "3.0.0", | ||
"electron-cookies": "1.1.0", | ||
"electron-updater": "6.3.9", | ||
"@emotion/react": "11.13.3", | ||
"@emotion/styled": "11.13.0", | ||
"@mui/icons-material": "6.1.6", | ||
"@mui/material": "6.1.6", | ||
"@mui/x-data-grid": "7.22.1", | ||
"@mui/x-date-pickers": "7.22.2", | ||
"dayjs": "1.11.13", | ||
"react-router-dom": "6.27.0" | ||
}, | ||
"devDependencies": { | ||
"@biomejs/biome": "1.9.3", | ||
"@electron-toolkit/tsconfig": "1.0.1", | ||
"@types/node": "20.14.8", | ||
"@types/react": "18.3.3", | ||
"@types/react-dom": "18.3.0", | ||
"@vitejs/plugin-react": "4.3.1", | ||
"electron": "31.0.2", | ||
"electron-builder": "24.13.3", | ||
"electron-vite": "2.3.0", | ||
"react": "18.3.1", | ||
"react-dom": "18.3.1", | ||
"typescript": "5.5.2", | ||
"vite": "5.3.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export * from "./copyFolderAndMetadata"; | ||
export * from "./getFolderMetadata"; | ||
export * from "./selectDirectory"; |
23 changes: 23 additions & 0 deletions
23
desktop/src/main/fileProcessing/actions/selectDirectory.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { dialog, type BrowserWindow } from "electron"; | ||
|
||
let selectedDir: string[] | undefined; | ||
let dirPathArray: string[]; | ||
|
||
/** | ||
* Opens a (modal) dialog window off the main window for a user to select a directory. | ||
* | ||
* @param win - the main process window. | ||
* @returns A string[] if a directory is selected or undefined if the dialog is closed with no selection. | ||
*/ | ||
export const selectDirectory = (win: BrowserWindow): string[] => { | ||
// open a dialog and allow a user to select multiple folders | ||
selectedDir = dialog.showOpenDialogSync(win, { | ||
properties: ["openDirectory", "multiSelections"], | ||
}); | ||
|
||
// if selectedDir is undefined we have no selected path so return an empty array | ||
// otherwise return the array of selected paths | ||
dirPathArray = selectedDir ?? [""]; | ||
|
||
return dirPathArray; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
desktop/src/renderer/src/components/file-list/ContinueButton.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { Button } from "@bcgov/design-system-react-components"; | ||
|
||
export const ContinueButton = (): JSX.Element => { | ||
const handleClick = async () => { | ||
console.log("TODO: THIS"); | ||
}; | ||
|
||
return ( | ||
<Button | ||
variant="primary" | ||
style={{ justifyContent: "center", width: "15%" }} | ||
onPress={handleClick} | ||
> | ||
Continue | ||
</Button> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
desktop/src/renderer/src/components/file-list/SelectFolderButton.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { useState } from "react"; | ||
import { Button } from "@bcgov/design-system-react-components"; | ||
|
||
export const SelectFolderButton = ({ onRowChange }): JSX.Element => { | ||
const [api] = useState(window.api); // preload scripts | ||
|
||
const handleClick = async () => { | ||
const result = await api.selectDirectory(); | ||
|
||
onRowChange(result); | ||
return result; | ||
}; | ||
|
||
return ( | ||
<Button | ||
variant="primary" | ||
style={{ justifyContent: "center", width: "15%" }} | ||
onPress={handleClick} | ||
> | ||
Select Folder(s) | ||
</Button> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
export * from "./FolderDisplayGrid"; | ||
export * from "./SelectFolderButton"; | ||
export * from "./ContinueButton"; |
Oops, something went wrong.