mirror of
https://github.com/handsomezhuzhu/personal-navigation-site.git
synced 2026-02-20 11:46:55 +00:00
feat: update site names and server labels
Update site and server names for better clarity. Co-authored-by: Simon <85533298+handsomezhuzhu@users.noreply.github.com>
This commit is contained in:
@@ -8,7 +8,7 @@ import { ExternalLink, Globe, Server, Mail, Zap, Shield, Code, FileText, Search
|
|||||||
interface Site {
|
interface Site {
|
||||||
domain: string
|
domain: string
|
||||||
name: string
|
name: string
|
||||||
server: string
|
server: string | string[]
|
||||||
cdn: string
|
cdn: string
|
||||||
url: string
|
url: string
|
||||||
}
|
}
|
||||||
@@ -82,20 +82,20 @@ const categories: Category[] = [
|
|||||||
{
|
{
|
||||||
domain: "api-proxy.zhuzihan.com",
|
domain: "api-proxy.zhuzihan.com",
|
||||||
name: "AI API转发",
|
name: "AI API转发",
|
||||||
server: "狐蒂云-美国",
|
server: ["狐蒂云-美国", "Google-Iowa", "Google-Oregon"],
|
||||||
cdn: "ESA API加速",
|
cdn: "ESA API加速",
|
||||||
url: "https://api-proxy.zhuzihan.com",
|
url: "https://api-proxy.zhuzihan.com",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
domain: "ai-proxy.zhuzihan.com",
|
domain: "ai-proxy.zhuzihan.com",
|
||||||
name: "AI API转发",
|
name: "AI API转发",
|
||||||
server: "狐蒂云-美国",
|
server: ["狐蒂云-美国", "Google-Iowa", "Google-Oregon"],
|
||||||
cdn: "ESA API加速",
|
cdn: "ESA API加速",
|
||||||
url: "https://ai-proxy.zhuzihan.com",
|
url: "https://ai-proxy.zhuzihan.com",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
domain: "cpa.zhuzihan.com/management.html",
|
domain: "cpa.zhuzihan.com/management.html",
|
||||||
name: "codex/Gemini cli反代",
|
name: "CliProxyAPI",
|
||||||
server: "狐蒂云-美国",
|
server: "狐蒂云-美国",
|
||||||
cdn: "无加速",
|
cdn: "无加速",
|
||||||
url: "https://cpa.zhuzihan.com/management.html",
|
url: "https://cpa.zhuzihan.com/management.html",
|
||||||
@@ -162,6 +162,20 @@ const categories: Category[] = [
|
|||||||
cdn: "无加速",
|
cdn: "无加速",
|
||||||
url: "https://qzy.zhuzihan.com",
|
url: "https://qzy.zhuzihan.com",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
domain: "google1.zhuzihan.com",
|
||||||
|
name: "Google-Iowa管理后台",
|
||||||
|
server: "Google-Iowa",
|
||||||
|
cdn: "无加速",
|
||||||
|
url: "https://google1.zhuzihan.com",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
domain: "google2.zhuzihan.com",
|
||||||
|
name: "Google-Oregon管理后台",
|
||||||
|
server: "Google-Oregon",
|
||||||
|
cdn: "无加速",
|
||||||
|
url: "https://google2.zhuzihan.com",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
domain: "hdy.zhuzihan.com",
|
domain: "hdy.zhuzihan.com",
|
||||||
name: "狐蒂云-日本管理后台",
|
name: "狐蒂云-日本管理后台",
|
||||||
@@ -296,6 +310,7 @@ function getServerBadgeStyle(server: string) {
|
|||||||
if (server.includes("网易") || server.includes("企业邮箱")) return "bg-red-500/20 text-red-400"
|
if (server.includes("网易") || server.includes("企业邮箱")) return "bg-red-500/20 text-red-400"
|
||||||
if (server.includes("狐蒂云-日本")) return "bg-pink-500/20 text-pink-400"
|
if (server.includes("狐蒂云-日本")) return "bg-pink-500/20 text-pink-400"
|
||||||
if (server.includes("狐蒂云-美国")) return "bg-violet-500/20 text-violet-400"
|
if (server.includes("狐蒂云-美国")) return "bg-violet-500/20 text-violet-400"
|
||||||
|
if (server.includes("Google-Iowa") || server.includes("Google-Oregon")) return "bg-green-500/20 text-green-400"
|
||||||
return "bg-muted text-muted-foreground"
|
return "bg-muted text-muted-foreground"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -309,7 +324,9 @@ export function SiteNavigation() {
|
|||||||
(site) =>
|
(site) =>
|
||||||
site.name.toLowerCase().includes(searchQuery.toLowerCase()) ||
|
site.name.toLowerCase().includes(searchQuery.toLowerCase()) ||
|
||||||
site.domain.toLowerCase().includes(searchQuery.toLowerCase()) ||
|
site.domain.toLowerCase().includes(searchQuery.toLowerCase()) ||
|
||||||
site.server.toLowerCase().includes(searchQuery.toLowerCase()),
|
(Array.isArray(site.server)
|
||||||
|
? site.server.some((s) => s.toLowerCase().includes(searchQuery.toLowerCase()))
|
||||||
|
: site.server.toLowerCase().includes(searchQuery.toLowerCase())),
|
||||||
),
|
),
|
||||||
}))
|
}))
|
||||||
.filter((category) => category.sites.length > 0)
|
.filter((category) => category.sites.length > 0)
|
||||||
@@ -368,12 +385,24 @@ export function SiteNavigation() {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex flex-wrap gap-2">
|
<div className="flex flex-wrap gap-2">
|
||||||
<span
|
{Array.isArray(site.server) ? (
|
||||||
className={`inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs font-medium ${getServerBadgeStyle(site.server)}`}
|
site.server.map((s) => (
|
||||||
>
|
<span
|
||||||
<Server className="size-3" />
|
key={s}
|
||||||
{site.server}
|
className={`inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs font-medium ${getServerBadgeStyle(s)}`}
|
||||||
</span>
|
>
|
||||||
|
<Server className="size-3" />
|
||||||
|
{s}
|
||||||
|
</span>
|
||||||
|
))
|
||||||
|
) : (
|
||||||
|
<span
|
||||||
|
className={`inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs font-medium ${getServerBadgeStyle(site.server)}`}
|
||||||
|
>
|
||||||
|
<Server className="size-3" />
|
||||||
|
{site.server}
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
{site.cdn !== "-" && (
|
{site.cdn !== "-" && (
|
||||||
<span
|
<span
|
||||||
className={`inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs font-medium ${getCdnBadgeStyle(site.cdn)}`}
|
className={`inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs font-medium ${getCdnBadgeStyle(site.cdn)}`}
|
||||||
|
|||||||
Reference in New Issue
Block a user