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
598fe69d
Commit
598fe69d
authored
Jan 08, 2025
by
HoMeTown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 优化样式
parent
15561f73
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
61 additions
and
8 deletions
+61
-8
src/App.css
+54
-1
src/components/ChatEditor/index.tsx
+1
-1
src/components/PlaceholdersInput/index.tsx
+1
-1
src/pages/Chat/components/ChatItem/ChatAnswerBox.tsx
+1
-1
src/pages/Chat/components/ChatItem/ChatAnswerRecommend.tsx
+4
-4
No files found.
src/App.css
View file @
598fe69d
...
@@ -3,7 +3,60 @@
...
@@ -3,7 +3,60 @@
box-sizing
:
border-box
;
box-sizing
:
border-box
;
margin
:
0
auto
;
margin
:
0
auto
;
font-family
:
'alir'
;
font-family
:
'alir'
;
p
{
font-family
:
alir
,
PingFangSC
,
PingFang
SC
;
font-weight
:
400
;
font-size
:
14px
;
color
:
#161823
;
line-height
:
24px
;
}
img
{
width
:
100%
;
display
:
block
;
margin
:
12px
0
;
}
h3
{
font-size
:
14px
;
}
table
{
border-collapse
:
collapse
;
text-align
:
center
;
margin
:
12px
0
;
width
:
100%
;
font-size
:
10px
;
}
table
td
,
table
th
{
border
:
1px
solid
#fff9fa
;
color
:
#666
;
height
:
30px
;
}
table
thead
th
{
background-color
:
hsl
(
350
,
100%
,
99%
);
}
table
tr
:nth-child
(
odd
)
{
background
:
#fff
;
}
table
tr
:nth-child
(
even
)
{
background
:
#fff9fa
;
}
ol
{
list-style-type
:
disc
;
padding-left
:
16px
;
display
:
flex
;
flex-direction
:
column
;
gap
:
12px
0
;
margin
:
6px
0
;
}
ul
{
ul
{
list-style
:
circle
;
list-style-type
:
decimal
;
padding-left
:
16px
;
display
:
flex
;
flex-direction
:
column
;
gap
:
8px
0
;
margin
:
4px
0
;
}
}
}
}
src/components/ChatEditor/index.tsx
View file @
598fe69d
...
@@ -138,7 +138,7 @@ const ChatEditorBase: React.FC<ChatEditorProps & WithAuthProps> = ({ checkAuth,
...
@@ -138,7 +138,7 @@ const ChatEditorBase: React.FC<ChatEditorProps & WithAuthProps> = ({ checkAuth,
duration
:
0.3
,
duration
:
0.3
,
ease
:
'linear'
,
ease
:
'linear'
,
}
}
}
}
className=
"dark:text-zinc-500 text-[1
2px] sm:text-base
font-normal text-[#3333334d] pl-4 sm:pl-12 text-left w-[calc(100%-2rem)] truncate"
className=
"dark:text-zinc-500 text-[1
4px] sm:text-[14px]
font-normal text-[#3333334d] pl-4 sm:pl-12 text-left w-[calc(100%-2rem)] truncate"
>
>
{
placeholders
[
currentPlaceholder
]
}
{
placeholders
[
currentPlaceholder
]
}
</
motion
.
p
>
</
motion
.
p
>
...
...
src/components/PlaceholdersInput/index.tsx
View file @
598fe69d
...
@@ -266,7 +266,7 @@ export function PlaceholdersInput({
...
@@ -266,7 +266,7 @@ export function PlaceholdersInput({
duration
:
0.3
,
duration
:
0.3
,
ease
:
'linear'
,
ease
:
'linear'
,
}
}
}
}
className=
"dark:text-zinc-500 text-[1
2px] sm:text-base
font-normal text-[#3333334d] pl-4 sm:pl-12 text-left w-[calc(100%-2rem)] truncate"
className=
"dark:text-zinc-500 text-[1
4px] sm:text-[14px]
font-normal text-[#3333334d] pl-4 sm:pl-12 text-left w-[calc(100%-2rem)] truncate"
>
>
{
placeholders
[
currentPlaceholder
]
}
{
placeholders
[
currentPlaceholder
]
}
</
motion
.
p
>
</
motion
.
p
>
...
...
src/pages/Chat/components/ChatItem/ChatAnswerBox.tsx
View file @
598fe69d
...
@@ -65,7 +65,7 @@ export const ChatAnswerBox: React.FC<ChatAnswerBoxProps> = ({ record, showIndex,
...
@@ -65,7 +65,7 @@ export const ChatAnswerBox: React.FC<ChatAnswerBoxProps> = ({ record, showIndex,
)
)
:
<
SdreamLoading
/>
}
:
<
SdreamLoading
/>
}
</
motion
.
div
>
</
motion
.
div
>
<
div
className=
"w-[65px] flex-shrink-0"
></
div
>
<
div
className=
"
hidden sm:block
w-[65px] flex-shrink-0"
></
div
>
</
div
>
</
div
>
{
isTyping
&&
(
{
isTyping
&&
(
<
div
className=
"pl-[62px] mt-[12px]"
>
<
div
className=
"pl-[62px] mt-[12px]"
>
...
...
src/pages/Chat/components/ChatItem/ChatAnswerRecommend.tsx
View file @
598fe69d
...
@@ -30,8 +30,8 @@ export const ChatAnswerRecommend: React.FC<ChatAnswerRecommendProps> = ({ answer
...
@@ -30,8 +30,8 @@ export const ChatAnswerRecommend: React.FC<ChatAnswerRecommendProps> = ({ answer
<
div
className=
"flex flex-col gap-[8px]"
>
<
div
className=
"flex flex-col gap-[8px]"
>
{
{
questionList
.
map
((
item
,
index
)
=>
(
questionList
.
map
((
item
,
index
)
=>
(
<
Button
onClick=
{
()
=>
onSubmitQuestion
(
item
)
}
key=
{
index
}
color=
"primary"
variant=
"light"
className=
"text-left bg-[#fff] w-fit text-[#333] rounded-[8px] data-[hover=true]:bg-[#F6F6F8] data-[hover=true]:text-[#333]"
>
<
Button
onClick=
{
()
=>
onSubmitQuestion
(
item
)
}
key=
{
index
}
color=
"primary"
variant=
"light"
className=
"text-left bg-[#fff] w-fit
max-w-full
text-[#333] rounded-[8px] data-[hover=true]:bg-[#F6F6F8] data-[hover=true]:text-[#333]"
>
<
div
className=
"w-
[150px]
sm:w-full text-nowrap text-ellipsis overflow-hidden"
>
<
div
className=
"w-
full
sm:w-full text-nowrap text-ellipsis overflow-hidden"
>
{
item
}
{
item
}
</
div
>
</
div
>
<
SendIcon
/>
<
SendIcon
/>
...
@@ -43,10 +43,10 @@ export const ChatAnswerRecommend: React.FC<ChatAnswerRecommendProps> = ({ answer
...
@@ -43,10 +43,10 @@ export const ChatAnswerRecommend: React.FC<ChatAnswerRecommendProps> = ({ answer
{
{
questionList
.
length
===
0
&&
(
questionList
.
length
===
0
&&
(
<
div
className=
"flex flex-col gap-[8px]"
>
<
div
className=
"flex flex-col gap-[8px]"
>
<
Skeleton
className=
"w-
[300px]
rounded-lg"
>
<
Skeleton
className=
"w-
full
rounded-lg"
>
<
div
className=
"h-[40px] w-full rounded-lg bg-[#fff]"
></
div
>
<
div
className=
"h-[40px] w-full rounded-lg bg-[#fff]"
></
div
>
</
Skeleton
>
</
Skeleton
>
<
Skeleton
className=
"w-
[300px]
rounded-lg"
>
<
Skeleton
className=
"w-
full
rounded-lg"
>
<
div
className=
"h-[40px] w-full rounded-lg bg-[#fff]"
></
div
>
<
div
className=
"h-[40px] w-full rounded-lg bg-[#fff]"
></
div
>
</
Skeleton
>
</
Skeleton
>
</
div
>
</
div
>
...
...
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