mirror of
https://github.com/fankes/komari-theme-purcarte.git
synced 2025-10-19 03:49:22 +08:00
fix: 调整 Link to instance 点击范围,修复 sitename 和 price tag
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
"name": "Komari Theme PurCart",
|
||||
"short": "PurCarte",
|
||||
"description": "A frosted glass theme for Komari",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"author": "Montia & Gemini",
|
||||
"url": "https://github.com/Montia37/Komari-theme-purcarte",
|
||||
"preview": "preview.png",
|
||||
|
@@ -39,18 +39,18 @@ export const NodeCard = ({ node }: NodeCardProps) => {
|
||||
: "striped-bg-red-translucent-diagonal ring-2 ring-red-500/50"
|
||||
}`}>
|
||||
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
|
||||
<div className="flex items-center gap-2">
|
||||
<Flag flag={node.region}></Flag>
|
||||
<img
|
||||
src={getOSImage(node.os)}
|
||||
alt={node.os}
|
||||
className="w-6 h-6 rounded-full"
|
||||
loading="lazy"
|
||||
/>
|
||||
<CardTitle className="text-base font-bold">
|
||||
<Link to={`/instance/${node.uuid}`}>{node.name}</Link>
|
||||
</CardTitle>
|
||||
</div>
|
||||
<Link to={`/instance/${node.uuid}`}>
|
||||
<div className="flex items-center gap-2">
|
||||
<Flag flag={node.region}></Flag>
|
||||
<img
|
||||
src={getOSImage(node.os)}
|
||||
alt={node.os}
|
||||
className="w-6 h-6 rounded-full"
|
||||
loading="lazy"
|
||||
/>
|
||||
<CardTitle className="text-base font-bold">{node.name}</CardTitle>
|
||||
</div>
|
||||
</Link>
|
||||
</CardHeader>
|
||||
<CardContent className="flex-grow space-y-3 text-sm">
|
||||
<div className="flex flex-wrap gap-1">
|
||||
|
@@ -32,25 +32,25 @@ export const NodeListItem = ({ node }: NodeListItemProps) => {
|
||||
} text-secondary-foreground transition-colors duration-200`}>
|
||||
<div className="col-span-3 flex items-center text-left">
|
||||
<Flag flag={node.region} />
|
||||
<div className="ml-2 w-full">
|
||||
<div className="text-base font-bold">
|
||||
<Link to={`/instance/${node.uuid}`}>{node.name}</Link>
|
||||
</div>
|
||||
<Tag className="text-xs" tags={tagList} />
|
||||
<div className="flex text-xs">
|
||||
<div className="flex">
|
||||
<span className="text-secondary-foreground">到期:</span>
|
||||
<div className="flex items-center gap-1">{expired_at}</div>
|
||||
</div>
|
||||
<div className="border-l border-border/60 mx-2"></div>
|
||||
<div className="flex">
|
||||
<span className="text-secondary-foreground">在线:</span>
|
||||
<span>
|
||||
{isOnline && stats ? formatUptime(stats.uptime) : "离线"}
|
||||
</span>
|
||||
<Link to={`/instance/${node.uuid}`}>
|
||||
<div className="ml-2 w-full">
|
||||
<div className="text-base font-bold">{node.name}</div>
|
||||
<Tag className="text-xs" tags={tagList} />
|
||||
<div className="flex text-xs">
|
||||
<div className="flex">
|
||||
<span className="text-secondary-foreground">到期:</span>
|
||||
<div className="flex items-center gap-1">{expired_at}</div>
|
||||
</div>
|
||||
<div className="border-l border-border/60 mx-2"></div>
|
||||
<div className="flex">
|
||||
<span className="text-secondary-foreground">在线:</span>
|
||||
<span>
|
||||
{isOnline && stats ? formatUptime(stats.uptime) : "离线"}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Link>
|
||||
</div>
|
||||
<div className="col-span-1">
|
||||
<div className="gap-1 flex items-center justify-center whitespace-nowrap">
|
||||
|
@@ -44,7 +44,8 @@ export function ConfigProvider({
|
||||
enableLogo: theme.enableLogo ?? DEFAULT_CONFIG.enableLogo,
|
||||
logoUrl: theme.logoUrl || DEFAULT_CONFIG.logoUrl,
|
||||
enableTitle: theme.enableTitle ?? DEFAULT_CONFIG.enableTitle,
|
||||
titleText: theme.titleText || DEFAULT_CONFIG.titleText,
|
||||
titleText:
|
||||
theme.titleText || publicSettings?.sitename || DEFAULT_CONFIG.titleText,
|
||||
enableSearchButton:
|
||||
theme.enableSearchButton ?? DEFAULT_CONFIG.enableSearchButton,
|
||||
selectedDefaultView:
|
||||
@@ -64,7 +65,7 @@ export function ConfigProvider({
|
||||
theme.pingChartMaxPoints || DEFAULT_CONFIG.pingChartMaxPoints,
|
||||
backgroundImage,
|
||||
}),
|
||||
[theme, backgroundImage]
|
||||
[theme, backgroundImage, publicSettings?.sitename]
|
||||
);
|
||||
|
||||
return (
|
||||
|
@@ -55,10 +55,10 @@ export const useNodeCommons = (node: NodeWithStatus) => {
|
||||
? "长期"
|
||||
: node.expired_at
|
||||
? new Date(node.expired_at).toLocaleDateString()
|
||||
: "N/A";
|
||||
: "未设置";
|
||||
|
||||
const tagList = [
|
||||
price,
|
||||
...(price ? [price] : []),
|
||||
...(daysLeftTag ? [daysLeftTag] : []),
|
||||
...(typeof node.tags === "string"
|
||||
? node.tags
|
||||
|
Reference in New Issue
Block a user