mirror of
https://github.com/fankes/komari-theme-purcarte.git
synced 2025-10-19 20:09:24 +08:00
feat(theme): 新增主题可配置项,优化代码逻辑和样式
- 在 `komari-theme.json` 中添加了新的配置选项 - 支持自定义标题栏、内容区、实例页面和通用UI元素 - 优化部分组件调用逻辑 - 优化页面样式
This commit is contained in:
@@ -6,25 +6,12 @@ import { CpuIcon, MemoryStickIcon, HardDriveIcon } from "lucide-react";
|
||||
import Flag from "./Flag";
|
||||
import { Tag } from "../ui/tag";
|
||||
import { useNodeCommons } from "@/hooks/useNodeCommons";
|
||||
import { ProgressBar } from "../ui/progress-bar";
|
||||
|
||||
interface NodeCardProps {
|
||||
node: NodeWithStatus;
|
||||
}
|
||||
|
||||
const ProgressBar = ({
|
||||
value,
|
||||
className,
|
||||
}: {
|
||||
value: number;
|
||||
className?: string;
|
||||
}) => (
|
||||
<div className="w-full bg-gray-200 rounded-full h-3 dark:bg-gray-700">
|
||||
<div
|
||||
className={`h-3 rounded-full ${className}`}
|
||||
style={{ width: `${value}%` }}></div>
|
||||
</div>
|
||||
);
|
||||
|
||||
export const NodeCard = ({ node }: NodeCardProps) => {
|
||||
const {
|
||||
stats,
|
||||
|
Reference in New Issue
Block a user