fix(web): keep the dedicated-environment link on a custom Cloud banner (#2760)

* fix(web): keep the dedicated-environment link on a custom Cloud banner

The Cloud banner can carry per-language copy, but the custom-copy branch
rendered that text alone: everything else in the banner swaps the built-in
message for an override so the operator can say what is actually happening,
and doing so silently dropped the link to the dedicated environment -- the only
destination that turns a warning into an upgrade.

Render the dedicated link after the override when show_links is on, using new
cta_dedicated copy in every locale so the second half of the sentence reads as
a call to action rather than repeating the environment name.

* test(web): expect the new banner CTA copy in every locale
This commit is contained in:
RockChinQ
2026-10-23 11:43:15 +08:00
committed by GitHub
parent c538e696b2
commit 39645cdd84
10 changed files with 22 additions and 1 deletions
+13 -1
View File
@@ -178,7 +178,19 @@ export function CloudBanner() {
<div className="flex w-full items-start gap-3">
<span className="flex-1">
{customCopy ? (
customCopy
<>
{customCopy}{' '}
{banner.show_links && (
<a
href={banner.dedicated_url}
target="_blank"
rel="noopener noreferrer"
className="font-medium underline hover:opacity-80"
>
{t('cloud_banner.cta_dedicated')}
</a>
)}
</>
) : (
<>
{t('cloud_banner.message')}{' '}