feat(weibo): 增加微博微豆基础自动化
This commit is contained in:
@@ -8,6 +8,7 @@ import {
|
||||
SunOutlined, MoonOutlined, DesktopOutlined, GiftOutlined, ApartmentOutlined, MobileOutlined, ShoppingCartOutlined,
|
||||
BookOutlined, TrophyOutlined, ShopOutlined, GlobalOutlined,
|
||||
SafetyCertificateOutlined, FileSearchOutlined, RobotOutlined, FileExcelOutlined,
|
||||
MessageOutlined,
|
||||
} from '@ant-design/icons';
|
||||
import { useNavigate, useLocation, Outlet } from 'react-router-dom';
|
||||
import { getUser, clearAuth, type AuthUser } from '../store/auth';
|
||||
@@ -52,6 +53,7 @@ export default function MainLayout({ onLogout }: { onLogout?: () => void }) {
|
||||
const menuItems: MenuProps['items'] = [];
|
||||
const douyuItems: NonNullable<MenuProps['items']> = [];
|
||||
const huyaItems: NonNullable<MenuProps['items']> = [];
|
||||
const weiboItems: NonNullable<MenuProps['items']> = [];
|
||||
const systemItems: NonNullable<MenuProps['items']> = [];
|
||||
|
||||
// Dashboard - 所有人可见
|
||||
@@ -124,12 +126,19 @@ export default function MainLayout({ onLogout }: { onLogout?: () => void }) {
|
||||
huyaItems.push({ key: '/huya/collab', label: '外部单协作', icon: <FileExcelOutlined /> });
|
||||
}
|
||||
|
||||
if (can('weibo:view')) {
|
||||
weiboItems.push({ key: '/weibo/accounts', label: '账号与绑定', icon: <MessageOutlined /> });
|
||||
}
|
||||
|
||||
if (douyuItems.length > 0) {
|
||||
menuItems.push({ key: 'group-douyu', type: 'group', label: '斗鱼', children: douyuItems });
|
||||
}
|
||||
if (huyaItems.length > 0) {
|
||||
menuItems.push({ key: 'group-huya', type: 'group', label: '虎牙', children: huyaItems });
|
||||
}
|
||||
if (weiboItems.length > 0) {
|
||||
menuItems.push({ key: 'group-weibo', type: 'group', label: '微博', children: weiboItems });
|
||||
}
|
||||
|
||||
// 系统
|
||||
if (can('proxy:manage')) {
|
||||
|
||||
Reference in New Issue
Block a user