Zmiany w modalach

This commit is contained in:
dm
2025-12-13 11:24:30 +01:00
parent 4655554ff2
commit 99b83b7773
3 changed files with 44 additions and 3 deletions

View File

@@ -133,7 +133,7 @@ function JamboxPackageCard({ pkg, onShowChannels, onConfigureAddons }) {
const hasPrice = basePrice != null;
return (
<div class="f-card">
<div class="f-card" id={`pkg-${pkg.id}`} data-pkgid={pkg.id}>
<div class="f-card-header">
<div class="f-card-name">{pkg.name}</div>

View File

@@ -61,6 +61,17 @@ export default function JamboxChannelsSearch() {
return `Znaleziono: ${items.length}`;
}, [q, loading, err, items]);
function scrollToPackage(packageId) {
const el = document.getElementById(`pkg-${packageId}`);
if (!el) return;
el.scrollIntoView({ behavior: "smooth", block: "start" });
el.classList.add("is-target");
setTimeout(() => el.classList.remove("is-target"), 1200);
}
return (
<div class="fuz-chsearch">
<h1 class="f-section-title">Wyszukiwanie kanałów w pakietach telewizji</h1>
@@ -114,11 +125,21 @@ export default function JamboxChannelsSearch() {
<div class="fuz-chsearch__packages">
Dostępny w:&nbsp;
{c.packages.map((p, i) => (
<span class="fuz-chsearch__pkg" key={p.id}>
// <span class="fuz-chsearch__pkg" key={p.id}>
// {p.name}{" "}
// <span class="fuz-chsearch__pkgnum">(kanał {p.number})</span>
// {i < c.packages.length - 1 ? ", " : ""}
// </span>
<button
type="button"
class="fuz-chsearch__pkg"
key={p.id}
onClick={() => scrollToPackage(p.id)}
>
{p.name}{" "}
<span class="fuz-chsearch__pkgnum">(kanał {p.number})</span>
{i < c.packages.length - 1 ? ", " : ""}
</span>
</button>
))}
</div>
)}

View File

@@ -323,4 +323,24 @@ obszar ze scrollem wewnątrz modala
font-size: 0.85rem;
opacity: 0.75;
margin-bottom: 0.5rem;
}
.f-card.is-target {
outline: 2px solid rgba(59, 130, 246, 0.55);
/* var(--f-link); */
outline-offset: 4px;
}
.fuz-chsearch__pkg {
background: transparent;
border: 0;
padding: 0;
cursor: pointer;
font: inherit;
color: var(--f-link, var(--f-link));
text-decoration: underline;
}
.fuz-chsearch__pkg:hover {
text-decoration-thickness: 2px;
}