Compare commits
9 Commits
feature/on
...
d9bf729a96
| Author | SHA1 | Date | |
|---|---|---|---|
| d9bf729a96 | |||
| c851272ebe | |||
| f70b93922e | |||
| d49c78b993 | |||
| 8ef00054c9 | |||
| 4b9343a867 | |||
| 114a986205 | |||
| b320501650 | |||
| 7247e8e694 |
@@ -1,8 +1,8 @@
|
||||
<header class="immersive-header" [class.immersive-header--compact]="!showHero()">
|
||||
<div class="immersive-header__backdrop">
|
||||
<div class="ih-backdrop">
|
||||
@if (showHero() && backgroundImageUrl(); as backgroundImage) {
|
||||
<img
|
||||
class="immersive-header__backdrop-image"
|
||||
class="ih-backdrop-image"
|
||||
[src]="backgroundImage"
|
||||
alt=""
|
||||
loading="eager"
|
||||
@@ -12,12 +12,12 @@
|
||||
}
|
||||
</div>
|
||||
|
||||
<div class="immersive-header__content">
|
||||
<div class="ih-content">
|
||||
<nav
|
||||
class="immersive-header__nav container-xl px-3 px-md-4"
|
||||
class="ih-nav container-xl px-3 px-md-4"
|
||||
aria-label="Navegación de la tienda"
|
||||
>
|
||||
<a routerLink="/" class="immersive-header__brand" aria-label="Ir al inicio">
|
||||
<a routerLink="/" class="ih-brand" aria-label="Ir al inicio">
|
||||
@if (logoUrl()) {
|
||||
<img
|
||||
[src]="logoUrl()"
|
||||
@@ -29,12 +29,12 @@
|
||||
}
|
||||
</a>
|
||||
|
||||
<div class="immersive-header__actions">
|
||||
<div class="ih-actions">
|
||||
@if (displaySearchBar()) {
|
||||
<form
|
||||
id="immersive-search"
|
||||
class="immersive-header__search"
|
||||
[class.immersive-header__search--open]="isSearchOpen()"
|
||||
class="ih-search"
|
||||
[class.ih-search--open]="isSearchOpen()"
|
||||
role="search"
|
||||
(submit)="submitSearch($event)"
|
||||
>
|
||||
@@ -48,7 +48,7 @@
|
||||
(valueChange)="showSearchError.set(false)"
|
||||
/>
|
||||
@if (showSearchError()) {
|
||||
<span id="immersive-search-error" class="immersive-header__search-error" role="alert"
|
||||
<span id="immersive-search-error" class="ih-search-error" role="alert"
|
||||
>Ingresá al menos 3 caracteres.</span
|
||||
>
|
||||
}
|
||||
@@ -59,7 +59,7 @@
|
||||
@if (ticketsMenu(); as menu) {
|
||||
<app-button
|
||||
variant="primary"
|
||||
hostClass="immersive-header__tickets"
|
||||
hostClass="ih-tickets"
|
||||
data-testid="store-header-tickets"
|
||||
(click)="ticketsClick.emit()"
|
||||
>
|
||||
@@ -72,7 +72,7 @@
|
||||
<button
|
||||
#searchToggle
|
||||
type="button"
|
||||
class="immersive-header__search-toggle"
|
||||
class="ih-search-toggle"
|
||||
aria-label="Buscar productos"
|
||||
aria-controls="immersive-search"
|
||||
[attr.aria-expanded]="isSearchOpen()"
|
||||
@@ -93,7 +93,7 @@
|
||||
/>
|
||||
}
|
||||
|
||||
<div class="immersive-header__account">
|
||||
<div class="ih-account">
|
||||
<app-icon-button
|
||||
variant="user"
|
||||
ariaLabel="Mi cuenta"
|
||||
@@ -109,7 +109,7 @@
|
||||
(logoutClick)="onLogoutClick()"
|
||||
/>
|
||||
} @else if (isUserDropdownOpen()) {
|
||||
<div id="immersive-user-dropdown" class="immersive-header__guest-menu">
|
||||
<div id="immersive-user-dropdown" class="ih-guest-menu">
|
||||
<button type="button" (click)="isUserDropdownOpen.set(false); loginClick.emit()">
|
||||
Iniciar sesión
|
||||
</button>
|
||||
@@ -121,7 +121,7 @@
|
||||
|
||||
@if (checkoutRemainingTime(); as remainingTime) {
|
||||
<div
|
||||
class="immersive-header__timer container-xl px-3 px-md-4"
|
||||
class="ih-timer container-xl px-3 px-md-4"
|
||||
role="timer"
|
||||
aria-label="Tiempo restante de compra"
|
||||
>
|
||||
@@ -131,10 +131,10 @@
|
||||
|
||||
@if (showHero()) {
|
||||
@if (heroContent(); as content) {
|
||||
<div class="immersive-header__copy">
|
||||
<p class="immersive-header__eyebrow">{{ content.eyebrow }}</p>
|
||||
<h1 class="immersive-header__title">{{ content.title }}</h1>
|
||||
<p class="immersive-header__description">{{ content.description }}</p>
|
||||
<div class="ih-copy">
|
||||
<p class="ih-eyebrow">{{ content.eyebrow }}</p>
|
||||
<h1 class="ih-title">{{ content.title }}</h1>
|
||||
<p class="ih-description">{{ content.description }}</p>
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
background: #f5f5f5;
|
||||
}
|
||||
|
||||
.immersive-header__content {
|
||||
.ih-content {
|
||||
grid-area: 1 / 1;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
@@ -20,7 +20,7 @@
|
||||
padding-bottom: clamp(1rem, 2vw, 1.5rem);
|
||||
}
|
||||
|
||||
.immersive-header__backdrop {
|
||||
.ih-backdrop {
|
||||
grid-area: 1 / 1;
|
||||
position: relative;
|
||||
z-index: 0;
|
||||
@@ -28,7 +28,7 @@
|
||||
background-color: #101010;
|
||||
}
|
||||
|
||||
.immersive-header__backdrop-image {
|
||||
.ih-backdrop-image {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
z-index: 0;
|
||||
@@ -39,8 +39,8 @@
|
||||
object-position: center 42%;
|
||||
}
|
||||
|
||||
.immersive-header__backdrop::before,
|
||||
.immersive-header__backdrop::after {
|
||||
.ih-backdrop::before,
|
||||
.ih-backdrop::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
@@ -48,15 +48,15 @@
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.immersive-header__backdrop::before {
|
||||
.ih-backdrop::before {
|
||||
background: rgba(0, 0, 0, 0.7);
|
||||
}
|
||||
|
||||
.immersive-header__backdrop::after {
|
||||
.ih-backdrop::after {
|
||||
background: linear-gradient(180deg, rgba(0, 0, 0, 0.48) 0%, rgba(0, 0, 0, 0.4) 47%, #f5f5f5 100%);
|
||||
}
|
||||
|
||||
.immersive-header__nav {
|
||||
.ih-nav {
|
||||
position: relative;
|
||||
// Keep the whole navigation stacking context above the hero copy and carousel.
|
||||
// Otherwise those later siblings can sit on top of the dropdown and capture
|
||||
@@ -69,28 +69,28 @@
|
||||
min-height: 2.25rem;
|
||||
}
|
||||
|
||||
.immersive-header__brand {
|
||||
.ih-brand {
|
||||
display: inline-flex;
|
||||
flex: none;
|
||||
align-items: center;
|
||||
}
|
||||
.immersive-header__brand img {
|
||||
.ih-brand img {
|
||||
display: block;
|
||||
width: clamp(105px, 13vw, 145px);
|
||||
max-height: 2.25rem;
|
||||
object-fit: contain;
|
||||
}
|
||||
.immersive-header__actions {
|
||||
.ih-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: clamp(0.35rem, 1vw, 1rem);
|
||||
}
|
||||
|
||||
.immersive-header__search {
|
||||
.ih-search {
|
||||
position: relative;
|
||||
width: clamp(115px, 17vw, 205px);
|
||||
}
|
||||
.immersive-header__search-error {
|
||||
.ih-search-error {
|
||||
position: absolute;
|
||||
top: calc(100% + 0.25rem);
|
||||
right: 0;
|
||||
@@ -99,52 +99,52 @@
|
||||
font-size: 0.7rem;
|
||||
}
|
||||
|
||||
:host ::ng-deep .immersive-header__tickets {
|
||||
:host ::ng-deep .ih-tickets {
|
||||
width: auto;
|
||||
}
|
||||
.immersive-header__account {
|
||||
.ih-account {
|
||||
position: relative;
|
||||
// The nav becomes display: contents on mobile, so it cannot provide the
|
||||
// stacking context there. Keep the dropdown trigger above following rows.
|
||||
z-index: 10;
|
||||
display: flex;
|
||||
}
|
||||
:host ::ng-deep .immersive-header__actions .icon-btn,
|
||||
:host ::ng-deep .immersive-header__actions .cart-icon {
|
||||
:host ::ng-deep .ih-actions .icon-btn,
|
||||
:host ::ng-deep .ih-actions .cart-icon {
|
||||
color: var(--tenant-primary, #ff7006);
|
||||
}
|
||||
|
||||
.immersive-header__copy {
|
||||
.ih-copy {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
margin: clamp(2.1rem, 5vw, 3.25rem) auto 0;
|
||||
padding-inline: 1rem;
|
||||
text-align: center;
|
||||
}
|
||||
.immersive-header__eyebrow,
|
||||
.immersive-header__title {
|
||||
.ih-eyebrow,
|
||||
.ih-title {
|
||||
font-family: 'Smooch', cursive;
|
||||
font-weight: 400;
|
||||
text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
|
||||
}
|
||||
.immersive-header__eyebrow {
|
||||
.ih-eyebrow {
|
||||
margin: 0;
|
||||
font-size: 50px;
|
||||
line-height: 1;
|
||||
}
|
||||
.immersive-header__title {
|
||||
.ih-title {
|
||||
margin: -0.15rem 0 0;
|
||||
font-size: 140px;
|
||||
line-height: 0.7;
|
||||
}
|
||||
.immersive-header__description {
|
||||
.ih-description {
|
||||
margin: 30px 0 0;
|
||||
font-family: 'Gotham Book', sans-serif;
|
||||
font-size: 18px;
|
||||
font-weight: 300;
|
||||
text-shadow: 0 1px 5px rgba(0, 0, 0, 0.6);
|
||||
}
|
||||
.immersive-header__timer {
|
||||
.ih-timer {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
margin-top: 0.75rem;
|
||||
@@ -163,27 +163,27 @@
|
||||
color: #666666;
|
||||
background: transparent;
|
||||
|
||||
.immersive-header__content {
|
||||
.ih-content {
|
||||
padding: 35px 0 36px;
|
||||
}
|
||||
|
||||
.immersive-header__nav {
|
||||
.ih-nav {
|
||||
flex-wrap: nowrap;
|
||||
gap: 0.75rem;
|
||||
min-height: 44px;
|
||||
}
|
||||
|
||||
.immersive-header__brand img {
|
||||
.ih-brand img {
|
||||
width: clamp(92px, 24vw, 145px);
|
||||
}
|
||||
|
||||
.immersive-header__actions {
|
||||
.ih-actions {
|
||||
flex: 0 1 auto;
|
||||
gap: 0.375rem;
|
||||
}
|
||||
}
|
||||
|
||||
.immersive-header__search-toggle {
|
||||
.ih-search-toggle {
|
||||
display: none;
|
||||
flex: none;
|
||||
align-items: center;
|
||||
@@ -203,7 +203,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
.immersive-header__guest-menu {
|
||||
.ih-guest-menu {
|
||||
position: absolute;
|
||||
top: calc(100% + 0.5rem);
|
||||
right: 0;
|
||||
@@ -224,7 +224,7 @@
|
||||
}
|
||||
|
||||
:host ::ng-deep .immersive-header--compact {
|
||||
.immersive-header__tickets {
|
||||
.ih-tickets {
|
||||
flex: none;
|
||||
width: auto;
|
||||
|
||||
@@ -234,58 +234,58 @@
|
||||
}
|
||||
}
|
||||
|
||||
.immersive-header__account .icon-btn {
|
||||
.ih-account .icon-btn {
|
||||
width: 32px;
|
||||
height: 44px;
|
||||
color: #888;
|
||||
}
|
||||
}
|
||||
.immersive-header--compact .immersive-header__backdrop {
|
||||
.immersive-header--compact .ih-backdrop {
|
||||
display: none;
|
||||
}
|
||||
|
||||
:host ::ng-deep .immersive-header--compact .immersive-header__actions .icon-btn,
|
||||
:host ::ng-deep .immersive-header--compact .immersive-header__actions .cart-icon {
|
||||
:host ::ng-deep .immersive-header--compact .ih-actions .icon-btn,
|
||||
:host ::ng-deep .immersive-header--compact .ih-actions .cart-icon {
|
||||
color: #888;
|
||||
}
|
||||
|
||||
@media (max-width: 359.98px) {
|
||||
.immersive-header--compact .immersive-header__nav {
|
||||
.immersive-header--compact .ih-nav {
|
||||
padding-inline: 1rem !important;
|
||||
gap: 0.375rem;
|
||||
}
|
||||
|
||||
.immersive-header--compact .immersive-header__actions {
|
||||
.immersive-header--compact .ih-actions {
|
||||
gap: 0.125rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 600px) {
|
||||
.immersive-header__nav {
|
||||
.ih-nav {
|
||||
flex-wrap: wrap;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
.immersive-header__actions {
|
||||
.ih-actions {
|
||||
flex: 1;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.immersive-header__search {
|
||||
.ih-search {
|
||||
width: clamp(105px, 38vw, 180px);
|
||||
}
|
||||
.immersive-header__copy {
|
||||
.ih-copy {
|
||||
margin-top: 3rem;
|
||||
}
|
||||
.immersive-header__eyebrow {
|
||||
.ih-eyebrow {
|
||||
font-size: clamp(2rem, 8vw, 50px);
|
||||
}
|
||||
.immersive-header__title {
|
||||
.ih-title {
|
||||
font-size: clamp(3rem, 12vw, 5rem);
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 767.98px) {
|
||||
.immersive-header--compact {
|
||||
.immersive-header__search {
|
||||
.ih-search {
|
||||
position: absolute;
|
||||
top: calc(100% + 0.5rem);
|
||||
right: 8vw;
|
||||
@@ -297,17 +297,17 @@
|
||||
box-shadow: 0 4px 16px #0002;
|
||||
}
|
||||
|
||||
.immersive-header__search--open {
|
||||
.ih-search--open {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.immersive-header__search-error {
|
||||
.ih-search-error {
|
||||
position: static;
|
||||
display: block;
|
||||
margin-top: 0.25rem;
|
||||
}
|
||||
|
||||
.immersive-header__search-toggle {
|
||||
.ih-search-toggle {
|
||||
display: inline-flex;
|
||||
}
|
||||
}
|
||||
@@ -315,7 +315,7 @@
|
||||
.immersive-header:not(.immersive-header--compact) {
|
||||
min-height: 0;
|
||||
|
||||
.immersive-header__content {
|
||||
.ih-content {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) auto auto;
|
||||
align-items: center;
|
||||
@@ -324,17 +324,17 @@
|
||||
}
|
||||
|
||||
// Keep one search form while placing it below the hero copy on mobile.
|
||||
.immersive-header__nav,
|
||||
.immersive-header__actions {
|
||||
.ih-nav,
|
||||
.ih-actions {
|
||||
display: contents;
|
||||
}
|
||||
|
||||
.immersive-header__brand {
|
||||
.ih-brand {
|
||||
grid-area: 1 / 1;
|
||||
margin-left: 8vw;
|
||||
}
|
||||
|
||||
.immersive-header__brand img {
|
||||
.ih-brand img {
|
||||
width: clamp(105px, 34vw, 145px);
|
||||
}
|
||||
|
||||
@@ -342,30 +342,30 @@
|
||||
grid-area: 1 / 2;
|
||||
}
|
||||
|
||||
.immersive-header__account {
|
||||
.ih-account {
|
||||
grid-area: 1 / 3;
|
||||
margin-right: calc(8vw - 0.75rem);
|
||||
}
|
||||
|
||||
.immersive-header__timer {
|
||||
.ih-timer {
|
||||
grid-area: 2 / 1 / auto / -1;
|
||||
}
|
||||
|
||||
.immersive-header__copy {
|
||||
.ih-copy {
|
||||
grid-area: 3 / 1 / auto / -1;
|
||||
margin: 1.25rem 0 0;
|
||||
}
|
||||
|
||||
.immersive-header__eyebrow {
|
||||
.ih-eyebrow {
|
||||
font-size: clamp(18px, 5.5vw, 24px);
|
||||
}
|
||||
|
||||
.immersive-header__title {
|
||||
.ih-title {
|
||||
font-size: clamp(40px, 12vw, 56px);
|
||||
line-height: 0.7;
|
||||
}
|
||||
|
||||
.immersive-header__description {
|
||||
.ih-description {
|
||||
margin-top: 30px;
|
||||
font-size: clamp(11px, 3vw, 14px);
|
||||
line-height: 1.5;
|
||||
@@ -373,14 +373,14 @@
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
.immersive-header__search {
|
||||
.ih-search {
|
||||
grid-area: 4 / 1 / auto / -1;
|
||||
width: 74%;
|
||||
max-width: 28rem;
|
||||
margin: 0.5rem auto 0;
|
||||
}
|
||||
|
||||
.immersive-header__search-error {
|
||||
.ih-search-error {
|
||||
right: auto;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
@@ -395,11 +395,11 @@
|
||||
--carousel-offset: -9vw;
|
||||
}
|
||||
|
||||
.immersive-header__backdrop-image {
|
||||
.ih-backdrop-image {
|
||||
object-position: center 42%;
|
||||
}
|
||||
|
||||
.immersive-header__backdrop {
|
||||
.ih-backdrop {
|
||||
// Keep the fade tied to the hero, independent of the content below it.
|
||||
align-self: start;
|
||||
height: 12.5rem;
|
||||
@@ -407,7 +407,7 @@
|
||||
mask-image: linear-gradient(#000 calc(100% - 8px), transparent 100%);
|
||||
}
|
||||
|
||||
.immersive-header__backdrop::after {
|
||||
.ih-backdrop::after {
|
||||
background: linear-gradient(
|
||||
180deg,
|
||||
rgba(0, 0, 0, 0.25) 0%,
|
||||
@@ -420,7 +420,7 @@
|
||||
}
|
||||
|
||||
:host ::ng-deep .immersive-header:not(.immersive-header--compact) {
|
||||
.immersive-header__search .form-control {
|
||||
.ih-search .form-control {
|
||||
min-height: 36px;
|
||||
padding: 0.25rem 2.5rem 0.25rem 0.75rem;
|
||||
border: 1px solid #888;
|
||||
@@ -439,12 +439,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
.immersive-header__search .input-search-icon {
|
||||
.ih-search .input-search-icon {
|
||||
color: #666;
|
||||
right: 0.75rem;
|
||||
}
|
||||
|
||||
.immersive-header__account .icon-btn {
|
||||
.ih-account .icon-btn {
|
||||
min-width: 44px;
|
||||
min-height: 44px;
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
[logoUrl]="tenant()?.footer_logo ?? null"
|
||||
[backgroundImageUrl]="tenant()?.footer_bg_image ?? null"
|
||||
[storeName]="tenant()?.nombre ?? null"
|
||||
[address]="tenant()?.address ?? null"
|
||||
[address]="tenant()?.main_address?.address_text ?? null"
|
||||
[phone]="tenant()?.phone ?? null"
|
||||
(logoutClick)="onLogoutClick()"
|
||||
/>
|
||||
|
||||
@@ -35,6 +35,7 @@ const tenant: Tenant = {
|
||||
nombre: 'Test Tenant',
|
||||
dominio: 'localhost',
|
||||
address: 'Calle Test 123, Rosario',
|
||||
main_address: { id: 1, label: 'Principal', address_text: 'Calle Test 123, Rosario', latitude: null, longitude: null },
|
||||
phone: '+54 341 555 1234',
|
||||
primary_color: '#6376F3',
|
||||
secondary_color: '#A0A0A0',
|
||||
@@ -274,21 +275,21 @@ describe('StoreLayoutComponent', () => {
|
||||
expect(header.componentInstance.headerType()).toBe('immersive');
|
||||
expect(element.querySelector('app-standard-store-header')).toBeNull();
|
||||
expect(element.querySelector('app-immersive-store-header')).not.toBeNull();
|
||||
expect(element.querySelector('.immersive-header__eyebrow')?.textContent).toContain(
|
||||
expect(element.querySelector('.ih-eyebrow')?.textContent).toContain(
|
||||
'Encendé tu',
|
||||
);
|
||||
expect(element.querySelector('.immersive-header__title')?.textContent).toContain('experiencia');
|
||||
expect(element.querySelector('.immersive-header__description')?.textContent).toContain(
|
||||
expect(element.querySelector('.ih-title')?.textContent).toContain('experiencia');
|
||||
expect(element.querySelector('.ih-description')?.textContent).toContain(
|
||||
'Reservá tu entrada',
|
||||
);
|
||||
const backdropImage = element.querySelector<HTMLImageElement>(
|
||||
'.immersive-header__backdrop-image',
|
||||
'.ih-backdrop-image',
|
||||
);
|
||||
expect(backdropImage?.getAttribute('src')).toBe(tenant.header_bg_image);
|
||||
expect(backdropImage?.getAttribute('loading')).toBe('eager');
|
||||
expect(backdropImage?.getAttribute('fetchpriority')).toBe('high');
|
||||
expect(backdropImage?.getAttribute('decoding')).toBe('async');
|
||||
const headerLogo = element.querySelector<HTMLImageElement>('.immersive-header__brand img');
|
||||
const headerLogo = element.querySelector<HTMLImageElement>('.ih-brand img');
|
||||
expect(headerLogo?.getAttribute('loading')).toBe('eager');
|
||||
expect(headerLogo?.getAttribute('fetchpriority')).toBe('high');
|
||||
expect(headerLogo?.getAttribute('decoding')).toBe('async');
|
||||
@@ -563,6 +564,21 @@ describe('StoreLayoutComponent', () => {
|
||||
);
|
||||
});
|
||||
|
||||
it('uses only the main address in the footer', () => {
|
||||
tenantState.set({ ...tenant, main_address: {
|
||||
id: 10, label: 'Principal', address_text: 'Sede principal 456', latitude: null, longitude: null,
|
||||
} });
|
||||
const fixture = TestBed.createComponent(StoreLayoutComponent);
|
||||
fixture.detectChanges();
|
||||
const footer = fixture.nativeElement.querySelector('app-store-footer') as HTMLElement;
|
||||
expect(footer.textContent).toContain('Sede principal 456');
|
||||
expect(footer.textContent).not.toContain(tenant.address);
|
||||
tenantState.set({ ...tenant, main_address: null });
|
||||
fixture.detectChanges();
|
||||
expect(footer.textContent).not.toContain('Sede principal 456');
|
||||
expect(footer.textContent).not.toContain(tenant.address);
|
||||
});
|
||||
|
||||
it('navigates to search results when the search button is clicked', () => {
|
||||
const router = TestBed.inject(Router);
|
||||
vi.spyOn(router, 'navigate');
|
||||
|
||||
11
src/app/core/services/address.interface.ts
Normal file
11
src/app/core/services/address.interface.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
export interface Address {
|
||||
id: number;
|
||||
label: string;
|
||||
address_text: string;
|
||||
latitude: number | null;
|
||||
longitude: number | null;
|
||||
}
|
||||
|
||||
export interface TenantAddress extends Address {
|
||||
is_main: boolean;
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
import { ApiPaginatedResponse } from '../api-paginated-response.interface';
|
||||
import { Address } from '../address.interface';
|
||||
|
||||
export interface StoreEvent {
|
||||
id: number;
|
||||
@@ -8,6 +9,7 @@ export interface StoreEvent {
|
||||
subtitle: string | null;
|
||||
description: string | null;
|
||||
location: string | null;
|
||||
address?: Address | null;
|
||||
exact_location: { latitude: number; longitude: number } | null;
|
||||
date_text: string | null;
|
||||
start_time?: string | null;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { ApiResponse } from './api-response.interface';
|
||||
import { Address, TenantAddress } from './address.interface';
|
||||
|
||||
export type CartEditingPolicyCode = 'disabled' | 'quantity_and_remove' | 'full';
|
||||
|
||||
@@ -69,13 +70,14 @@ export interface TenantEvent {
|
||||
subtitle: string | null;
|
||||
description: string | null;
|
||||
location: string | null;
|
||||
address?: Address | null;
|
||||
date_text: string | null;
|
||||
dates: ActiveEventDate[];
|
||||
social_media: SocialMedia[];
|
||||
}
|
||||
|
||||
export interface WebsiteExtras {
|
||||
carousel?: string[];
|
||||
carousel?: (string | { desktop: string; mobile: string })[];
|
||||
immersiveHeroCarousel?: string[];
|
||||
immersiveHero?: {
|
||||
eyebrow: string;
|
||||
@@ -121,6 +123,8 @@ export interface Tenant {
|
||||
site_title?: string | null;
|
||||
asset_url?: string | null;
|
||||
address?: string | null;
|
||||
addresses?: TenantAddress[];
|
||||
main_address?: Address | null;
|
||||
phone?: string | null;
|
||||
favicon?: string | null;
|
||||
primary_color: string;
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
@if (event().date_text) {
|
||||
<p class="event-card__meta"><i class="fa-regular fa-calendar" aria-hidden="true"></i>{{ event().date_text }}</p>
|
||||
}
|
||||
@if (event().location) {
|
||||
<p class="event-card__meta"><i class="fa-solid fa-location-dot" aria-hidden="true"></i>{{ event().location }}</p>
|
||||
@if (event().address?.address_text; as location) {
|
||||
<p class="event-card__meta"><i class="fa-solid fa-location-dot" aria-hidden="true"></i>{{ location }}</p>
|
||||
}
|
||||
</div>
|
||||
</a>
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
{{ item.date_text }}@if (item.dates?.length === 1 && item.start_time) { · {{ item.start_time.slice(0, 5) }} h }
|
||||
</p>
|
||||
}
|
||||
@if (item.location) {
|
||||
<p><i class="fa-solid fa-location-dot" aria-hidden="true"></i>{{ item.location }}</p>
|
||||
@if (item.address?.address_text; as location) {
|
||||
<p><i class="fa-solid fa-location-dot" aria-hidden="true"></i>{{ location }}</p>
|
||||
}
|
||||
</div>
|
||||
</header>
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
import { signal } from '@angular/core';
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { ActivatedRoute, convertToParamMap, provideRouter } from '@angular/router';
|
||||
import { of } from 'rxjs';
|
||||
import { beforeEach, describe, expect, it } from 'vitest';
|
||||
|
||||
import { AuthService } from '../../../../core/services/auth/auth.service';
|
||||
import { CheckoutService } from '../../../../core/services/checkout.service';
|
||||
import { StoreEvent } from '../../../../core/services/event/event.interface';
|
||||
import { EventService } from '../../../../core/services/event/event.service';
|
||||
import { TenantService } from '../../../../core/services/tenant.service';
|
||||
import { ToastService } from '../../../../core/services/toast.service';
|
||||
import { LocationMapComponent } from '../../../../shared/components/location-map/location-map.component';
|
||||
import { EventDetailPageComponent } from './event-detail-page.component';
|
||||
|
||||
const event: StoreEvent = {
|
||||
id: 1, slug: 'festival', title: 'Festival', event_category_id: null,
|
||||
subtitle: null, description: null, location: 'Ubicación anterior',
|
||||
exact_location: { latitude: 10, longitude: 20 }, date_text: null,
|
||||
attachment_id: null, image: null,
|
||||
address: { id: 20, label: 'Predio', address_text: 'Dirección del evento 123', latitude: 0, longitude: -60 },
|
||||
};
|
||||
|
||||
describe('EventDetailPageComponent address', () => {
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
imports: [EventDetailPageComponent],
|
||||
providers: [
|
||||
provideRouter([]),
|
||||
{ provide: ActivatedRoute, useValue: { paramMap: of(convertToParamMap({ slug: 'festival' })) } },
|
||||
{ provide: EventService, useValue: { get: () => of({ data: event }) } },
|
||||
{ provide: AuthService, useValue: {} },
|
||||
{ provide: CheckoutService, useValue: {} },
|
||||
{ provide: TenantService, useValue: { tenant: signal(null) } },
|
||||
{ provide: ToastService, useValue: {} },
|
||||
],
|
||||
}).compileComponents();
|
||||
});
|
||||
|
||||
it('uses the event address for its text and map including zero coordinates', () => {
|
||||
const fixture = TestBed.createComponent(EventDetailPageComponent);
|
||||
fixture.detectChanges();
|
||||
expect(fixture.nativeElement.textContent).toContain('Dirección del evento 123');
|
||||
expect(fixture.nativeElement.textContent).not.toContain('Ubicación anterior');
|
||||
const map = fixture.debugElement.query(By.directive(LocationMapComponent)).componentInstance as LocationMapComponent;
|
||||
expect(map.locations).toEqual([{ id: 20, label: 'Predio', latitude: 0, longitude: -60, address: 'Dirección del evento 123' }]);
|
||||
});
|
||||
|
||||
it('shows address text without using old map coordinates when the new address has none', () => {
|
||||
TestBed.overrideProvider(EventService, { useValue: { get: () => of({ data: {
|
||||
...event, address: { ...event.address!, latitude: null, longitude: null },
|
||||
} }) } });
|
||||
const fixture = TestBed.createComponent(EventDetailPageComponent);
|
||||
fixture.detectChanges();
|
||||
expect(fixture.nativeElement.textContent).toContain('Dirección del evento 123');
|
||||
expect(fixture.nativeElement.querySelector('app-location-map')).toBeNull();
|
||||
});
|
||||
|
||||
it('does not use old location fields when the event has no address', () => {
|
||||
TestBed.overrideProvider(EventService, { useValue: { get: () => of({ data: { ...event, address: null } }) } });
|
||||
const fixture = TestBed.createComponent(EventDetailPageComponent);
|
||||
fixture.detectChanges();
|
||||
expect(fixture.nativeElement.textContent).not.toContain('Ubicación anterior');
|
||||
expect(fixture.nativeElement.querySelector('app-location-map')).toBeNull();
|
||||
});
|
||||
});
|
||||
@@ -41,15 +41,15 @@ export class EventDetailPageComponent {
|
||||
protected readonly submitting = signal(false);
|
||||
protected readonly mapLocations = computed<MapLocation[]>(() => {
|
||||
const event = this.event();
|
||||
const coordinates = event?.exact_location;
|
||||
if (!event || !coordinates) return [];
|
||||
const address = event?.address;
|
||||
if (!event || !address || address.latitude === null || address.longitude === null) return [];
|
||||
|
||||
return [{
|
||||
id: event.id,
|
||||
label: event.title,
|
||||
latitude: coordinates.latitude,
|
||||
longitude: coordinates.longitude,
|
||||
address: event.location ?? undefined,
|
||||
id: address.id,
|
||||
label: address.label,
|
||||
latitude: address.latitude,
|
||||
longitude: address.longitude,
|
||||
address: address.address_text,
|
||||
}];
|
||||
});
|
||||
protected readonly total = computed(() => (this.event()?.catalog_items ?? []).reduce((sum, product) => {
|
||||
|
||||
@@ -19,6 +19,11 @@ const tenant: Tenant = {
|
||||
header_logo: '',
|
||||
footer_logo: '',
|
||||
categories: [],
|
||||
addresses: [
|
||||
{ id: 1, label: 'Gigante de Arroyito', address_text: 'Av. Génova 640, Rosario', latitude: -32.913997, longitude: -60.674567, is_main: true },
|
||||
{ id: 2, label: 'Telepagos', address_text: 'Rioja 1150, piso 12, dpto. 3, Rosario', latitude: -32.94682, longitude: -60.63932, is_main: false },
|
||||
{ id: 3, label: 'San Martín 2450', address_text: 'San Martín 2450, Santa Fe', latitude: -31.63333, longitude: -60.7, is_main: false },
|
||||
],
|
||||
menues: [
|
||||
{
|
||||
id: 1,
|
||||
@@ -78,15 +83,17 @@ const tenant: Tenant = {
|
||||
|
||||
describe('ContactPage', () => {
|
||||
let fixture: ComponentFixture<ContactPage>;
|
||||
let tenantState = signal<Tenant | null>(tenant);
|
||||
|
||||
beforeEach(async () => {
|
||||
tenantState = signal<Tenant | null>(tenant);
|
||||
await TestBed.configureTestingModule({
|
||||
imports: [ContactPage],
|
||||
providers: [
|
||||
{
|
||||
provide: TenantService,
|
||||
useValue: {
|
||||
tenant: signal<Tenant | null>(tenant).asReadonly(),
|
||||
tenant: tenantState.asReadonly(),
|
||||
},
|
||||
},
|
||||
],
|
||||
@@ -112,11 +119,11 @@ describe('ContactPage', () => {
|
||||
expect(element.querySelector('.contact-page__addresses')?.textContent).toContain(
|
||||
'Av. Génova 640, Rosario',
|
||||
);
|
||||
expect(element.querySelector('.contact-page__addresses')?.textContent).toContain(
|
||||
expect(element.textContent).toContain(
|
||||
'Rioja 1150, piso 12, dpto. 3, Rosario',
|
||||
);
|
||||
expect(element.textContent).not.toContain('Santa Fe');
|
||||
expect(element.textContent).not.toContain('San Martín 2450');
|
||||
expect(element.textContent).toContain('Santa Fe');
|
||||
expect(element.textContent).toContain('San Martín 2450');
|
||||
});
|
||||
|
||||
it('passes the tenant map coordinates to the reusable map component', () => {
|
||||
@@ -129,12 +136,41 @@ describe('ContactPage', () => {
|
||||
|
||||
expect(map).not.toBeNull();
|
||||
expect(map?.getAttribute('mapstyle')).toBe('standard');
|
||||
expect(accessibleLocations).toHaveLength(2);
|
||||
expect(accessibleLocations).toHaveLength(3);
|
||||
expect(map?.textContent).toContain('Gigante de Arroyito');
|
||||
expect(map?.textContent).toContain('Telepagos');
|
||||
expect(map?.textContent).toContain('Av. Génova 640, Rosario');
|
||||
expect(map?.textContent).toContain('Rioja 1150, piso 12, dpto. 3, Rosario');
|
||||
expect(directionsLinks).toHaveLength(2);
|
||||
expect(map?.textContent).not.toContain('San Martín 2450');
|
||||
expect(directionsLinks).toHaveLength(3);
|
||||
expect(map?.textContent).toContain('San Martín 2450');
|
||||
});
|
||||
|
||||
it('shows every canonical address and maps only addresses with coordinates', () => {
|
||||
tenantState.set({ ...tenant, addresses: [
|
||||
{ id: 10, label: 'Principal', address_text: 'Nueva sede 123', latitude: 0, longitude: 0, is_main: true },
|
||||
{ id: 11, label: 'Sucursal sin mapa', address_text: 'Otra calle 456', latitude: null, longitude: null, is_main: false },
|
||||
{ id: 12, label: 'Otra ciudad', address_text: 'Tercera 789', latitude: -31, longitude: -60, is_main: false },
|
||||
] });
|
||||
fixture.detectChanges();
|
||||
const element = fixture.nativeElement as HTMLElement;
|
||||
expect(element.textContent).toContain('Nueva sede 123');
|
||||
expect(element.textContent).toContain('Otra calle 456');
|
||||
expect(element.textContent).toContain('Tercera 789');
|
||||
expect(element.textContent).not.toContain('Av. Génova 640');
|
||||
expect(element.querySelectorAll('.contact-page__location')).toHaveLength(3);
|
||||
expect(element.querySelectorAll('app-location-map .visually-hidden li')).toHaveLength(2);
|
||||
});
|
||||
|
||||
it('does not restore old menu addresses when the canonical list is empty', () => {
|
||||
tenantState.set({ ...tenant, addresses: [] });
|
||||
fixture.detectChanges();
|
||||
expect(fixture.nativeElement.querySelectorAll('.contact-page__location')).toHaveLength(0);
|
||||
expect(fixture.nativeElement.querySelector('app-location-map')).toBeNull();
|
||||
});
|
||||
|
||||
it('does not read old menu addresses when the address list is absent', () => {
|
||||
tenantState.set({ ...tenant, addresses: undefined });
|
||||
fixture.detectChanges();
|
||||
expect(fixture.nativeElement.querySelectorAll('.contact-page__location')).toHaveLength(0);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -18,7 +18,7 @@ type ContactAddress = {
|
||||
id: string;
|
||||
label: string;
|
||||
address: string;
|
||||
coordinates: [number, number];
|
||||
coordinates: [number, number] | null;
|
||||
};
|
||||
|
||||
type ContactContent = {
|
||||
@@ -54,91 +54,40 @@ export class ContactPage {
|
||||
}
|
||||
|
||||
private parseContactContent(value: unknown): ContactContent {
|
||||
const empty: ContactContent = {
|
||||
whatsappUrl: null,
|
||||
whatsappLabel: null,
|
||||
phone: null,
|
||||
locations: [],
|
||||
mapLocations: [],
|
||||
};
|
||||
|
||||
if (!this.isRecord(value)) {
|
||||
return empty;
|
||||
}
|
||||
|
||||
const whatsapp = this.isRecord(value['whatsapp']) ? value['whatsapp'] : null;
|
||||
const locations = this.parseLocations(value['locations']).slice(0, 1);
|
||||
const content = this.isRecord(value) ? value : {};
|
||||
const whatsapp = this.isRecord(content['whatsapp']) ? content['whatsapp'] : null;
|
||||
const addresses = this.tenantService.tenant()?.addresses ?? [];
|
||||
const locations: ContactLocation[] = addresses.map((address) => ({
|
||||
id: String(address.id),
|
||||
label: address.label,
|
||||
addresses: [{
|
||||
id: String(address.id),
|
||||
label: address.label,
|
||||
address: address.address_text,
|
||||
coordinates: address.latitude !== null && address.longitude !== null
|
||||
? [address.latitude, address.longitude] : null,
|
||||
}],
|
||||
}));
|
||||
|
||||
return {
|
||||
whatsappUrl: whatsapp ? this.stringValue(whatsapp['whatsapp_url']) : null,
|
||||
whatsappLabel: whatsapp ? this.stringValue(whatsapp['whatsapp_label']) : null,
|
||||
phone: this.stringValue(value['phone']),
|
||||
phone: this.stringValue(content['phone']) ?? this.tenantService.tenant()?.phone ?? null,
|
||||
locations,
|
||||
mapLocations: locations.flatMap((location) =>
|
||||
location.addresses.map(
|
||||
(address): MapLocation => ({
|
||||
location.addresses.flatMap(
|
||||
(address): MapLocation[] => address.coordinates === null ? [] : [{
|
||||
id: address.id,
|
||||
label: address.label,
|
||||
latitude: address.coordinates[0],
|
||||
longitude: address.coordinates[1],
|
||||
address: address.address,
|
||||
}),
|
||||
}],
|
||||
),
|
||||
),
|
||||
};
|
||||
}
|
||||
|
||||
private parseLocations(value: unknown): ContactLocation[] {
|
||||
return this.recordEntries(value).flatMap(([id, item]): ContactLocation[] => {
|
||||
if (!this.isRecord(item)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
const label = this.stringValue(item['label']);
|
||||
const addresses: ContactAddress[] = Array.isArray(item['addresses'])
|
||||
? item['addresses'].flatMap((address, index): ContactAddress[] => {
|
||||
if (!this.isRecord(address)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
const addressLabel = this.stringValue(address['label']);
|
||||
const addressText = this.stringValue(address['address']);
|
||||
const coordinates = address['coordinates'];
|
||||
|
||||
if (
|
||||
!addressLabel ||
|
||||
!addressText ||
|
||||
!Array.isArray(coordinates) ||
|
||||
coordinates.length !== 2 ||
|
||||
typeof coordinates[0] !== 'number' ||
|
||||
typeof coordinates[1] !== 'number'
|
||||
) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return [
|
||||
{
|
||||
id: `${id}-${index}`,
|
||||
label: addressLabel,
|
||||
address: addressText,
|
||||
coordinates: [coordinates[0], coordinates[1]],
|
||||
},
|
||||
];
|
||||
})
|
||||
: [];
|
||||
|
||||
return label && addresses.length > 0 ? [{ id, label, addresses }] : [];
|
||||
});
|
||||
}
|
||||
|
||||
private recordEntries(value: unknown): [string, unknown][] {
|
||||
if (Array.isArray(value)) {
|
||||
return value.map((item, index) => [String(index), item]);
|
||||
}
|
||||
|
||||
return this.isRecord(value) ? Object.entries(value) : [];
|
||||
}
|
||||
|
||||
private stringValue(value: unknown): string | null {
|
||||
return typeof value === 'string' && value.trim() ? value.trim() : null;
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ export class StoreHomePageComponent implements OnInit, OnDestroy {
|
||||
return {
|
||||
id: event.id,
|
||||
title: event.title,
|
||||
location: event.location,
|
||||
location: event.address?.address_text ?? null,
|
||||
dates_text: event.date_text,
|
||||
dates: event.dates.map((eventDate) => ({
|
||||
id: eventDate.id,
|
||||
|
||||
@@ -12,18 +12,21 @@
|
||||
>
|
||||
<div class="main-carousel__viewport" aria-live="off">
|
||||
@for (image of images(); track $index; let index = $index) {
|
||||
<img
|
||||
class="main-carousel__image"
|
||||
[class.main-carousel__image--active]="index === activeIndex()"
|
||||
[attr.src]="imageSource(image, index)"
|
||||
[alt]="imageAlt(index)"
|
||||
[attr.aria-hidden]="index === activeIndex() ? null : 'true'"
|
||||
loading="eager"
|
||||
[attr.fetchpriority]="index === activeIndex() ? 'high' : 'low'"
|
||||
draggable="false"
|
||||
(load)="handleImageLoad(index)"
|
||||
(error)="handleImageError(index)"
|
||||
/>
|
||||
<picture>
|
||||
<source media="(max-width: 576px)" [attr.srcset]="mobileImageSource(image, index)" />
|
||||
<img
|
||||
class="main-carousel__image"
|
||||
[class.main-carousel__image--active]="index === activeIndex()"
|
||||
[attr.src]="imageSource(image, index)"
|
||||
[alt]="imageAlt(index)"
|
||||
[attr.aria-hidden]="index === activeIndex() ? null : 'true'"
|
||||
loading="eager"
|
||||
[attr.fetchpriority]="index === activeIndex() ? 'high' : 'low'"
|
||||
draggable="false"
|
||||
(load)="handleImageLoad(index)"
|
||||
(error)="handleImageError(index)"
|
||||
/>
|
||||
</picture>
|
||||
}
|
||||
</div>
|
||||
|
||||
|
||||
@@ -17,9 +17,7 @@
|
||||
&__viewport {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
aspect-ratio: 4 / 1;
|
||||
min-height: 9rem;
|
||||
max-height: 25rem;
|
||||
aspect-ratio: 355 / 90;
|
||||
}
|
||||
|
||||
&__image {
|
||||
|
||||
@@ -18,12 +18,20 @@ class TestHostComponent {
|
||||
readonly images = ['/images/one.webp', '/images/two.webp', '/images/three.webp'];
|
||||
}
|
||||
|
||||
@Component({
|
||||
imports: [MainCarouselComponent],
|
||||
template: `<app-main-carousel [images]="images" />`,
|
||||
})
|
||||
class ResponsiveTestHostComponent {
|
||||
readonly images = [{ desktop: '/images/desktop.webp', mobile: '/images/mobile.webp' }];
|
||||
}
|
||||
|
||||
describe('MainCarouselComponent', () => {
|
||||
let fixture: ComponentFixture<TestHostComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
imports: [TestHostComponent],
|
||||
imports: [TestHostComponent, ResponsiveTestHostComponent],
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(TestHostComponent);
|
||||
@@ -41,6 +49,19 @@ describe('MainCarouselComponent', () => {
|
||||
expect(images[0].classList).toContain('main-carousel__image--active');
|
||||
});
|
||||
|
||||
it('usa la variante móvil del crop cuando está disponible', () => {
|
||||
const responsiveFixture = TestBed.createComponent(ResponsiveTestHostComponent);
|
||||
responsiveFixture.detectChanges();
|
||||
|
||||
const picture = responsiveFixture.nativeElement.querySelector('picture') as HTMLPictureElement;
|
||||
const source = picture.querySelector('source') as HTMLSourceElement;
|
||||
const image = picture.querySelector('img') as HTMLImageElement;
|
||||
|
||||
expect(source.getAttribute('media')).toBe('(max-width: 576px)');
|
||||
expect(source.getAttribute('srcset')).toBe('/images/mobile.webp');
|
||||
expect(image.getAttribute('src')).toBe('/images/desktop.webp');
|
||||
});
|
||||
|
||||
it('carga las imágenes secuencialmente y prioriza la imagen visible', () => {
|
||||
const images = fixture.nativeElement.querySelectorAll(
|
||||
'.main-carousel__image',
|
||||
|
||||
@@ -11,6 +11,9 @@ import {
|
||||
signal,
|
||||
} from '@angular/core';
|
||||
import { isPlatformBrowser } from '@angular/common';
|
||||
import type { WebsiteExtras } from '../../../core/services/tenant.interface';
|
||||
|
||||
type CarouselImage = NonNullable<WebsiteExtras['carousel']>[number];
|
||||
|
||||
@Component({
|
||||
selector: 'app-main-carousel',
|
||||
@@ -26,7 +29,7 @@ export class MainCarouselComponent {
|
||||
private readonly settledIndexes = signal<ReadonlySet<number>>(new Set());
|
||||
private firstImageReadyEmitted = false;
|
||||
|
||||
readonly images = input.required<readonly string[]>();
|
||||
readonly images = input.required<readonly CarouselImage[]>();
|
||||
readonly imageAlts = input<readonly string[]>([]);
|
||||
readonly autoSlideInterval = input(5000);
|
||||
readonly ariaLabel = input('Imágenes destacadas');
|
||||
@@ -91,13 +94,21 @@ export class MainCarouselComponent {
|
||||
this.paused.set(paused);
|
||||
}
|
||||
|
||||
protected imageSource(image: string, index: number): string | null {
|
||||
protected imageSource(image: CarouselImage, index: number): string | null {
|
||||
const shouldLoad =
|
||||
this.loadedIndexes().has(index) ||
|
||||
index === this.sequentialLoadIndex() ||
|
||||
index === this.activeIndex();
|
||||
|
||||
return shouldLoad ? image : null;
|
||||
return shouldLoad ? (typeof image === 'string' ? image : image.desktop) : null;
|
||||
}
|
||||
|
||||
protected mobileImageSource(image: CarouselImage, index: number): string | null {
|
||||
if (typeof image === 'string' || this.imageSource(image, index) === null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return image.mobile;
|
||||
}
|
||||
|
||||
protected handleImageLoad(index: number): void {
|
||||
|
||||
@@ -11,6 +11,11 @@
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
h2.simple-modal__content {
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.simple-modal__actions {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
z-index: 1500;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.5rem;
|
||||
gap: 0.25rem;
|
||||
pointer-events: none;
|
||||
width: 90vw;
|
||||
max-width: 800px;
|
||||
@@ -43,4 +43,4 @@
|
||||
opacity: 1;
|
||||
transform: translateY(0) scale(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user