feat: 首页改为脚本市场,创建页移至 /create
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -13,16 +13,16 @@ export default function App() {
|
||||
<span className="text-blue-500">⚡</span> ScriptForge
|
||||
</Link>
|
||||
<nav className="flex gap-4 text-sm">
|
||||
<Link to="/" className="text-gray-400 hover:text-blue-400 transition-colors">创建</Link>
|
||||
<Link to="/market" className="text-gray-400 hover:text-blue-400 transition-colors">市场</Link>
|
||||
<Link to="/" className="text-gray-400 hover:text-blue-400 transition-colors">市场</Link>
|
||||
<Link to="/create" className="text-gray-400 hover:text-blue-400 transition-colors">创建</Link>
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<main className="flex-1 max-w-4xl mx-auto px-4 py-8 w-full">
|
||||
<Routes>
|
||||
<Route path="/" element={<Home />} />
|
||||
<Route path="/market" element={<Market />} />
|
||||
<Route path="/" element={<Market />} />
|
||||
<Route path="/create" element={<Home />} />
|
||||
<Route path="/s/:id" element={<ScriptDetail />} />
|
||||
<Route path="/s/:id/delete" element={<DeleteScript />} />
|
||||
</Routes>
|
||||
|
||||
@@ -62,7 +62,7 @@ export default function Market() {
|
||||
) : items.length === 0 ? (
|
||||
<div className="text-center py-10">
|
||||
<p className="text-gray-500">暂无脚本</p>
|
||||
<Link to="/" className="text-blue-400 hover:underline text-sm mt-2 block">创建一个</Link>
|
||||
<Link to="/create" className="text-blue-400 hover:underline text-sm mt-2 block">创建一个</Link>
|
||||
</div>
|
||||
) : (
|
||||
<div className="grid gap-4 sm:grid-cols-2">
|
||||
|
||||
@@ -31,7 +31,7 @@ export default function ScriptDetail() {
|
||||
<div className="text-6xl mb-4">😕</div>
|
||||
<h2 className="text-xl font-bold mb-2">脚本不存在或已过期</h2>
|
||||
<p className="text-gray-400 mb-6">{error}</p>
|
||||
<Link to="/" className="text-blue-400 hover:underline">创建新脚本</Link>
|
||||
<Link to="/create" className="text-blue-400 hover:underline">创建新脚本</Link>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -59,7 +59,7 @@ export default function ScriptDetail() {
|
||||
return (
|
||||
<div>
|
||||
<div className="mb-6">
|
||||
<Link to="/" className="text-sm text-gray-500 hover:text-blue-400 transition-colors">← 创建</Link>
|
||||
<Link to="/create" className="text-sm text-gray-500 hover:text-blue-400 transition-colors">← 创建</Link>
|
||||
<Link to="/market" className="text-sm text-gray-500 hover:text-blue-400 transition-colors ml-4">市场</Link>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user