mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-09-11 11:50:17 +08:00
Update CreateTask UI
This commit is contained in:
@@ -1,11 +1,12 @@
|
|||||||
import { Box, Stack, Text, useColorModeValue } from "@chakra-ui/react";
|
import { Box, Stack, Text, useColorModeValue } from "@chakra-ui/react";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { Messages } from "src/components/Messages";
|
|
||||||
import { TrackedTextarea } from "src/components/Survey/TrackedTextarea";
|
import { TrackedTextarea } from "src/components/Survey/TrackedTextarea";
|
||||||
import { TwoColumnsWithCards } from "src/components/Survey/TwoColumnsWithCards";
|
import { TwoColumnsWithCards } from "src/components/Survey/TwoColumnsWithCards";
|
||||||
import { TaskSurveyProps } from "src/components/Tasks/Task";
|
import { TaskSurveyProps } from "src/components/Tasks/Task";
|
||||||
|
import { MessageTable } from "../Messages/MessageTable";
|
||||||
|
|
||||||
export const CreateTask = ({ task, taskType, onReplyChanged }: TaskSurveyProps<{ text: string }>) => {
|
export const CreateTask = ({ task, taskType, onReplyChanged }: TaskSurveyProps<{ text: string }>) => {
|
||||||
|
const cardColor = useColorModeValue("gray.100", "gray.700");
|
||||||
const titleColor = useColorModeValue("gray.800", "gray.300");
|
const titleColor = useColorModeValue("gray.800", "gray.300");
|
||||||
const labelColor = useColorModeValue("gray.600", "gray.400");
|
const labelColor = useColorModeValue("gray.600", "gray.400");
|
||||||
|
|
||||||
@@ -30,8 +31,8 @@ export const CreateTask = ({ task, taskType, onReplyChanged }: TaskSurveyProps<{
|
|||||||
</Text>
|
</Text>
|
||||||
</Stack>
|
</Stack>
|
||||||
{task.conversation ? (
|
{task.conversation ? (
|
||||||
<Box mt="4">
|
<Box mt="4" p="6" borderRadius="lg" bg={cardColor}>
|
||||||
<Messages messages={task.conversation.messages} post_id={task.id} />
|
<MessageTable messages={task.conversation.messages} />
|
||||||
</Box>
|
</Box>
|
||||||
) : null}
|
) : null}
|
||||||
</>
|
</>
|
||||||
|
|||||||
Reference in New Issue
Block a user