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 {
|
||||
domain: string
|
||||
name: string
|
||||
server: string
|
||||
server: string | string[]
|
||||
cdn: string
|
||||
url: string
|
||||
}
|
||||
@@ -82,20 +82,20 @@ const categories: Category[] = [
|
||||
{
|
||||
domain: "api-proxy.zhuzihan.com",
|
||||
name: "AI API转发",
|
||||
server: "狐蒂云-美国",
|
||||
server: ["狐蒂云-美国", "Google-Iowa", "Google-Oregon"],
|
||||
cdn: "ESA API加速",
|
||||
url: "https://api-proxy.zhuzihan.com",
|
||||
},
|
||||
{
|
||||
domain: "ai-proxy.zhuzihan.com",
|
||||
name: "AI API转发",
|
||||
server: "狐蒂云-美国",
|
||||
server: ["狐蒂云-美国", "Google-Iowa", "Google-Oregon"],
|
||||
cdn: "ESA API加速",
|
||||
url: "https://ai-proxy.zhuzihan.com",
|
||||
},
|
||||
{
|
||||
domain: "cpa.zhuzihan.com/management.html",
|
||||
name: "codex/Gemini cli反代",
|
||||
name: "CliProxyAPI",
|
||||
server: "狐蒂云-美国",
|
||||
cdn: "无加速",
|
||||
url: "https://cpa.zhuzihan.com/management.html",
|
||||
@@ -162,6 +162,20 @@ const categories: Category[] = [
|
||||
cdn: "无加速",
|
||||
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",
|
||||
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("狐蒂云-日本")) return "bg-pink-500/20 text-pink-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"
|
||||
}
|
||||
|
||||
@@ -309,7 +324,9 @@ export function SiteNavigation() {
|
||||
(site) =>
|
||||
site.name.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)
|
||||
@@ -368,12 +385,24 @@ export function SiteNavigation() {
|
||||
</div>
|
||||
|
||||
<div className="flex flex-wrap gap-2">
|
||||
{Array.isArray(site.server) ? (
|
||||
site.server.map((s) => (
|
||||
<span
|
||||
key={s}
|
||||
className={`inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs font-medium ${getServerBadgeStyle(s)}`}
|
||||
>
|
||||
<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 !== "-" && (
|
||||
<span
|
||||
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