Compare commits
4 Commits
23a5ac32cc
...
caa1fddcc1
| Author | SHA1 | Date | |
|---|---|---|---|
| caa1fddcc1 | |||
| 5f0c99c395 | |||
| 832fad19bc | |||
| 28ed5d71b2 |
@@ -150,7 +150,7 @@
|
|||||||
<div class="store-layout__category-menu">
|
<div class="store-layout__category-menu">
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
class="btn btn-link d-inline-flex align-items-center gap-2 px-0 py-2 text-uppercase fw-bold text-decoration-none store-layout__category-trigger"
|
class="btn btn-link d-inline-flex align-items-center gap-2 px-0 py-3 text-uppercase fw-bold text-decoration-none store-layout__category-trigger"
|
||||||
aria-label="Categorias"
|
aria-label="Categorias"
|
||||||
aria-controls="store-category-dropdown"
|
aria-controls="store-category-dropdown"
|
||||||
[attr.aria-expanded]="isCategoryDropdownOpen()"
|
[attr.aria-expanded]="isCategoryDropdownOpen()"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.store-layout__header {
|
.store-layout__header {
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
background-color: transparent;
|
background-color: var(--tenant-header-bg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.store-layout__header-main {
|
.store-layout__header-main {
|
||||||
|
|||||||
@@ -72,13 +72,13 @@ describe('AuthService', () => {
|
|||||||
expect(service.token()).toBe('plain-text-token');
|
expect(service.token()).toBe('plain-text-token');
|
||||||
expect(service.user()?.email).toBe('ada@example.com');
|
expect(service.user()?.email).toBe('ada@example.com');
|
||||||
expect(service.isAuthenticated()).toBe(true);
|
expect(service.isAuthenticated()).toBe(true);
|
||||||
expect(cookieStore['shopit.auth.token']).toBe('plain-text-token');
|
expect(cookieStore['shopit.front.auth.token']).toBe('plain-text-token');
|
||||||
|
|
||||||
httpController.verify();
|
httpController.verify();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('hydrates token from cookies and loads the current user during bootstrap', async () => {
|
it('hydrates token from cookies and loads the current user during bootstrap', async () => {
|
||||||
cookieStore['shopit.auth.token'] = 'persisted-token';
|
cookieStore['shopit.front.auth.token'] = 'persisted-token';
|
||||||
|
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
providers: [
|
providers: [
|
||||||
@@ -152,7 +152,7 @@ describe('AuthService', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('clears an expired session when /me returns 401', async () => {
|
it('clears an expired session when /me returns 401', async () => {
|
||||||
cookieStore['shopit.auth.token'] = 'expired-token';
|
cookieStore['shopit.front.auth.token'] = 'expired-token';
|
||||||
|
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
providers: [
|
providers: [
|
||||||
@@ -176,7 +176,7 @@ describe('AuthService', () => {
|
|||||||
expect(service.user()).toBeNull();
|
expect(service.user()).toBeNull();
|
||||||
expect(service.token()).toBeNull();
|
expect(service.token()).toBeNull();
|
||||||
expect(service.isAuthenticated()).toBe(false);
|
expect(service.isAuthenticated()).toBe(false);
|
||||||
expect(cookieStore['shopit.auth.token']).toBeUndefined();
|
expect(cookieStore['shopit.front.auth.token']).toBeUndefined();
|
||||||
|
|
||||||
httpController.verify();
|
httpController.verify();
|
||||||
});
|
});
|
||||||
@@ -384,7 +384,7 @@ describe('AuthService', () => {
|
|||||||
|
|
||||||
expect(service.token()).toBe('plain-text-token');
|
expect(service.token()).toBe('plain-text-token');
|
||||||
expect(service.user()?.email).toBe('ada@example.com');
|
expect(service.user()?.email).toBe('ada@example.com');
|
||||||
expect(cookieStore['shopit.auth.token']).toBe('plain-text-token');
|
expect(cookieStore['shopit.front.auth.token']).toBe('plain-text-token');
|
||||||
|
|
||||||
httpController.verify();
|
httpController.verify();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import {
|
|||||||
import { CookieService } from '../cookie/cookie.service';
|
import { CookieService } from '../cookie/cookie.service';
|
||||||
import { TenantService } from '../tenant.service';
|
import { TenantService } from '../tenant.service';
|
||||||
|
|
||||||
const AUTH_TOKEN_COOKIE_KEY = 'shopit.auth.token';
|
const AUTH_TOKEN_COOKIE_KEY = 'shopit.front.auth.token';
|
||||||
const AUTH_USER_SSR_STATE_KEY = makeStateKey<AuthUser>('shopit.auth.user');
|
const AUTH_USER_SSR_STATE_KEY = makeStateKey<AuthUser>('shopit.auth.user');
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
|
|||||||
@@ -124,7 +124,6 @@
|
|||||||
td {
|
td {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
padding: 0.65rem 1rem;
|
padding: 0.65rem 1rem;
|
||||||
border-radius: 0.5rem;
|
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,6 +72,11 @@ label {
|
|||||||
|
|
||||||
color: #8a8a8a;
|
color: #8a8a8a;
|
||||||
|
|
||||||
|
> tbody > tr {
|
||||||
|
border-radius: 0.5rem;
|
||||||
|
clip-path: inset(0 round 0.5rem);
|
||||||
|
}
|
||||||
|
|
||||||
> tbody > tr:nth-of-type(odd) {
|
> tbody > tr:nth-of-type(odd) {
|
||||||
background-color: rgba(221, 221, 221, 0.25);
|
background-color: rgba(221, 221, 221, 0.25);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user