Promote Pro trial and rename settlement source to station

This commit is contained in:
2569718930@qq.com
2026-04-06 05:38:41 +08:00
parent e2c43351bd
commit f4335833b4
9 changed files with 94 additions and 63 deletions
@@ -2683,6 +2683,29 @@
color: #fca5a5;
}
.root :global(.trial-promo-badge) {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 6px 12px;
border-radius: 999px;
border: 1px solid rgba(34, 211, 238, 0.28);
background: rgba(34, 211, 238, 0.1);
color: #a5f3fc;
font-size: 11px;
font-weight: 700;
letter-spacing: 0.01em;
text-decoration: none;
transition: var(--transition);
}
.root :global(.trial-promo-badge:hover) {
background: rgba(34, 211, 238, 0.16);
border-color: rgba(34, 211, 238, 0.45);
color: #ecfeff;
transform: translateY(-1px);
}
.root :global(.info-btn) {
background: rgba(99, 102, 241, 0.1);
border: 1px solid rgba(99, 102, 241, 0.3);
@@ -1011,27 +1011,19 @@ export function FutureForecastModal() {
settlementSourceCode === "wunderground";
const settlementProfileLabel = isOfficialSettlementSource
? locale === "en-US"
? "Settlement source"
: "结算"
? "Settlement station"
: "结算站点"
: t("section.airport");
const settlementProfileValue =
settlementSourceCode === "hko"
settlementSourceCode === "noaa"
? locale === "en-US"
? "Hong Kong Observatory (HKO)"
: "香港天文台 (HKO)"
: settlementSourceCode === "noaa"
? locale === "en-US"
? `NOAA ${noaaStationCode} (${noaaStationName})`
: `NOAA ${noaaStationCode}${noaaStationName}`
: settlementSourceCode === "cwa"
? locale === "en-US"
? "Central Weather Administration (CWA)"
: "交通部中央气象署 (CWA)"
: settlementSourceCode === "wunderground"
? locale === "en-US"
? `${detail.current?.settlement_source_label || risk.airport || "Wunderground"}`
: `${detail.current?.settlement_source_label || risk.airport || "Wunderground"}`
: risk.airport
? `${noaaStationName}${noaaStationCode ? ` (${noaaStationCode})` : ""}`
: `${noaaStationName}${noaaStationCode ? `${noaaStationCode}` : ""}`
: detail.current?.station_name
? `${detail.current.station_name}${
detail.current?.station_code ? ` (${detail.current.station_code})` : ""
}`
: risk.airport
? `${risk.airport}${risk.icao ? ` (${risk.icao})` : ""}`
: "--";
const airportCurrentText =
@@ -1398,26 +1390,6 @@ export function FutureForecastModal() {
</span>
<span>{settlementProfileValue}</span>
</div>
{settlementSourceCode === "wunderground" ? (
<div className="risk-row">
<span className="risk-label">
{locale === "en-US"
? "Airport METAR"
: "机场 METAR"}
</span>
<span>{airportCurrentText}</span>
</div>
) : null}
{settlementSourceCode === "wunderground" ? (
<div className="risk-row">
<span className="risk-label">
{locale === "en-US"
? "Airport high"
: "机场目前最高温"}
</span>
<span>{airportMaxText}</span>
</div>
) : null}
<div className="risk-row">
<span className="risk-label">
{t("section.distance")}
@@ -34,6 +34,8 @@ export function HeaderBar() {
const supabaseReady = hasSupabasePublicEnv();
const docsHref = "/docs/intro";
const docsActive = pathname?.startsWith("/docs");
const trialPromoLabel =
locale === "en-US" ? "New users get 3-day Pro trial" : "新用户可免费体验 3 天 Pro";
useEffect(() => {
let mounted = true;
@@ -135,6 +137,15 @@ export function HeaderBar() {
{t("header.docs")}
</Link>
<Link
href="/account"
className="trial-promo-badge"
title={trialPromoLabel}
aria-label={trialPromoLabel}
>
<span>{trialPromoLabel}</span>
</Link>
<Link
href={accountHref}
className="account-btn"