fix: replace Home link with clickable AASD nav bar in visitor report

This commit is contained in:
administrator 2026-04-29 07:38:03 +00:00
parent b91406ada4
commit 808fe757e4
2 changed files with 8 additions and 10 deletions

View file

@ -70,15 +70,13 @@ func (g *Generator) BuildReport(token, domain, aiNarrativeHTML string) (string,
</head> </head>
<body class="bg-slate-900 text-slate-100 min-h-screen"> <body class="bg-slate-900 text-slate-100 min-h-screen">
<div class="container mx-auto px-4 py-6 max-w-lg"> <div class="container mx-auto px-4 py-6 max-w-lg">
<!-- Header + Home --> <!-- Top Nav Bar -->
<div class="flex items-center justify-between mb-4"> <a href="/" class="block bg-slate-800/80 border border-slate-700/50 rounded-xl px-4 py-2.5 mb-4 hover:bg-slate-700/50 transition-colors">
<a href="/" class="text-xs text-slate-500 hover:text-blue-400 transition-colors">&larr; Home</a> <div class="flex items-center justify-center gap-2">
<div class="text-center"> <span class="text-lg font-bold bg-gradient-to-r from-blue-400 to-purple-400 bg-clip-text text-transparent">AASD</span>
<h1 class="text-2xl font-bold bg-gradient-to-r from-blue-400 to-purple-400 bg-clip-text text-transparent">AASD</h1> <span class="text-xs text-slate-500">API Attack Surface Discovery</span>
<p class="text-sm text-slate-400">API Attack Surface Discovery</p>
</div>
<div class="w-10"></div> <!-- spacer -->
</div> </div>
</a>
<!-- Report Content --> <!-- Report Content -->
%s %s

View file

@ -272,8 +272,8 @@ func TestBuildReport_StartNewScanButton(t *testing.T) {
if !strings.Contains(content, "Start New Scan") { if !strings.Contains(content, "Start New Scan") {
t.Error("expected 'Start New Scan' button in report") t.Error("expected 'Start New Scan' button in report")
} }
if !strings.Contains(content, "Home") { if !strings.Contains(content, "AASD") {
t.Error("expected 'Home' link in report") t.Error("expected 'AASD' nav bar title in report")
} }
} }