feat: H5 底栏用 X 替换 YouTube,新增 /x 占位页
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
abf37e9abd
commit
527caabf34
35
frontend/src/app/x/page.tsx
Normal file
35
frontend/src/app/x/page.tsx
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
"use client";
|
||||||
|
|
||||||
|
import { Shell } from "@/components/Shell";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* X (Twitter) 独立模块占位页。
|
||||||
|
* 后续由 PVE Windows Chrome 插件 (X2) 经 API 推送数据;后端接口待定。
|
||||||
|
*/
|
||||||
|
export default function XPage() {
|
||||||
|
return (
|
||||||
|
<Shell>
|
||||||
|
<section className="rounded-2xl border border-white/10 bg-black/30 p-5 sm:p-8">
|
||||||
|
<div className="flex items-start gap-3">
|
||||||
|
<div className="flex h-11 w-11 shrink-0 items-center justify-center rounded-xl border border-white/10 bg-white/5 text-xl text-slate-100">
|
||||||
|
𝕏
|
||||||
|
</div>
|
||||||
|
<div className="min-w-0">
|
||||||
|
<h2 className="font-display text-xl font-semibold text-white sm:text-2xl">X</h2>
|
||||||
|
<p className="mt-1 text-sm text-slate-400">独立模块 · 页面已就绪,后端 API 待接入</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="mt-6 space-y-3 rounded-xl border border-dashed border-white/15 bg-white/[0.02] p-4 text-sm leading-relaxed text-slate-400">
|
||||||
|
<p>计划链路:</p>
|
||||||
|
<ol className="list-decimal space-y-1.5 pl-5 text-slate-500">
|
||||||
|
<li>PVE Windows 上 Chrome 运行 X2 插件采集</li>
|
||||||
|
<li>插件通过 API 把数据推送到本项目</li>
|
||||||
|
<li>本页展示与操作(接口与字段等你安排后再做)</li>
|
||||||
|
</ol>
|
||||||
|
<p className="pt-2 text-[11px] text-slate-600">当前无业务接口,仅占位导航与独立路由 <code className="text-slate-400">/x</code>。</p>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</Shell>
|
||||||
|
);
|
||||||
|
}
|
||||||
@ -3,7 +3,7 @@
|
|||||||
import { useEffect, useMemo, useState } from "react";
|
import { useEffect, useMemo, useState } from "react";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { usePathname, useRouter } from "next/navigation";
|
import { usePathname, useRouter } from "next/navigation";
|
||||||
import { Menu, X } from "lucide-react";
|
import { Menu, X as CloseIcon } from "lucide-react";
|
||||||
|
|
||||||
import { BrandMark, LivePulse } from "@/components/ui";
|
import { BrandMark, LivePulse } from "@/components/ui";
|
||||||
import { GlobalEventAlerts } from "@/components/GlobalEventAlerts";
|
import { GlobalEventAlerts } from "@/components/GlobalEventAlerts";
|
||||||
@ -28,12 +28,13 @@ const NAV = [
|
|||||||
{ href: "/youtube", label: "YouTube", emoji: "▶️" },
|
{ href: "/youtube", label: "YouTube", emoji: "▶️" },
|
||||||
{ href: "/shorts", label: "Shorts", emoji: "📱" },
|
{ href: "/shorts", label: "Shorts", emoji: "📱" },
|
||||||
{ href: "/tiktok", label: "TikTok", emoji: "🎵" },
|
{ href: "/tiktok", label: "TikTok", emoji: "🎵" },
|
||||||
|
{ href: "/x", label: "X", emoji: "𝕏" },
|
||||||
{ href: "/blacklist", label: "黑名单", emoji: "🚫" },
|
{ href: "/blacklist", label: "黑名单", emoji: "🚫" },
|
||||||
{ href: "/settings", label: "设置", emoji: "⚙️" },
|
{ href: "/settings", label: "设置", emoji: "⚙️" },
|
||||||
];
|
];
|
||||||
|
|
||||||
/** Bottom bar: keep 4 destinations + More */
|
/** Bottom bar: 概览 / TikTok / X / Shorts + 更多(YouTube 仅在「更多」) */
|
||||||
const MOBILE_PRIMARY = ["/", "/tiktok", "/shorts", "/youtube"];
|
const MOBILE_PRIMARY = ["/", "/tiktok", "/x", "/shorts"];
|
||||||
|
|
||||||
function navActive(pathname: string, href: string) {
|
function navActive(pathname: string, href: string) {
|
||||||
return pathname === href || (href !== "/" && pathname.startsWith(href));
|
return pathname === href || (href !== "/" && pathname.startsWith(href));
|
||||||
@ -245,7 +246,7 @@ function ShellFrame({ children }: { children: React.ReactNode }) {
|
|||||||
className="inline-flex h-9 w-9 items-center justify-center rounded-xl border border-white/10 bg-white/5 text-slate-300"
|
className="inline-flex h-9 w-9 items-center justify-center rounded-xl border border-white/10 bg-white/5 text-slate-300"
|
||||||
aria-label="关闭"
|
aria-label="关闭"
|
||||||
>
|
>
|
||||||
<X className="h-4 w-4" />
|
<CloseIcon className="h-4 w-4" />
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
{username ? (
|
{username ? (
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user