Skip to content

Commit 6aa709d

Browse files
committed
feat(ui): add a download button for the offline HTML report
The report.html endpoint had no way in from the UI. This puts a download link right next to the Markdown export in the code-map panel, so you can grab the self-contained report and hand it to someone without touching the API directly.
1 parent d433db1 commit 6aa709d

1 file changed

Lines changed: 16 additions & 7 deletions

File tree

frontend/src/pages/Overview.tsx

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -824,13 +824,22 @@ export default function Overview() {
824824
"No AI needed — a structural overview computed straight from the import graph.",
825825
)}
826826
</p>
827-
<a
828-
href={`/api/project/${projectId}/codemap.md`}
829-
download={`${project.name || "codemap"}-codemap.md`}
830-
className="inline-block text-sm text-blue-600 hover:underline mb-4"
831-
>
832-
{t("↓ 下载为 Markdown", "↓ Download as Markdown")}
833-
</a>
827+
<div className="flex flex-wrap gap-x-4 gap-y-1 mb-4">
828+
<a
829+
href={`/api/project/${projectId}/codemap.md`}
830+
download={`${project.name || "codemap"}-codemap.md`}
831+
className="inline-block text-sm text-blue-600 hover:underline"
832+
>
833+
{t("↓ 下载为 Markdown", "↓ Download as Markdown")}
834+
</a>
835+
<a
836+
href={`/api/project/${projectId}/report.html`}
837+
download={`${project.name || "codemap"}-report.html`}
838+
className="inline-block text-sm text-blue-600 hover:underline"
839+
>
840+
{t("↓ 下载网页报告(可离线发给同事)", "↓ Download HTML report (offline, shareable)")}
841+
</a>
842+
</div>
834843

835844
{project.hotspots && project.hotspots.length > 0 && (
836845
<div className="mb-5">

0 commit comments

Comments
 (0)