Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sdream-ai-fe
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
侯明涛
sdream-ai-fe
Commits
0cbee674
Commit
0cbee674
authored
Feb 19, 2025
by
HoMeTown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 样式效果优化
parent
c3b82392
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
10 additions
and
11 deletions
+10
-11
src/App.css
+1
-1
src/pages/Chat/components/ChatItem/ChatAnswerBox.tsx
+5
-1
src/pages/Chat/components/ChatItem/ChatAnswerParser.tsx
+0
-2
src/pages/Chat/components/ChatItem/ChatAnswerShower.tsx
+1
-3
src/pages/Chat/components/ChatItem/ChatItemUser.tsx
+2
-2
src/pages/Collect/Collect.tsx
+1
-2
No files found.
src/App.css
View file @
0cbee674
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
font-weight
:
400
;
font-weight
:
400
;
font-size
:
15px
;
font-size
:
15px
;
color
:
#161823
;
color
:
#161823
;
line-height
:
2
4
px
;
line-height
:
2
8
px
;
}
}
/* @media screen and (max-width: 480px) {
/* @media screen and (max-width: 480px) {
img {
img {
...
...
src/pages/Chat/components/ChatItem/ChatAnswerBox.tsx
View file @
0cbee674
...
@@ -57,6 +57,10 @@ export const ChatAnswerBox: React.FC<ChatAnswerBoxProps> = ({ record, showIndex,
...
@@ -57,6 +57,10 @@ export const ChatAnswerBox: React.FC<ChatAnswerBoxProps> = ({ record, showIndex,
<
div
<
div
className=
"bg-white rounded-[20px] box-border px-[16px] py-[12px] sm:px-[24px] sm:py-[20px] relative"
className=
"bg-white rounded-[20px] box-border px-[16px] py-[12px] sm:px-[24px] sm:py-[20px] relative"
>
>
{
(
item
.
isShow
||
(
!
item
.
isShow
&&
!
isTyping
&&
item
.
answer
&&
item
.
answer
?.
length
!==
0
))
&&
<
div
className=
"absolute left-[24px] text-[10px] text-[#d0d1d2] bottom-[24px] sm:bottom-[28px]"
>
AI生成
</
div
>
}
{
(
item
.
answer
?.
length
||
item
.
cardList
?.
length
)
{
(
item
.
answer
?.
length
||
item
.
cardList
?.
length
)
?
(
?
(
<
div
className=
"content"
>
<
div
className=
"content"
>
...
@@ -68,7 +72,7 @@ export const ChatAnswerBox: React.FC<ChatAnswerBoxProps> = ({ record, showIndex,
...
@@ -68,7 +72,7 @@ export const ChatAnswerBox: React.FC<ChatAnswerBoxProps> = ({ record, showIndex,
:
<
SdreamLoading
/>
}
:
<
SdreamLoading
/>
}
</
div
>
</
div
>
<
div
className=
"hidden sm:block w-[65px] flex-shrink-0"
></
div
>
{
/* <div className="hidden sm:block w-[65px] flex-shrink-0"></div> */
}
</
div
>
</
div
>
{
isTyping
&&
(
{
isTyping
&&
(
<
div
className=
"sm:pl-[62px] mt-[12px]"
>
<
div
className=
"sm:pl-[62px] mt-[12px]"
>
...
...
src/pages/Chat/components/ChatItem/ChatAnswerParser.tsx
View file @
0cbee674
...
@@ -151,8 +151,6 @@ export const ChatAnswerParser: React.FC<ChatAnswerParserProps> = ({ isLastAnswer
...
@@ -151,8 +151,6 @@ export const ChatAnswerParser: React.FC<ChatAnswerParserProps> = ({ isLastAnswer
&&
<
ChatAnswerAttachment
fromParser
isLastAnswer=
{
isLastAnswer
}
onSubmitQuestion=
{
onSubmitQuestion
}
answer=
{
answer
}
/>
}
&&
<
ChatAnswerAttachment
fromParser
isLastAnswer=
{
isLastAnswer
}
onSubmitQuestion=
{
onSubmitQuestion
}
answer=
{
answer
}
/>
}
{
!
isTyping
&&
!
hideOperate
&&
<
ChatAnswerOperate
answer=
{
answer
}
/>
}
{
!
isTyping
&&
!
hideOperate
&&
<
ChatAnswerOperate
answer=
{
answer
}
/>
}
{
!
isTyping
&&
<
div
className=
"flex text-[10px] right-[16px] text-[#d0d1d2] bottom-[4px]"
>
AI生成
</
div
>
}
</
div
>
</
div
>
)
)
}
}
src/pages/Chat/components/ChatItem/ChatAnswerShower.tsx
View file @
0cbee674
...
@@ -13,16 +13,14 @@ interface ChatAnswerShowerProps {
...
@@ -13,16 +13,14 @@ interface ChatAnswerShowerProps {
export
const
ChatAnswerShower
:
React
.
FC
<
ChatAnswerShowerProps
>
=
({
answer
,
isLastAnswer
,
onSubmitQuestion
})
=>
{
export
const
ChatAnswerShower
:
React
.
FC
<
ChatAnswerShowerProps
>
=
({
answer
,
isLastAnswer
,
onSubmitQuestion
})
=>
{
const
hideOperate
=
(
answer
.
cardList
||
[]).
some
(
attachment
=>
attachment
.
type
===
'box'
||
attachment
?.
type
?.
includes
(
'card-'
))
const
hideOperate
=
(
answer
.
cardList
||
[]).
some
(
attachment
=>
attachment
.
type
===
'box'
||
attachment
?.
type
?.
includes
(
'card-'
))
return
(
return
(
<
div
>
<
div
className=
"relative flex flex-col gap-[8px]"
>
{
answer
.
answer
&&
(
{
answer
.
answer
&&
(
<
MarkdownDetail
>
<
MarkdownDetail
>
{
formatMarkdown
(
answer
.
answer
||
''
)
}
{
formatMarkdown
(
answer
.
answer
||
''
)
}
</
MarkdownDetail
>
</
MarkdownDetail
>
)
}
)
}
{
answer
.
cardList
&&
answer
.
cardList
?.
length
!==
0
&&
<
ChatAnswerAttachment
onSubmitQuestion=
{
onSubmitQuestion
}
isLastAnswer=
{
isLastAnswer
}
answer=
{
answer
}
/>
}
{
answer
.
cardList
&&
answer
.
cardList
?.
length
!==
0
&&
<
ChatAnswerAttachment
onSubmitQuestion=
{
onSubmitQuestion
}
isLastAnswer=
{
isLastAnswer
}
answer=
{
answer
}
/>
}
{
/* {} */
}
{
!
hideOperate
&&
<
ChatAnswerOperate
answer=
{
answer
}
/>
}
{
!
hideOperate
&&
<
ChatAnswerOperate
answer=
{
answer
}
/>
}
<
div
className=
"flex text-[10px] right-[16px] text-[#d0d1d2] bottom-[4px]"
>
AI生成
</
div
>
</
div
>
</
div
>
)
)
}
}
src/pages/Chat/components/ChatItem/ChatItemUser.tsx
View file @
0cbee674
...
@@ -9,11 +9,11 @@ interface ChatItemUserProps {
...
@@ -9,11 +9,11 @@ interface ChatItemUserProps {
export
const
ChatItemUser
:
React
.
FC
<
ChatItemUserProps
>
=
({
record
})
=>
{
export
const
ChatItemUser
:
React
.
FC
<
ChatItemUserProps
>
=
({
record
})
=>
{
return
(
return
(
<
div
className=
"chatItemUser"
>
<
div
className=
"chatItemUser"
>
<
div
className=
"text-[#b9b9bb] text-[13px] text-center w-full"
>
{
record
.
qaTime
}
</
div
>
<
div
className=
"text-[#b9b9bb] text-[13px] text-center w-full
mb-[12px]
"
>
{
record
.
qaTime
}
</
div
>
<
div
className=
"flex justify-end"
>
<
div
className=
"flex justify-end"
>
<
div
className=
"sm:block w-[65px] flex-shrink-0"
></
div
>
<
div
className=
"sm:block w-[65px] flex-shrink-0"
></
div
>
<
div
className=
"text-[15px] bg-[#29B6FD] rounded-[20px] box-border text-[#fff] px-[16px] py-[12px] sm:px-[24px] sm:py-[20px]"
>
{
record
.
question
}
</
div
>
<
div
className=
"text-[15px] bg-[#29B6FD] rounded-[20px] box-border text-[#fff] px-[16px] py-[12px] sm:px-[24px] sm:py-[20px]"
>
{
record
.
question
}
</
div
>
<
Avatar
className=
"hidden sm:block ml-[20px] flex-shrink-0"
src=
{
AvatarUser
}
/>
{
/* <Avatar className="hidden sm:block ml-[20px] flex-shrink-0" src={AvatarUser} /> */
}
</
div
>
</
div
>
<
div
className=
"h-[20px] sm:h-[32px] w-full"
></
div
>
<
div
className=
"h-[20px] sm:h-[32px] w-full"
></
div
>
</
div
>
</
div
>
...
...
src/pages/Collect/Collect.tsx
View file @
0cbee674
...
@@ -96,8 +96,7 @@ export const Collect: React.FC = () => {
...
@@ -96,8 +96,7 @@ export const Collect: React.FC = () => {
<
ChatMaskBar
/>
<
ChatMaskBar
/>
<
div
className=
"content h-full overflow-y-auto"
>
<
div
className=
"content h-full overflow-y-auto"
>
<
motion
.
div
<
motion
.
div
className=
{
`${styles.collectScrollable} scrollbar-hide pt-[16px]`
}
className=
{
`${styles.collectScrollable} scrollbar-hide`
}
>
>
<
div
className=
{
`${styles.inter}`
}
>
<
div
className=
{
`${styles.inter}`
}
>
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment