Implement source picker selection logic
This commit is contained in:
@@ -229,6 +229,11 @@ export default function App() {
|
|||||||
await addFilesByPath(paths as string[], true);
|
await addFilesByPath(paths as string[], true);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const chooseSourcePicker = (mode: "files" | "folder") => {
|
||||||
|
setSourcePickerOpen(false);
|
||||||
|
void (mode === "files" ? onAddFiles() : onAddFolder());
|
||||||
|
};
|
||||||
|
|
||||||
const onAddWebsite = () => {
|
const onAddWebsite = () => {
|
||||||
const url = window.prompt("Enter a URL (starting with http:// or https://):");
|
const url = window.prompt("Enter a URL (starting with http:// or https://):");
|
||||||
if (!url) return;
|
if (!url) return;
|
||||||
|
|||||||
Reference in New Issue
Block a user