From a97a17ba97b151e0d2e504ea6bc3523fac2f801b Mon Sep 17 00:00:00 2001 From: HyunjunA <39776968+HyunjunA@users.noreply.github.com> Date: Tue, 28 Nov 2023 12:10:48 -0800 Subject: [PATCH] Update aliroed intropage (#639) * working on sidemenu * replace Aliro with AliroEd. Update footer text "Developed by the Center for AI Research and Education (CAIRE) in the Department of Computational Biomedicine at Cedars-Sinai Medical Center in Los Angeles, California, USA." * fixed typo. updated the broken download link. --- .../components/AlgorithmOptions/index.jsx | 43 +++++++--- lab/webapp/src/components/ChatGPT/SideMenu.js | 3 + .../Datasets/components/DatasetCard/index.jsx | 81 +++---------------- raspberrypi/intropage/index.html | 26 +----- raspberrypi/intropage/infAndDownloadpage.html | 13 ++- raspberrypi/intropage/int_ml_01.html | 4 +- raspberrypi/intropage/int_ml_02.html | 10 +-- .../intropage/int_ml_03_decision_tree.html | 4 +- 8 files changed, 66 insertions(+), 118 deletions(-) diff --git a/lab/webapp/src/components/Builder/components/AlgorithmOptions/index.jsx b/lab/webapp/src/components/Builder/components/AlgorithmOptions/index.jsx index a89278a9d..598a017e1 100644 --- a/lab/webapp/src/components/Builder/components/AlgorithmOptions/index.jsx +++ b/lab/webapp/src/components/Builder/components/AlgorithmOptions/index.jsx @@ -49,16 +49,29 @@ function AlgorithmOptions({ function openTrueOrFalse_algorithm_popup() { if (localStorage.getItem("algorithm-popup") == "true") { - // if (document.getElementById("aiTooglePopup")!==null){ - // document.getElementById("aiTooglePopup").style.cssText = "display: block !important"; - // } - return false; } else { return true; } } + // Function to determine the OS type + function getOsType() { + const userAgent = navigator.userAgent.toLowerCase(); + + if (userAgent.includes("win")) return "Windows"; + if (userAgent.includes("mac")) return "macOS"; + if (userAgent.includes("linux")) { + // Check user agent for Raspberry Pi OS identification + if (userAgent.includes("raspberry")) return "Raspberry Pi OS"; + return "Linux"; + } + if (userAgent.includes("iphone") || platform.includes("ipad")) return "iOS"; + if (userAgent.includes("android")) return "Android"; + + return "Unknown OS"; + } + return ( @@ -99,14 +112,20 @@ function AlgorithmOptions({ content={

{algorithm.description}

- {algorithm.url && ( - - - Read more here{" "} - - - - )} + {algorithm.url && + getOsType() !== "Raspberry Pi OS" && ( + // getOsType() === "rasp" && ( + + + Read more here{" "} + + + + )}
} trigger={ diff --git a/lab/webapp/src/components/ChatGPT/SideMenu.js b/lab/webapp/src/components/ChatGPT/SideMenu.js index 407cf6525..2c071fedb 100644 --- a/lab/webapp/src/components/ChatGPT/SideMenu.js +++ b/lab/webapp/src/components/ChatGPT/SideMenu.js @@ -4,6 +4,8 @@ import { ThemeContext } from "./context/ThemeContext"; import { AllContext } from "./context/AllContext"; +import { Icon } from "semantic-ui-react"; + export default function SideMenu() { const { currentModel, @@ -237,6 +239,7 @@ export default function SideMenu() { .slice(3) .forEach((node) => { node.childNodes[1].style.display = "none"; + // node.childNodes[1].innerHTML = "🗑️"; }); } diff --git a/lab/webapp/src/components/Datasets/components/DatasetCard/index.jsx b/lab/webapp/src/components/Datasets/components/DatasetCard/index.jsx index dcc322fcd..3b5c84271 100644 --- a/lab/webapp/src/components/Datasets/components/DatasetCard/index.jsx +++ b/lab/webapp/src/components/Datasets/components/DatasetCard/index.jsx @@ -34,6 +34,7 @@ import * as actions from "data/datasets/dataset/actions"; import DatasetActions from "./components/DatasetActions"; import BestResult from "./components/BestResult"; import ExperimentStatus from "./components/ExperimentStatus"; + import { Grid, Segment, @@ -41,6 +42,7 @@ import { Button, Popup, Message, + Icon, } from "semantic-ui-react"; import { formatDataset, formatDatasetOuter } from "../../../../utils/formatter"; @@ -55,13 +57,6 @@ const DatasetCard = ({ dataset, recommender, toggleAI }) => { icon_type = "line graph"; } - // const [showGrid, setShowGrid] = useState(false); - - // const handleGridClick = () => { - // console.log("handleGridClick"); - // setShowGrid(false); - // }; - function clickDatasetCardDelButton(e) { let parent = e.target.closest(".dataset-card"); // console.log(parent); @@ -278,11 +273,12 @@ const DatasetCard = ({ dataset, recommender, toggleAI }) => { - 🗑 + {/* use trash icon from sementic ui */} + @@ -435,11 +431,11 @@ const DatasetCard = ({ dataset, recommender, toggleAI }) => { - 🗑 + {
); } - - // return ( - // - - // - // - // } - // /> - // - // - // - // - - // - // - //