diff --git a/frontend/src/components/TaskList.tsx b/frontend/src/components/TaskList.tsx index 51bd1e9..9780753 100644 --- a/frontend/src/components/TaskList.tsx +++ b/frontend/src/components/TaskList.tsx @@ -1,21 +1,29 @@ -import React from "react"; +import React, { useState } from "react"; import { useTasks } from "@/services/websocket"; +import { ProgressTask } from "@/services/openapi"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import { faChevronDown } from "@fortawesome/free-solid-svg-icons"; export const TaskList = () => { - const tasks = useTasks(); + const tasks: Array = useTasks(); + + const [visible, setVisible] = useState(true); const maxShownTasks = 5; const shownTasks = tasks.length > maxShownTasks ? tasks.slice(0, maxShownTasks) : tasks; return ( <> {tasks.length > 0 && ( -
-
+
+
setVisible(!visible)}>
Tasks {tasks.length > maxShownTasks && `(${tasks.length})`}
+
+ +
-
+
{shownTasks.map(i => (
diff --git a/frontend/src/components/layout/Layout.tsx b/frontend/src/components/layout/Layout.tsx index 9c131f4..10fbe7e 100644 --- a/frontend/src/components/layout/Layout.tsx +++ b/frontend/src/components/layout/Layout.tsx @@ -33,9 +33,10 @@ export const Layout = ({children}: React.PropsWithChildren) => {
- -
+ + +
{children}