From 5951ce9feee7cb22cebcca79e829fc32fb29d6c9 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Tue, 18 Oct 2022 09:22:05 -0500 Subject: add data page --- src/web/src/components/System/Data/index.js | 45 +++++++++++++++++++++++++++++ src/web/src/components/System/System.css | 4 +++ 2 files changed, 49 insertions(+) create mode 100644 src/web/src/components/System/Data/index.js (limited to 'src') diff --git a/src/web/src/components/System/Data/index.js b/src/web/src/components/System/Data/index.js new file mode 100644 index 00000000..a0642c59 --- /dev/null +++ b/src/web/src/components/System/Data/index.js @@ -0,0 +1,45 @@ +import React, { useState } from 'react'; +import { Button, Divider, Header, Icon } from 'semantic-ui-react'; +import { toast } from 'react-toastify'; + +import { clearCompleted } from '../../../lib/transfers'; + +const Data = () => { + const [up, setUp] = useState(false); + const [down, setDown] = useState(false); + + const clear = async ({ direction, setState }) => { + setState(true); + await clearCompleted({ direction }); + setState(false); + toast.success(`Completed ${direction}s cleared!`); + }; + + return ( +
+
Transfer Data
+ +

+ The Uploads and Downloads pages can become unresponsive if too many transfers are displayed. If you're having trouble with either page, try using the buttons below to remove completed transfers. +

+ + +
+ ); +}; + +export default Data; \ No newline at end of file diff --git a/src/web/src/components/System/System.css b/src/web/src/components/System/System.css index a463ab08..dc32d583 100644 --- a/src/web/src/components/System/System.css +++ b/src/web/src/components/System/System.css @@ -67,4 +67,8 @@ .share-scan-detail { margin-top: 10px; font-size: 14px; +} + +.transfer-header { + margin-bottom: -15px !important; } \ No newline at end of file -- cgit v1.2.3