Skip to content

Commit 6ed32b8

Browse files
committed
完成整合包下载分离与启动器下载模块
1 parent 57f24be commit 6ed32b8

19 files changed

Lines changed: 2379 additions & 1262 deletions

File tree

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import GitHubIssueDetail from "@/components/GitHubIssueDetail";
2+
import { launcherRepos } from "@/lib/launcherMeta";
3+
4+
export default function IssueDetailPage({ params }: { params: { slug?: string[]; id: string } }) {
5+
const [key, branch] = params.slug ?? [];
6+
if (!key) return <div>请指定启动器</div>;
7+
8+
const meta = launcherRepos.find(r => r.key === key);
9+
if (!meta) return <div>未知的启动器</div>;
10+
11+
const backHref = `/downloads/launcher/${key}${branch ? `/${branch}` : ""}/issues`;
12+
13+
return <GitHubIssueDetail owner={meta.owner} repo={meta.repo} backHref={backHref} />;
14+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import GitHubIssuesList from "@/components/GitHubIssuesList";
2+
import { launcherRepos } from "@/lib/launcherMeta";
3+
4+
export default function IssuesPage({ params }: { params: { slug?: string[] } }) {
5+
const [key, branch] = params.slug ?? [];
6+
if (!key) return <div>请指定启动器</div>;
7+
8+
const meta = launcherRepos.find(r => r.key === key);
9+
if (!meta) return <div>未知的启动器</div>;
10+
11+
const backHref = `/downloads/launcher/${key}${branch ? `/${branch}` : ""}`;
12+
return <GitHubIssuesList owner={meta.owner} repo={meta.repo} backHref={backHref} />;
13+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import { LauncherDownloadPage } from "@/components/LauncherDownloadPage";
2+
import { launcherRepos } from "@/lib/launcherMeta";
3+
4+
export default function Page({ params }: { params: { slug?: string[] } }) {
5+
const [key, branch] = params.slug ?? [];
6+
if (!key) return <div>请指定启动器</div>;
7+
8+
const meta = launcherRepos.find(r => r.key === key);
9+
if (!meta) return <div>未知的启动器</div>;
10+
11+
const branchPath = branch ? `/${branch}` : "";
12+
const issuesHref = `/downloads/launcher/${key}${branchPath}/issues`;
13+
14+
return (
15+
<LauncherDownloadPage
16+
owner={meta.owner}
17+
repo={meta.repo}
18+
repoOwner={meta.owner}
19+
repoName={meta.repo}
20+
issuesHref={issuesHref}
21+
archived={meta.archived}
22+
archivedDate={meta.archivedDate}
23+
backHref="/downloads"
24+
/>
25+
);
26+
}

app/downloads/launcher/page.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { LauncherListPage } from "@/components/LauncherListPage";
2+
3+
export default function Page() {
4+
return <LauncherListPage />;
5+
}

0 commit comments

Comments
 (0)