update HeaderBar
This commit is contained in:
@@ -12,6 +12,7 @@ import {
|
|||||||
IconHelpCircle,
|
IconHelpCircle,
|
||||||
IconHome,
|
IconHome,
|
||||||
IconHomeStroked,
|
IconHomeStroked,
|
||||||
|
IconComment,
|
||||||
IconKey,
|
IconKey,
|
||||||
IconNoteMoneyStroked,
|
IconNoteMoneyStroked,
|
||||||
IconPriceTag,
|
IconPriceTag,
|
||||||
@@ -37,6 +38,28 @@ let buttons = [
|
|||||||
itemKey: 'home',
|
itemKey: 'home',
|
||||||
to: '/',
|
to: '/',
|
||||||
icon: <IconHomeStroked />,
|
icon: <IconHomeStroked />,
|
||||||
|
onMouseEnter: (e) => {
|
||||||
|
e.currentTarget.querySelector('svg').style.color = '#0064FA';
|
||||||
|
},
|
||||||
|
onMouseLeave: (e) => {
|
||||||
|
e.currentTarget.querySelector('svg').style.color = 'black';
|
||||||
|
},
|
||||||
|
},
|
||||||
|
// 增加 聊天 按钮
|
||||||
|
{
|
||||||
|
text: '聊天',
|
||||||
|
itemKey: 'chat',
|
||||||
|
to: '/chat',
|
||||||
|
icon: <IconComment />,
|
||||||
|
onMouseEnter: (e) => {
|
||||||
|
e.currentTarget.querySelector('svg').style.color = '#0064FA';
|
||||||
|
},
|
||||||
|
onMouseLeave: (e) => {
|
||||||
|
e.currentTarget.querySelector('svg').style.color = 'black';
|
||||||
|
},
|
||||||
|
className: localStorage.getItem('chat_link')
|
||||||
|
? 'semi-navigation-item-normal'
|
||||||
|
: 'tableHiddle',
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// text: '模型价格',
|
// text: '模型价格',
|
||||||
@@ -115,6 +138,7 @@ const HeaderBar = () => {
|
|||||||
login: '/login',
|
login: '/login',
|
||||||
register: '/register',
|
register: '/register',
|
||||||
home: '/',
|
home: '/',
|
||||||
|
chat: '/chat',
|
||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
<Link
|
<Link
|
||||||
|
|||||||
@@ -86,15 +86,16 @@ const SiderBar = () => {
|
|||||||
icon: <IconLayers />,
|
icon: <IconLayers />,
|
||||||
className: isAdmin() ? 'semi-navigation-item-normal' : 'tableHiddle',
|
className: isAdmin() ? 'semi-navigation-item-normal' : 'tableHiddle',
|
||||||
},
|
},
|
||||||
{
|
// 去掉侧边栏的聊天,换到HeaderBar
|
||||||
text: '聊天',
|
// {
|
||||||
itemKey: 'chat',
|
// text: '聊天',
|
||||||
to: '/chat',
|
// itemKey: 'chat',
|
||||||
icon: <IconComment />,
|
// to: '/chat',
|
||||||
className: localStorage.getItem('chat_link')
|
// icon: <IconComment />,
|
||||||
? 'semi-navigation-item-normal'
|
// className: localStorage.getItem('chat_link')
|
||||||
: 'tableHiddle',
|
// ? 'semi-navigation-item-normal'
|
||||||
},
|
// : 'tableHiddle',
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
text: '令牌',
|
text: '令牌',
|
||||||
itemKey: 'token',
|
itemKey: 'token',
|
||||||
|
|||||||
Reference in New Issue
Block a user