From 0db85e4a8c14f1845a438f8dfb8733cf479c32b1 Mon Sep 17 00:00:00 2001 From: Victor Lin <13424970+victorlin@users.noreply.github.com> Date: Wed, 13 Dec 2023 16:56:02 -0800 Subject: [PATCH] Add file picker to splash page --- auspice_client_customisation/splash.js | 14 ++++++++++++-- auspice_client_customisation/styles.js | 13 +++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/auspice_client_customisation/splash.js b/auspice_client_customisation/splash.js index 4d773ef..32558e2 100644 --- a/auspice_client_customisation/splash.js +++ b/auspice_client_customisation/splash.js @@ -1,6 +1,6 @@ import React from "react"; import { handleDroppedFiles } from "./handleDroppedFiles"; -import { P, Bold, Title, CenterContent, Line, NextstrainTitle, GitHub } from './styles'; +import { P, Bold, Title, UploadBox, UploadButton, CenterContent, Line, NextstrainTitle, GitHub } from './styles'; import pkg from "../package.json"; @@ -25,6 +25,11 @@ const SplashContent = (props) => { handleDroppedFiles(props.dispatch, event.dataTransfer.files); } + function handlePicked(event) { + event.preventDefault(); + handleDroppedFiles(props.dispatch, event.target.files); + } + return (