Skip to content

Commit

Permalink
Added microscopy image yes click bypass
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobiClark committed Aug 14, 2024
1 parent 709d43a commit 50c973f
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 25 deletions.
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
import {
Text,
Stack,
Group,
Button,
Alert,
Loader,
Center,
List,
Notification,
} from "@mantine/core";
import { IconTool, IconRosetteDiscountCheck, IconCheck } from "@tabler/icons-react";
import { Text, Stack, Group, Button, Alert, List, Notification } from "@mantine/core";
import { IconTool, IconRosetteDiscountCheck } from "@tabler/icons-react";
import FullWidthContainer from "../../containers/FullWidthContainer";
import ExternalLink from "../../buttons/ExternalLink";
import CodeTextDisplay from "../../common/CodeTextDisplay";
import useGlobalStore from "../../../stores/globalStore";

const handleRetryButtonClick = () => {
Expand All @@ -39,7 +28,7 @@ const SkipMicroscopyImageConversionWarningText = (
color="red"
title="Skipping Microsopy Image Conversion"
>
<Text fw={200}>
<Text fw={200} size="sm">
While not recommended, you can skip the Microscopy Image Data and Metadata conversion by
clicking the "Skip Microscopy Image Conversion" button below. By doing so, your microscopy
images will not be converted using MicroFile+ and your images will not be uploaded to
Expand Down Expand Up @@ -70,10 +59,8 @@ const MicrofilePlusInstallationCheckDisplay = () => {
icon={<IconTool />}
style={{ width: "100%" }}
>
<Text mb="sm">
MicroFile+ is currently only available for Windows, so you must either switch to
Windows or skip the Microscopy Image Data and Metadata conversion.
</Text>
MicroFile+ is currently only available for Windows, so you must either switch to Windows
or skip the Microscopy Image Data and Metadata conversion.
{SkipMicroscopyImageConversionWarningText}
<Group justify="center" mt="md">
{SkipMicroscopyImageConversionButton}
Expand All @@ -90,7 +77,7 @@ const MicrofilePlusInstallationCheckDisplay = () => {
icon={<IconTool />}
style={{ width: "100%" }}
>
<Text mb="sm" fw={700}>
<Text mb="sm" fw={600}>
Follow the steps below to install MicroFile+:
</Text>
<List type="ordered">
Expand Down Expand Up @@ -130,10 +117,7 @@ const MicrofilePlusInstallationCheckDisplay = () => {
icon={<IconRosetteDiscountCheck />}
style={{ width: "100%" }}
>
<Text>
SODA will use MicroFile+ to convert Microsocpy Image Data and Metadata to SPARC
Standards.
</Text>
SODA will use MicroFile+ to convert Microsocpy Image Data and Metadata to SPARC Standards.
</Alert>
)}
</FullWidthContainer>
Expand Down
18 changes: 16 additions & 2 deletions src/renderer/src/components/utils/SodaComponentWrapper/index.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import { MantineProvider, createTheme, Stack } from "@mantine/core";
import { MantineProvider, createTheme } from "@mantine/core";

const theme = createTheme({
colors: {
Expand All @@ -10,7 +10,6 @@ const theme = createTheme({
"#13716d",
"#13716d",
"#13716d",

"#13716d",
"#13716d",
"#13716d",
Expand All @@ -25,6 +24,21 @@ const theme = createTheme({
lg: "1.2rem",
xl: "1.4rem",
},
components: {
Alert: {
defaultProps: {
color: "SodaGreen",
title: "SODA Alert",
},
styles(theme) {
return {
title: {
fontSize: "1.1rem",
},
};
},
},
},
});

const SodaComponentWrapper = ({ children }) => {
Expand Down
5 changes: 5 additions & 0 deletions src/renderer/src/scripts/guided-mode/guided-curate-dataset.js
Original file line number Diff line number Diff line change
Expand Up @@ -14040,6 +14040,11 @@ $(".guided--radio-button").on("click", async function () {
}

if (buttonId === "guided-button-dataset-contains-microscopy-images") {
// Pre-add the selected class to the button to prevent the user from being stopped during page skipping
// While the logic below is being executed
document
.getElementById("guided-button-dataset-contains-microscopy-images")
.classList.add("selected");
const req = await client.get("/image_processing/is_microfileplus_installed");
const { status: microFilePlusIsInstalled, platform } = req.data;
const usersPlatformIsMicroFilePlusCompatible = platform === "Windows";
Expand Down

0 comments on commit 50c973f

Please sign in to comment.