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
446ca380
authored
Sep 20, 2024
by
GuoRuqiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
聊天按钮适配移动端
parent
f4c681d3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
web/src/components/HeaderBar.js
+1
-1
web/src/components/SiderBar.js
+10
-10
No files found.
web/src/components/HeaderBar.js
View file @
446ca380
...
...
@@ -57,7 +57,7 @@ let buttons = [
onMouseLeave
:
(
e
)
=>
{
e
.
currentTarget
.
querySelector
(
'svg'
).
style
.
color
=
'black'
;
},
className
:
localStorage
.
getItem
(
'chat_link'
)
className
:
localStorage
.
getItem
(
'chat_link'
)
&&
!
isMobile
()
//移动端不显示
?
'semi-navigation-item-normal'
:
'tableHiddle'
,
},
...
...
web/src/components/SiderBar.js
View file @
446ca380
...
...
@@ -86,16 +86,16 @@ const SiderBar = () => {
icon
:
<
IconLayers
/>
,
className
:
isAdmin
()
?
'semi-navigation-item-normal'
:
'tableHiddle'
,
},
//
去掉侧边栏的聊天,换到HeaderBar
//
{
//
text: '聊天',
//
itemKey: 'chat',
//
to: '/chat',
//
icon: <IconComment />,
// className:
localStorage.getItem('chat_link')
//
? 'semi-navigation-item-normal'
//
: 'tableHiddle',
//
},
//
修改侧边栏的聊天按钮,当移动端的时候才显示。
{
text
:
'聊天'
,
itemKey
:
'chat'
,
to
:
'/chat'
,
icon
:
<
IconComment
/>
,
className
:
isMobile
()
&&
localStorage
.
getItem
(
'chat_link'
)
?
'semi-navigation-item-normal'
:
'tableHiddle'
,
},
{
text
:
'令牌'
,
itemKey
:
'token'
,
...
...
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