feat: Update SiderBar and Detail components for improved navigation and data visualization

- Removed the '模型价格' (Pricing) link from the SiderBar for a cleaner interface.
- Added a new '数据看板' (Data Dashboard) link to the SiderBar, enhancing navigation options.
- Refactored the Detail component to include user context and style context for better state management.
- Introduced new state variables to track token consumption and updated data handling for charts.
- Enhanced the layout with additional cards and tabs for displaying user quota and usage statistics.
- Improved data processing logic for pie and line charts, ensuring accurate representation of user data.
This commit is contained in:
CalciumIon
2024-12-12 16:11:17 +08:00
parent ab4c9fdb8f
commit b2d36b946d
2 changed files with 166 additions and 66 deletions

View File

@@ -73,12 +73,6 @@ const SiderBar = () => {
to: '/playground',
icon: <IconCommentStroked />,
},
{
text: '模型价格',
itemKey: 'pricing',
to: '/pricing',
icon: <IconPriceTag />,
},
{
text: '渠道',
itemKey: 'channel',
@@ -102,6 +96,16 @@ const SiderBar = () => {
to: '/token',
icon: <IconKey />,
},
{
text: '数据看板',
itemKey: 'detail',
to: '/detail',
icon: <IconCalendarClock />,
className:
localStorage.getItem('enable_data_export') === 'true'
? 'semi-navigation-item-normal'
: 'tableHiddle',
},
{
text: '兑换码',
itemKey: 'redemption',
@@ -128,16 +132,6 @@ const SiderBar = () => {
to: '/log',
icon: <IconHistogram />,
},
{
text: '数据看板',
itemKey: 'detail',
to: '/detail',
icon: <IconCalendarClock />,
className:
localStorage.getItem('enable_data_export') === 'true'
? 'semi-navigation-item-normal'
: 'tableHiddle',
},
{
text: '绘图',
itemKey: 'midjourney',