|
@@ -4,7 +4,9 @@ import MessageRobotRich from "@/components/chat-message/MessageRobotRich";
|
|
|
import MessageRich from "@/components/chat-message/MessageRich";
|
|
|
import { WelcomeCard, AddSuccessfulTips } from "../asistant-message";
|
|
|
import RoundedLabel from "../rounded-label";
|
|
|
-import IconChange from "@/components/icon/icon-change";
|
|
|
+import IconFilterFeeds from "@/components/icon/IconFilterFeeds";
|
|
|
+import IconFilterBatch from "@/components/icon/IconFilterBatch";
|
|
|
+import IconFilterList from "@/components/icon/IconFilterList";
|
|
|
|
|
|
import IconFIleTxt from "@/components/icon/IconFIleTxt";
|
|
|
import IconFIlePDF from "@/components/icon/IconFIlePDF";
|
|
@@ -16,8 +18,10 @@ import FigureListItem from "@/components/list/figure-list-item";
|
|
|
import Popup from "@/components/popup/popup";
|
|
|
import WemetaSwitch from "@/components/wemeta-switch";
|
|
|
import { useEffect, useState } from "react";
|
|
|
+import ViewStyleChat from "../view-style/ViewStyleChat";
|
|
|
+import RotateLoading from "@/components/rotate-loading";
|
|
|
|
|
|
-type TListStyle = 'chat'|'list'
|
|
|
+type TListStyle = "chat" | "list";
|
|
|
|
|
|
const Index = () => {
|
|
|
const avatarData = {
|
|
@@ -26,15 +30,24 @@ const Index = () => {
|
|
|
};
|
|
|
const [checked, setChecked] = useState(false);
|
|
|
const [showPopup, setShowPopup] = useState(false);
|
|
|
- const [listStyle, setListStyle] = useState<TListStyle>('chat');
|
|
|
+ const [listStyle, setListStyle] = useState<TListStyle>("chat");
|
|
|
|
|
|
const handleListStyleChange = (listStyle: TListStyle) => {
|
|
|
- setListStyle(listStyle)
|
|
|
- }
|
|
|
+ setListStyle(listStyle);
|
|
|
+ };
|
|
|
|
|
|
- useEffect(()=> {
|
|
|
- console.log('hellow')
|
|
|
- }, [])
|
|
|
+ const rightRenderer = () => {
|
|
|
+ return (
|
|
|
+ <View className="flex items-center gap-4">
|
|
|
+ <RotateLoading />
|
|
|
+ <View className="text-primary text-12">解析中</View>
|
|
|
+ </View>
|
|
|
+ );
|
|
|
+ };
|
|
|
+
|
|
|
+ useEffect(() => {
|
|
|
+ console.log("hellow");
|
|
|
+ }, []);
|
|
|
|
|
|
return (
|
|
|
<>
|
|
@@ -45,106 +58,101 @@ const Index = () => {
|
|
|
<View className="flex-1 text-12 leading-20 text-gray-45">
|
|
|
共102个文件
|
|
|
</View>
|
|
|
- <View className="flex items-center" onClick={()=> setShowPopup(true)}>
|
|
|
- <RoundedLabel text="信息流" icon={IconChange}></RoundedLabel>
|
|
|
+ <View className="flex items-center">
|
|
|
+ {listStyle === "chat" ? (
|
|
|
+ <RoundedLabel
|
|
|
+ onClick={() => setShowPopup(true)}
|
|
|
+ text="信息流"
|
|
|
+ icon={IconFilterFeeds}
|
|
|
+ ></RoundedLabel>
|
|
|
+ ) : (
|
|
|
+ <>
|
|
|
+ <RoundedLabel
|
|
|
+ onClick={() => {
|
|
|
+ console.log("batch");
|
|
|
+ }}
|
|
|
+ text="批量"
|
|
|
+ icon={IconFilterBatch}
|
|
|
+ ></RoundedLabel>
|
|
|
+ <RoundedLabel
|
|
|
+ text="列表"
|
|
|
+ icon={IconFilterList}
|
|
|
+ ></RoundedLabel>
|
|
|
+ </>
|
|
|
+ )}
|
|
|
</View>
|
|
|
</View>
|
|
|
</View>
|
|
|
<View className="px-16">
|
|
|
- <View className="flex flex-col gap-20 pb-120">
|
|
|
- <MessageRobotRich data={avatarData}>
|
|
|
- <WelcomeCard />
|
|
|
- </MessageRobotRich>
|
|
|
-
|
|
|
- <MessageRobotRich data={avatarData}>
|
|
|
- <AddSuccessfulTips />
|
|
|
- </MessageRobotRich>
|
|
|
-
|
|
|
- <MessageRich data={avatarData}>
|
|
|
- <View className="flex items-center gap-12">
|
|
|
- <IconFIleTxt />
|
|
|
- <View className="flex flex-col flex-1 gap-2">
|
|
|
+ {/* <ViewStyleChat/> */}
|
|
|
+ <View>
|
|
|
+ <FigureList>
|
|
|
+ <FigureListItem
|
|
|
+ figure={IconFIleTxt}
|
|
|
+ underline
|
|
|
+ rightRenderer={rightRenderer}
|
|
|
+ >
|
|
|
+ <View className="flex flex-col flex-1 gap-2 w-full">
|
|
|
<View className="text-14 leading-22">文件名称</View>
|
|
|
<View className="text-12 leading-20 text-gray-45">
|
|
|
03-24 12:20 | 822.KB
|
|
|
</View>
|
|
|
</View>
|
|
|
- </View>
|
|
|
- </MessageRich>
|
|
|
-
|
|
|
- <MessageRobotRich data={avatarData} analyzeStatus="doing">
|
|
|
- <FigureList>
|
|
|
- <FigureListItem figure={IconFIleTxt} underline>
|
|
|
- <View className="flex flex-col flex-1 gap-2 w-full">
|
|
|
- <View className="text-14 leading-22">文件名称</View>
|
|
|
- <View className="text-12 leading-20 text-gray-45">
|
|
|
- 03-24 12:20 | 822.KB
|
|
|
- </View>
|
|
|
- </View>
|
|
|
- </FigureListItem>
|
|
|
- <FigureListItem figure={IconFIlePDF}>
|
|
|
- <View className="flex flex-col flex-1 gap-2 w-full">
|
|
|
- <View className="text-14 leading-22">飞秒小知识.pdf</View>
|
|
|
- <View className="text-12 leading-20 text-gray-45">
|
|
|
- 03-24 12:20 | 822.KB
|
|
|
- </View>
|
|
|
- </View>
|
|
|
- </FigureListItem>
|
|
|
- </FigureList>
|
|
|
- </MessageRobotRich>
|
|
|
-
|
|
|
- <MessageRobotRich data={avatarData} analyzeStatus="done">
|
|
|
- <FigureList>
|
|
|
- <FigureListItem figure={IconFIleTxt} underline arrow>
|
|
|
- <View className="flex flex-col flex-1 gap-2 w-full">
|
|
|
- <View className="text-14 leading-22">文件名称</View>
|
|
|
- <View className="text-12 leading-20 text-gray-45">
|
|
|
- 03-24 12:20 | 822.KB
|
|
|
- </View>
|
|
|
- </View>
|
|
|
- </FigureListItem>
|
|
|
- <FigureListItem figure={IconFIlePDF} arrow>
|
|
|
- <View className="flex flex-col flex-1 gap-2 w-full">
|
|
|
- <View className="text-14 leading-22">飞秒小知识.pdf</View>
|
|
|
- <View className="text-12 leading-20 text-gray-45">
|
|
|
- 03-24 12:20 | 822.KB
|
|
|
- </View>
|
|
|
- </View>
|
|
|
- </FigureListItem>
|
|
|
- </FigureList>
|
|
|
- </MessageRobotRich>
|
|
|
-
|
|
|
- <MessageRich data={avatarData}>
|
|
|
- <View className="flex items-center gap-12">
|
|
|
- <IconFIleXLSX />
|
|
|
- <View className="flex flex-col flex-1 gap-2">
|
|
|
- <View className="text-14 leading-22">文件名称</View>
|
|
|
+ </FigureListItem>
|
|
|
+ <FigureListItem
|
|
|
+ figure={IconFIlePDF}
|
|
|
+ rightRenderer={rightRenderer}
|
|
|
+ >
|
|
|
+ <View className="flex flex-col flex-1 gap-2 w-full">
|
|
|
+ <View className="text-14 leading-22">飞秒小知识.pdf</View>
|
|
|
<View className="text-12 leading-20 text-gray-45">
|
|
|
03-24 12:20 | 822.KB
|
|
|
</View>
|
|
|
</View>
|
|
|
- </View>
|
|
|
- </MessageRich>
|
|
|
+ </FigureListItem>
|
|
|
+ </FigureList>
|
|
|
</View>
|
|
|
</View>
|
|
|
</View>
|
|
|
<Popup setShow={setShowPopup} show={showPopup} title="展示样式">
|
|
|
- <View className={`rounded-card ${listStyle === 'chat' ? 'rounded-card-actived' : ''}`} onClick={()=> {handleListStyleChange('chat')}}>
|
|
|
+ <View
|
|
|
+ className={`rounded-card ${
|
|
|
+ listStyle === "chat" ? "rounded-card-actived" : ""
|
|
|
+ }`}
|
|
|
+ onClick={() => {
|
|
|
+ handleListStyleChange("chat");
|
|
|
+ }}
|
|
|
+ >
|
|
|
<View className="border-bottom1-gray mb-12">
|
|
|
- <View className="mb-8 text-14 font-medium leading-22">对话信息流</View>
|
|
|
- <View className="mb-12 text-12 leading-20 text-gray-45">以对话形式展示,模拟自然的对话流程。</View>
|
|
|
+ <View className="mb-8 text-14 font-medium leading-22">
|
|
|
+ 对话信息流
|
|
|
+ </View>
|
|
|
+ <View className="mb-12 text-12 leading-20 text-gray-45">
|
|
|
+ 以对话形式展示,模拟自然的对话流程。
|
|
|
+ </View>
|
|
|
</View>
|
|
|
<View className="flex items-center">
|
|
|
- <View className="flex-1 text-14 font-medium leading-22">仅显示 AI 助手信息</View>
|
|
|
+ <View className="flex-1 text-14 font-medium leading-22">
|
|
|
+ 仅显示 AI 助手信息
|
|
|
+ </View>
|
|
|
<WemetaSwitch
|
|
|
checked={checked}
|
|
|
onChange={(checked) => setChecked(checked)}
|
|
|
></WemetaSwitch>
|
|
|
</View>
|
|
|
</View>
|
|
|
- <View className={`rounded-card ${listStyle === 'list' ? 'rounded-card-actived' : ''}`} onClick={()=> {handleListStyleChange('list')}}>
|
|
|
+ <View
|
|
|
+ className={`rounded-card ${
|
|
|
+ listStyle === "list" ? "rounded-card-actived" : ""
|
|
|
+ }`}
|
|
|
+ onClick={() => {
|
|
|
+ handleListStyleChange("list");
|
|
|
+ }}
|
|
|
+ >
|
|
|
<View className="mb-8 text-14 font-medium leading-22">列表形式</View>
|
|
|
- <View className="mb-12 text-12 leading-20 text-gray-45">将知识点以简洁列表呈现,清晰快速地提供信息。</View>
|
|
|
+ <View className="mb-12 text-12 leading-20 text-gray-45">
|
|
|
+ 将知识点以简洁列表呈现,清晰快速地提供信息。
|
|
|
+ </View>
|
|
|
</View>
|
|
|
</Popup>
|
|
|
</>
|