-
-
Notifications
You must be signed in to change notification settings - Fork 238
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
258 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { IconCreditCard, IconBrandGithubCopilot } from '@tabler/icons-react'; | ||
|
||
const icons = { IconCreditCard, IconBrandGithubCopilot }; | ||
|
||
const Billing = { | ||
id: 'billing', | ||
title: 'Billing', | ||
type: 'group', | ||
children: [ | ||
{ | ||
id: 'topup', | ||
title: '充值', | ||
type: 'item', | ||
url: '/panel/topup', | ||
icon: icons.IconCreditCard, | ||
breadcrumbs: false | ||
}, | ||
{ | ||
id: 'model_price', | ||
title: '可用模型', | ||
type: 'item', | ||
url: '/panel/model_price', | ||
icon: icons.IconBrandGithubCopilot, | ||
breadcrumbs: false, | ||
isAdmin: false | ||
} | ||
] | ||
}; | ||
|
||
export default Billing; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { IconDashboard, IconChartHistogram, IconBallFootball } from '@tabler/icons-react'; | ||
|
||
const icons = { IconDashboard, IconChartHistogram, IconBallFootball }; | ||
|
||
const dashboard = { | ||
id: 'dashboard', | ||
title: 'Dashboard', | ||
type: 'group', | ||
children: [ | ||
{ | ||
id: 'dashboard', | ||
title: '仪表盘', | ||
type: 'item', | ||
url: '/panel/dashboard', | ||
icon: icons.IconDashboard, | ||
breadcrumbs: false, | ||
isAdmin: false | ||
}, | ||
{ | ||
id: 'analytics', | ||
title: '分析', | ||
type: 'item', | ||
url: '/panel/analytics', | ||
icon: icons.IconChartHistogram, | ||
breadcrumbs: false, | ||
isAdmin: true | ||
}, | ||
{ | ||
id: 'playground', | ||
title: 'Playground', | ||
type: 'item', | ||
url: '/panel/playground', | ||
icon: icons.IconBallFootball, | ||
breadcrumbs: false | ||
} | ||
] | ||
}; | ||
|
||
export default dashboard; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,11 @@ | ||
import panel from './panel'; | ||
|
||
import Setting from './setting'; | ||
import Dashboard from './dashboard'; | ||
import Billing from './billing'; | ||
import usage from './usage'; | ||
// ==============================|| MENU ITEMS ||============================== // | ||
|
||
const menuItems = { | ||
items: [panel], | ||
urlMap: {} | ||
items: [Dashboard, Setting, Billing, usage] | ||
}; | ||
|
||
// Initialize urlMap | ||
menuItems.urlMap = menuItems.items.reduce((map, item) => { | ||
item.children.forEach((child) => { | ||
map[child.url] = child; | ||
}); | ||
return map; | ||
}, {}); | ||
|
||
export default menuItems; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
import { | ||
IconSitemap, | ||
IconBasket, | ||
IconKey, | ||
IconUser, | ||
IconUserScan, | ||
IconReceipt2, | ||
IconSettingsCog, | ||
IconBrandTelegram, | ||
IconCoin, | ||
IconBrandPaypal, | ||
IconCoins | ||
} from '@tabler/icons-react'; | ||
|
||
const icons = { | ||
IconSitemap, | ||
IconBasket, | ||
IconKey, | ||
IconUser, | ||
IconUserScan, | ||
IconReceipt2, | ||
IconSettingsCog, | ||
IconBrandTelegram, | ||
IconCoin, | ||
IconBrandPaypal, | ||
IconCoins | ||
}; | ||
|
||
const Setting = { | ||
id: 'setting', | ||
title: 'setting', | ||
type: 'group', | ||
children: [ | ||
{ | ||
id: 'user', | ||
title: '用户', | ||
type: 'item', | ||
url: '/panel/user', | ||
icon: icons.IconUser, | ||
breadcrumbs: false, | ||
isAdmin: true | ||
}, | ||
{ | ||
id: 'channel', | ||
title: '渠道', | ||
type: 'item', | ||
url: '/panel/channel', | ||
icon: icons.IconSitemap, | ||
breadcrumbs: false, | ||
isAdmin: true | ||
}, | ||
{ | ||
id: 'operation', | ||
title: '运营', | ||
type: 'collapse', | ||
icon: icons.IconBasket, | ||
isAdmin: true, | ||
children: [ | ||
{ | ||
id: 'pricing', | ||
title: '模型价格', | ||
type: 'item', | ||
url: '/panel/pricing', | ||
icon: icons.IconReceipt2, | ||
breadcrumbs: false, | ||
isAdmin: true | ||
}, | ||
{ | ||
id: 'telegram', | ||
title: 'Telegram Bot', | ||
type: 'item', | ||
url: '/panel/telegram', | ||
icon: icons.IconBrandTelegram, | ||
breadcrumbs: false, | ||
isAdmin: true | ||
} | ||
] | ||
}, | ||
{ | ||
id: 'paySetting', | ||
title: '支付设置', | ||
type: 'collapse', | ||
icon: icons.IconBrandPaypal, | ||
isAdmin: true, | ||
children: [ | ||
{ | ||
id: 'redemption', | ||
title: '兑换', | ||
type: 'item', | ||
url: '/panel/redemption', | ||
icon: icons.IconCoin, | ||
breadcrumbs: false, | ||
isAdmin: true | ||
}, | ||
{ | ||
id: 'payment', | ||
title: '支付', | ||
type: 'item', | ||
url: '/panel/payment', | ||
icon: icons.IconBrandPaypal, | ||
breadcrumbs: false, | ||
isAdmin: true | ||
} | ||
] | ||
}, | ||
|
||
{ | ||
id: 'token', | ||
title: '令牌', | ||
type: 'item', | ||
url: '/panel/token', | ||
icon: icons.IconKey, | ||
breadcrumbs: false | ||
}, | ||
|
||
{ | ||
id: 'profile', | ||
title: '个人设置', | ||
type: 'item', | ||
url: '/panel/profile', | ||
icon: icons.IconUserScan, | ||
breadcrumbs: false, | ||
isAdmin: false | ||
}, | ||
|
||
{ | ||
id: 'setting', | ||
title: '设置', | ||
type: 'item', | ||
url: '/panel/setting', | ||
icon: icons.IconSettingsCog, | ||
breadcrumbs: false, | ||
isAdmin: true | ||
} | ||
] | ||
}; | ||
|
||
export default Setting; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { IconArticle, IconBrush, IconList } from '@tabler/icons-react'; | ||
|
||
const icons = { IconArticle, IconBrush, IconList }; | ||
|
||
const usage = { | ||
id: 'usage', | ||
title: 'Usage', | ||
type: 'group', | ||
children: [ | ||
{ | ||
id: 'log', | ||
title: '日志', | ||
type: 'item', | ||
url: '/panel/log', | ||
icon: icons.IconArticle, | ||
breadcrumbs: false | ||
}, | ||
|
||
{ | ||
id: 'midjourney', | ||
title: 'Midjourney', | ||
type: 'item', | ||
url: '/panel/midjourney', | ||
icon: icons.IconBrush, | ||
breadcrumbs: false | ||
}, | ||
{ | ||
id: 'task', | ||
title: '异步任务', | ||
type: 'item', | ||
url: '/panel/task', | ||
icon: icons.IconList, | ||
breadcrumbs: false | ||
} | ||
] | ||
}; | ||
|
||
export default usage; |