Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵月辉
/
fastgpt-migrated
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
7ba14d2c
authored
Mar 18, 2023
by
Archer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 首页提示
parent
00b90f07
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
18 deletions
+38
-18
src/components/Icon/icons/home.svg
+2
-0
src/components/Icon/index.tsx
+2
-1
src/pages/chat/components/SlideBar.tsx
+34
-17
No files found.
src/components/Icon/icons/home.svg
0 → 100644
View file @
7ba14d2c
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg
t=
"1679114254212"
class=
"icon"
viewBox=
"0 0 1024 1024"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
p-id=
"2776"
width=
"48"
height=
"48"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
><path
d=
"M923.733333 394.666667c-85.333333-70.4-206.933333-174.933333-362.666666-309.333334C533.333333 61.866667 490.666667 61.866667 462.933333 85.333333c-155.733333 134.4-277.333333 238.933333-362.666666 309.333334-14.933333 14.933333-25.6 34.133333-25.6 53.333333 0 38.4 32 70.4 70.4 70.4H192v358.4c0 29.866667 23.466667 53.333333 53.333333 53.333333H405.333333c29.866667 0 53.333333-23.466667 53.333334-53.333333v-206.933333h106.666666v206.933333c0 29.866667 23.466667 53.333333 53.333334 53.333333h160c29.866667 0 53.333333-23.466667 53.333333-53.333333V518.4h46.933333c38.4 0 70.4-32 70.4-70.4 0-21.333333-10.666667-40.533333-25.6-53.333333z m-44.8 59.733333h-57.6c-29.866667 0-53.333333 23.466667-53.333333 53.333333v358.4h-138.666667V661.333333c0-29.866667-23.466667-53.333333-53.333333-53.333333h-128c-29.866667 0-53.333333 23.466667-53.333333 53.333333v206.933334H256V507.733333c0-29.866667-23.466667-53.333333-53.333333-53.333333H145.066667c-4.266667 0-6.4-2.133333-6.4-6.4 0-2.133333 2.133333-4.266667 2.133333-6.4 85.333333-70.4 206.933333-174.933333 362.666667-309.333333 4.266667-4.266667 10.666667-4.266667 14.933333 0 155.733333 134.4 277.333333 238.933333 362.666667 309.333333 2.133333 2.133333 2.133333 2.133333 2.133333 4.266667 2.133333 6.4-2.133333 8.533333-4.266667 8.533333z"
p-id=
"2777"
></path></svg>
\ No newline at end of file
src/components/Icon/index.tsx
View file @
7ba14d2c
...
...
@@ -5,7 +5,8 @@ import dynamic from 'next/dynamic';
const
map
=
{
model
:
dynamic
(()
=>
import
(
'./icons/model.svg'
)),
share
:
dynamic
(()
=>
import
(
'./icons/share.svg'
))
share
:
dynamic
(()
=>
import
(
'./icons/share.svg'
)),
home
:
dynamic
(()
=>
import
(
'./icons/home.svg'
))
};
const
MyIcon
=
({
...
...
src/pages/chat/components/SlideBar.tsx
View file @
7ba14d2c
...
...
@@ -107,6 +107,23 @@ const SlideBar = ({
</>
);
const
RenderButton
=
({
onClick
,
children
}:
{
onClick
:
()
=>
void
;
children
:
JSX
.
Element
})
=>
(
<
Box
px=
{
3
}
mb=
{
3
}
>
<
Flex
alignItems=
{
'center'
}
p=
{
2
}
cursor=
{
'pointer'
}
borderRadius=
{
'md'
}
_hover=
{
{
backgroundColor
:
'rgba(255,255,255,0.2)'
}
}
onClick=
{
onClick
}
>
{
children
}
</
Flex
>
</
Box
>
);
return
(
<
Flex
flexDirection=
{
'column'
}
...
...
@@ -193,24 +210,24 @@ const SlideBar = ({
<
Divider
my=
{
4
}
/>
<
Box
px=
{
3
}
>
<
Flex
alignItems=
{
'center'
}
p=
{
2
}
cursor=
{
'pointer'
}
borderRadius=
{
'md'
}
_hover=
{
{
backgroundColor
:
'rgba(255,255,255,0.2)'
}
}
on
Click=
{
()
=>
{
onOpenShar
e
();
onClose
();
}
}
>
<
RenderButton
onClick=
{
()
=>
router
.
push
(
'/'
)
}
>
<
>
<
MyIcon
name=
"home"
fill=
{
'white'
}
w=
{
'18px'
}
h=
{
'18px'
}
mr=
{
4
}
/>
首页
</>
</
RenderButton
>
<
RenderButton
onClick=
{
()
=>
{
on
OpenShare
();
onClos
e
();
}
}
>
<
>
<
MyIcon
name=
"share"
fill=
{
'white'
}
w=
{
'16px'
}
h=
{
'16px'
}
mr=
{
4
}
/>
分享
对话
</
Flex
>
</
Box
>
分享
</>
</
RenderButton
>
{
/* 分享提示modal */
}
<
Modal
isOpen=
{
isOpenShare
}
onClose=
{
onCloseShare
}
>
...
...
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