feat: cahnge stats page style
parent
9536909f53
commit
32ef657971
|
|
@ -1,13 +1,22 @@
|
||||||
import { Card, Empty, Select, Space, Spin, Table, Tag } from 'antd';
|
import { Card, Empty, Select, Space, Spin, Table, Tag } from 'antd';
|
||||||
import type { StatsPageLogic } from '../StatsPageLogic';
|
import type { StatsPageLogic } from '../StatsPageLogic';
|
||||||
|
import { useIsMobile } from '../../../hooks/useIsMobile';
|
||||||
|
|
||||||
export default function StatsTokenSection({ logic }: { logic: StatsPageLogic }) {
|
export default function StatsTokenSection({ logic }: { logic: StatsPageLogic }) {
|
||||||
const { data, tokenData, tokenLoading } = logic;
|
const { data, tokenData, tokenLoading } = logic;
|
||||||
|
const isMobile = useIsMobile();
|
||||||
if (!data) return null;
|
if (!data) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="stats-page-token-section">
|
<div className="stats-page-token-section">
|
||||||
<Card title="Token 使用量" className="stats-page-chart-card" extra={<TokenControls logic={logic} />}>
|
<Card
|
||||||
|
title="Token 使用量"
|
||||||
|
className="stats-page-chart-card"
|
||||||
|
extra={!isMobile && <TokenControls logic={logic} />}
|
||||||
|
>
|
||||||
|
{isMobile && (
|
||||||
|
<TokenControls logic={logic} />
|
||||||
|
)}
|
||||||
{tokenLoading ? (
|
{tokenLoading ? (
|
||||||
<Spin className="stats-state-spin-small" />
|
<Spin className="stats-state-spin-small" />
|
||||||
) : !logic.tokenAgentId ? (
|
) : !logic.tokenAgentId ? (
|
||||||
|
|
|
||||||
|
|
@ -72,11 +72,19 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.stats-page-h5 .points-integration-row,
|
.stats-page-h5 .points-integration-row,
|
||||||
.stats-page-h5 .stats-page-token-cards-grid,
|
|
||||||
.stats-page-h5 .stats-page-token-charts-grid {
|
.stats-page-h5 .stats-page-token-charts-grid {
|
||||||
grid-template-columns: 1fr;
|
grid-template-columns: 1fr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.stats-page-h5 .stats-page-token-cards-grid {
|
||||||
|
grid-template-columns: 1fr 1fr;
|
||||||
|
gap: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.stats-page-h5 .stats-page-token-value {
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
.stats-page-h5 .stats-page-cards-grid,
|
.stats-page-h5 .stats-page-cards-grid,
|
||||||
.stats-page-h5 .points-integration-section,
|
.stats-page-h5 .points-integration-section,
|
||||||
.stats-page-h5 .stats-page-chart-card,
|
.stats-page-h5 .stats-page-chart-card,
|
||||||
|
|
@ -90,15 +98,41 @@
|
||||||
padding-bottom: 0.25rem;
|
padding-bottom: 0.25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.stats-page-h5 .stats-page-chart-container {
|
||||||
|
padding: 0;
|
||||||
|
height: 160px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
.stats-page-h5 .stats-page-chart-bar-group {
|
.stats-page-h5 .stats-page-chart-bar-group {
|
||||||
min-width: 1.625rem;
|
min-width: 1.625rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.stats-page-h5 .stats-token-controls {
|
.stats-page-h5 .stats-page-chart-card .ant-card-head {
|
||||||
width: 100%;
|
padding: 12px 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.stats-page-h5 .stats-token-agent-select,
|
.stats-page-h5 .stats-page-chart-card .ant-card-head-title {
|
||||||
.stats-page-h5 .stats-token-small-select {
|
font-size: 16px;
|
||||||
width: 100%;
|
}
|
||||||
|
|
||||||
|
.stats-page-h5 .stats-token-controls {
|
||||||
|
width: 100%;
|
||||||
|
display: flex !important;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 8px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.stats-page-h5 .stats-token-agent-select {
|
||||||
|
flex: 0 0 100% !important;
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.stats-page-h5 .stats-token-small-select {
|
||||||
|
flex: 1 !important;
|
||||||
|
width: auto !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.stats-page-h5 .ant-card-body {
|
||||||
|
padding: 16px;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2404,6 +2404,10 @@ span.mention {
|
||||||
border: 1px solid rgba(255,255,255,0.7);
|
border: 1px solid rgba(255,255,255,0.7);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.stats-page-h5 .stats-page-token-card {
|
||||||
|
padding: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
.stats-page-token-label {
|
.stats-page-token-label {
|
||||||
font-size: 12.5px;
|
font-size: 12.5px;
|
||||||
color: var(--color-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
|
|
@ -2464,14 +2468,14 @@ span.mention {
|
||||||
.points-integration-row {
|
.points-integration-row {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||||
gap: 14px;
|
gap: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.points-integration-item {
|
.points-integration-item {
|
||||||
border-radius: 18px;
|
border-radius: 12px;
|
||||||
padding: 16px 18px;
|
|
||||||
background: rgba(255,255,255,0.72);
|
background: rgba(255,255,255,0.72);
|
||||||
border: 1px solid rgba(255,255,255,0.7);
|
border: 1px solid rgba(227, 239, 255, 0.5);
|
||||||
|
padding: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.points-integration-label {
|
.points-integration-label {
|
||||||
|
|
@ -2484,7 +2488,7 @@ span.mention {
|
||||||
}
|
}
|
||||||
|
|
||||||
.points-integration-value {
|
.points-integration-value {
|
||||||
font-size: 26px;
|
font-size: 20px;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
color: var(--color-text);
|
color: var(--color-text);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue