feat: better web page

This commit is contained in:
ckt1031 2023-09-08 14:54:31 +08:00
parent 204d86ce56
commit 39e5e105c7
2 changed files with 19 additions and 8 deletions

View File

@ -47,7 +47,10 @@ const Footer = () => {
<a href='https://github.com/songquanpeng' target='_blank'> <a href='https://github.com/songquanpeng' target='_blank'>
JustSong JustSong
</a>{' '} </a>{' '}
构建源代码遵循{' '} 构建{' '}
<a href='https://github.com/ckt1031' target='_blank'>
ckt1031
</a>{' '}{' '}
<a href='https://opensource.org/licenses/mit-license.php'> <a href='https://opensource.org/licenses/mit-license.php'>
MIT 协议 MIT 协议
</a> </a>

View File

@ -17,39 +17,46 @@ let headerButtons = [
name: '渠道', name: '渠道',
to: '/channel', to: '/channel',
icon: 'sitemap', icon: 'sitemap',
admin: true admin: true,
userOnly: true
}, },
{ {
name: '令牌', name: '令牌',
to: '/token', to: '/token',
icon: 'key' icon: 'key',
userOnly: true
}, },
{ {
name: '兑换', name: '兑换',
to: '/redemption', to: '/redemption',
icon: 'dollar sign', icon: 'dollar sign',
admin: true admin: true,
userOnly: true
}, },
{ {
name: '充值', name: '充值',
to: '/topup', to: '/topup',
icon: 'cart' icon: 'cart',
userOnly: true
}, },
{ {
name: '用户', name: '用户',
to: '/user', to: '/user',
icon: 'user', icon: 'user',
admin: true admin: true,
userOnly: true
}, },
{ {
name: '日志', name: '日志',
to: '/log', to: '/log',
icon: 'book' icon: 'book',
userOnly: true
}, },
{ {
name: '设置', name: '设置',
to: '/setting', to: '/setting',
icon: 'setting' icon: 'setting',
userOnly: true
}, },
{ {
name: '关于', name: '关于',
@ -90,6 +97,7 @@ const Header = () => {
const renderButtons = (isMobile) => { const renderButtons = (isMobile) => {
return headerButtons.map((button) => { return headerButtons.map((button) => {
if (button.admin && !isAdmin()) return <></>; if (button.admin && !isAdmin()) return <></>;
if (button.userOnly && !userState.user) return <></>;
if (isMobile) { if (isMobile) {
return ( return (
<Menu.Item <Menu.Item