added comp_systems and modular instances frontend
This commit is contained in:
70
src/Pages/TaskPage/TaskPage.tsx
Normal file
70
src/Pages/TaskPage/TaskPage.tsx
Normal file
@@ -0,0 +1,70 @@
|
||||
import { Helmet } from "react-helmet";
|
||||
import { IconCancel, IconPlus, IconSettings } from "@tabler/icons-react";
|
||||
import { useParams } from "react-router";
|
||||
import CustomButton from "Components/CustomButton/CustomButton";
|
||||
import { IframePlugin } from "Api/PluginLoader/PluginLoader";
|
||||
import { useState } from "react";
|
||||
|
||||
function TaskPage() {
|
||||
const { task_id } = useParams();
|
||||
const [data, setData] = useState<{ text: string }>({ text: "" });
|
||||
return (
|
||||
<>
|
||||
<Helmet>
|
||||
<title>
|
||||
{task_id ? "Task " + task_id + " | QMolSim" : "Error |QmolSim"}
|
||||
</title>
|
||||
<meta
|
||||
name="description"
|
||||
content="See the documentation on how to setup and use the qunatum computational system"
|
||||
/>
|
||||
</Helmet>
|
||||
|
||||
<div className="ExperimentPage">
|
||||
<div
|
||||
style={{
|
||||
display: "flex",
|
||||
flexDirection: "column",
|
||||
gap: "10px",
|
||||
marginBottom: "15px",
|
||||
}}
|
||||
>
|
||||
<div className="experimentButtons">
|
||||
<CustomButton
|
||||
color="accent"
|
||||
onClick={() => {}}
|
||||
icon={<IconPlus />}
|
||||
text="Сохранить"
|
||||
/>
|
||||
<CustomButton
|
||||
color="red"
|
||||
style="outline"
|
||||
onClick={() => {}}
|
||||
icon={<IconCancel />}
|
||||
text="Отменить"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<IframePlugin
|
||||
pluginUrl={
|
||||
window.location.origin +
|
||||
"/" +
|
||||
import.meta.env.VITE_BASE_PATH +
|
||||
"/" +
|
||||
"index.html"
|
||||
}
|
||||
mode="editor"
|
||||
taskData={{
|
||||
id: Number(task_id),
|
||||
name: "Молекула 1",
|
||||
description: "",
|
||||
data: data,
|
||||
}}
|
||||
onUpdate={setData}
|
||||
/>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export default TaskPage;
|
||||
Reference in New Issue
Block a user