consolidate all external links through external_link component
All checks were successful
deploy / deploy (push) Successful in 1m32s
All checks were successful
deploy / deploy (push) Successful in 1m32s
Add icon={false} option to external_link for links with their own
visual indicator. Migrate remaining manual target="_blank" links:
email settings adapter links, product show provider edit, card radio
links, social link cards/icons, page renderer tracking and video
fallback. Every external link in the codebase now goes through the
single component — one place to change rel, target, or sr-only text.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -268,16 +268,15 @@ defmodule BerrypodWeb.Admin.EmailSettings do
|
||||
<div>
|
||||
<h3 class="admin-section-subheading">
|
||||
{adapter.name}
|
||||
<a
|
||||
<.external_link
|
||||
:if={adapter.url}
|
||||
href={adapter.url}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
icon={false}
|
||||
class="admin-link-subtle admin-adapter-link"
|
||||
aria-label={adapter.name <> " website (opens in new tab)"}
|
||||
aria-label={adapter.name <> " website"}
|
||||
>
|
||||
↗
|
||||
</a>
|
||||
</.external_link>
|
||||
</h3>
|
||||
<p class="admin-section-desc">{adapter.description}</p>
|
||||
</div>
|
||||
|
||||
@@ -98,17 +98,15 @@ defmodule BerrypodWeb.Admin.ProductShow do
|
||||
<.status_badge status={@product.status} />
|
||||
</div>
|
||||
<:actions>
|
||||
<.link
|
||||
<.external_link
|
||||
:if={provider_edit_url(@product)}
|
||||
href={provider_edit_url(@product)}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
icon={false}
|
||||
class="admin-btn admin-btn-ghost admin-btn-sm"
|
||||
>
|
||||
Edit on {provider_label(@product)}
|
||||
<.icon name="hero-arrow-top-right-on-square-mini" class="size-4" />
|
||||
<span class="sr-only">(opens in new tab)</span>
|
||||
</.link>
|
||||
</.external_link>
|
||||
<.link
|
||||
navigate={~p"/products/#{@product.slug}"}
|
||||
class="admin-btn admin-btn-ghost admin-btn-sm"
|
||||
|
||||
Reference in New Issue
Block a user