mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-11-13 03:43:44 +08:00
chore: update theme berry
This commit is contained in:
@@ -3,6 +3,19 @@ import Label from "ui-component/Label";
|
||||
import Stack from "@mui/material/Stack";
|
||||
import Divider from "@mui/material/Divider";
|
||||
|
||||
function name2color(name) {
|
||||
switch (name) {
|
||||
case "default":
|
||||
return "info";
|
||||
case "vip":
|
||||
return "warning"
|
||||
case "svip":
|
||||
return "error"
|
||||
default:
|
||||
return "info"
|
||||
}
|
||||
}
|
||||
|
||||
const GroupLabel = ({ group }) => {
|
||||
let groups = [];
|
||||
if (group === "") {
|
||||
@@ -14,7 +27,7 @@ const GroupLabel = ({ group }) => {
|
||||
return (
|
||||
<Stack divider={<Divider orientation="vertical" flexItem />} spacing={0.5}>
|
||||
{groups.map((group, index) => {
|
||||
return <Label key={index}>{group}</Label>;
|
||||
return <Label key={index} color={name2color(group)}>{group}</Label>;
|
||||
})}
|
||||
</Stack>
|
||||
);
|
||||
|
||||
@@ -10,6 +10,7 @@ const ChannelTableHead = () => {
|
||||
<TableCell>类型</TableCell>
|
||||
<TableCell>状态</TableCell>
|
||||
<TableCell>响应时间</TableCell>
|
||||
<TableCell>已消耗</TableCell>
|
||||
<TableCell>余额</TableCell>
|
||||
<TableCell>优先级</TableCell>
|
||||
<TableCell>操作</TableCell>
|
||||
|
||||
@@ -170,6 +170,9 @@ export default function ChannelTableRow({
|
||||
handle_action={handleResponseTime}
|
||||
/>
|
||||
</TableCell>
|
||||
<TableCell>
|
||||
{renderNumber(item.used_quota)}
|
||||
</TableCell>
|
||||
<TableCell>
|
||||
<Tooltip
|
||||
title={"点击更新余额"}
|
||||
|
||||
Reference in New Issue
Block a user