|
1 | | -import { Button, Flex, Tooltip } from "@chakra-ui/react"; |
| 1 | +import { Button, Flex, HStack, Link, Tooltip } from "@chakra-ui/react"; |
2 | 2 | import { useEffect, useRef, useState } from "react"; |
| 3 | +import { BsArrowUpRight } from "react-icons/bs"; |
| 4 | +import { FaPlay } from "react-icons/fa6"; |
3 | 5 | import { getInvalidProblemDto } from "../../api/toolbox/data-model/ProblemDto"; |
4 | 6 | import { toolboxApi } from "../../api/toolbox/ToolboxAPI"; |
5 | 7 | import { StrategyProvider } from "./Graph/MetaSolverStrategyProvider"; |
@@ -32,24 +34,41 @@ export const SolverConfiguration = (props: SolverConfigurationProps) => { |
32 | 34 | return ( |
33 | 35 | <Flex alignSelf="center"> |
34 | 36 | {problemId === null ? ( |
35 | | - <Tooltip label="Unleash the Qubits!" color="white"> |
36 | | - <Button |
37 | | - colorScheme="teal" |
38 | | - size="md" |
39 | | - onClick={() => { |
40 | | - toolboxApi |
41 | | - .postProblem<string>(props.problemTypeId, { |
42 | | - ...getInvalidProblemDto<string>(), |
43 | | - input: props.problemInput, |
44 | | - }) |
45 | | - .then((problem) => { |
46 | | - setProblemId(problem.id); |
47 | | - }); |
48 | | - }} |
49 | | - > |
50 | | - Configure {props.problemTypeName} Solver |
51 | | - </Button> |
52 | | - </Tooltip> |
| 37 | + <HStack> |
| 38 | + <Tooltip label="Interactively configure and solve this problem using a selection of various solvers."> |
| 39 | + <Button |
| 40 | + bg="kitGreen" |
| 41 | + textColor="white" |
| 42 | + size="md" |
| 43 | + gap="5px" |
| 44 | + onClick={() => { |
| 45 | + toolboxApi |
| 46 | + .postProblem<string>(props.problemTypeId, { |
| 47 | + ...getInvalidProblemDto<string>(), |
| 48 | + input: props.problemInput, |
| 49 | + }) |
| 50 | + .then((problem) => { |
| 51 | + setProblemId(problem.id); |
| 52 | + }); |
| 53 | + }} |
| 54 | + > |
| 55 | + <FaPlay /> |
| 56 | + Configure {props.problemTypeName ?? props.problemTypeId} Solver |
| 57 | + </Button> |
| 58 | + </Tooltip> |
| 59 | + |
| 60 | + <Tooltip label="Create and save a strategy what solvers to use."> |
| 61 | + <Link |
| 62 | + href={process.env.NEXT_PUBLIC_MSS_EDITOR_BASE_URL} |
| 63 | + target="_blank" |
| 64 | + > |
| 65 | + <Button bg="kitBlue" textColor="white" size="md" gap="5px"> |
| 66 | + <BsArrowUpRight /> |
| 67 | + Go to Strategy Editor |
| 68 | + </Button> |
| 69 | + </Link> |
| 70 | + </Tooltip> |
| 71 | + </HStack> |
53 | 72 | ) : ( |
54 | 73 | <SolverProvider> |
55 | 74 | <StrategyProvider> |
|
0 commit comments