fix conditional rendering and conditional text logic, use more-stable faq url

This commit is contained in:
TERR-inss
2026-02-11 21:57:06 -05:00
committed by Markus Unterwaditzer
parent e77fe469da
commit 5efa12f358

View File

@@ -22,26 +22,26 @@
<p>Error getting analysis report: {entry.analysis_report}</p>
{:else}
{@const metadata: ReportMetadata = entry.analysis_report.metadata}
{@const numWarnings: number = entry.get_num_warnings() || 0}
<div class="flex flex-col gap-2">
{#if !current}
{@const numWarnings: number = entry.get_num_warnings() || 0}
{#if !!numWarnings || !current}
<div class="flex flex-row justify-between items-center">
{#if numWarnings}
{#if !!numWarnings}
<div
class="text-red-700 border-red-500 border rounded-lg text-blue-600 px-2 py-1 mr-12"
>
Your Rayhunter device raised {`${numWarnings}`} warning{`${
numWarnings > 0 ? 's' : ''
numWarnings > 1 ? 's' : ''
}`}!
<a
href="https://efforg.github.io/rayhunter/faq.html#help-rayhunters-line-is-redorangeyellowdotteddashed-what-should-i-do"
href="https://efforg.github.io/rayhunter/faq.html#red"
class="text-blue-600 underline">Read the FAQ</a
> to learn what you can do about it
</div>
{:else}
<div></div>
{/if}
<ReAnalyzeButton {entry} {manager} />
{#if !current}
<ReAnalyzeButton {entry} {manager} />
{/if}
</div>
{/if}
{#if entry.analysis_report.rows.length > 0}