Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
new-api
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
Commit
c6923782
authored
Nov 12, 2023
by
CaIon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复聊天按钮bug
parent
ba43bd39
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
10 deletions
+9
-10
web/src/components/SiderBar.js
+9
-10
No files found.
web/src/components/SiderBar.js
View file @
c6923782
...
@@ -15,7 +15,7 @@ import {
...
@@ -15,7 +15,7 @@ import {
IconLayers
,
IconLayers
,
IconSetting
,
IconSetting
,
IconCreditCard
,
IconCreditCard
,
Icon
SemiLogo
,
Icon
Comment
,
IconHome
,
IconHome
,
IconImage
IconImage
}
from
'@douyinfe/semi-icons'
;
}
from
'@douyinfe/semi-icons'
;
...
@@ -36,7 +36,13 @@ let headerButtons = [
...
@@ -36,7 +36,13 @@ let headerButtons = [
icon
:
<
IconLayers
/>
,
icon
:
<
IconLayers
/>
,
className
:
isAdmin
()?
'semi-navigation-item-normal'
:
'tableHiddle'
,
className
:
isAdmin
()?
'semi-navigation-item-normal'
:
'tableHiddle'
,
},
},
{
text
:
'聊天'
,
itemKey
:
'chat'
,
to
:
'/chat'
,
icon
:
<
IconComment
/>
,
className
:
localStorage
.
getItem
(
'chat_link'
)?
'semi-navigation-item-normal'
:
'tableHiddle'
,
},
{
{
text
:
'令牌'
,
text
:
'令牌'
,
itemKey
:
'token'
,
itemKey
:
'token'
,
...
@@ -89,14 +95,6 @@ let headerButtons = [
...
@@ -89,14 +95,6 @@ let headerButtons = [
// }
// }
];
];
if
(
localStorage
.
getItem
(
'chat_link'
))
{
headerButtons
.
splice
(
1
,
0
,
{
name
:
'聊天'
,
to
:
'/chat'
,
icon
:
'comments'
});
}
const
HeaderBar
=
()
=>
{
const
HeaderBar
=
()
=>
{
const
[
userState
,
userDispatch
]
=
useContext
(
UserContext
);
const
[
userState
,
userDispatch
]
=
useContext
(
UserContext
);
let
navigate
=
useNavigate
();
let
navigate
=
useNavigate
();
...
@@ -134,6 +132,7 @@ const HeaderBar = () => {
...
@@ -134,6 +132,7 @@ const HeaderBar = () => {
midjourney
:
"/midjourney"
,
midjourney
:
"/midjourney"
,
setting
:
"/setting"
,
setting
:
"/setting"
,
about
:
"/about"
,
about
:
"/about"
,
chat
:
"/chat"
,
};
};
return
(
return
(
<
Link
<
Link
...
...
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