update goods

This commit is contained in:
Kirill
2026-05-15 14:43:26 +05:00
parent 48dc9de456
commit 551c9b027c
35 changed files with 12 additions and 8 deletions
@@ -420,7 +420,7 @@ export function AdminProductsPage() {
<OptimizedImage <OptimizedImage
src={url} src={url}
alt="Фото товара" alt="Фото товара"
widths={[80, 160]} widths={[320, 640]}
sizes="80px" sizes="80px"
sx={{ width: '100%', height: '100%', objectFit: 'cover' }} sx={{ width: '100%', height: '100%', objectFit: 'cover' }}
/> />
@@ -539,7 +539,7 @@ export function AdminProductsPage() {
<OptimizedImage <OptimizedImage
src={item.url} src={item.url}
alt="" alt=""
widths={[120, 240]} widths={[320, 640]}
sizes="120px" sizes="120px"
sx={{ width: '100%', height: '100%', objectFit: 'cover' }} sx={{ width: '100%', height: '100%', objectFit: 'cover' }}
/> />
+2 -2
View File
@@ -573,7 +573,7 @@ export function AdminPage() {
<OptimizedImage <OptimizedImage
src={url} src={url}
alt="Фото товара" alt="Фото товара"
widths={[80, 160]} widths={[320, 640]}
sizes="80px" sizes="80px"
sx={{ width: '100%', height: '100%', objectFit: 'cover' }} sx={{ width: '100%', height: '100%', objectFit: 'cover' }}
/> />
@@ -692,7 +692,7 @@ export function AdminPage() {
<OptimizedImage <OptimizedImage
src={item.url} src={item.url}
alt="" alt=""
widths={[120, 240]} widths={[320, 640]}
sizes="120px" sizes="120px"
sx={{ width: '100%', height: '100%', objectFit: 'cover' }} sx={{ width: '100%', height: '100%', objectFit: 'cover' }}
/> />
+2 -2
View File
@@ -164,7 +164,7 @@ export function ProductPage() {
{!isAdmin && p.quantity > 0 ? <ToggleCartIcon productId={p.id} size="medium" /> : null} {!isAdmin && p.quantity > 0 ? <ToggleCartIcon productId={p.id} size="medium" /> : null}
{p.description ? ( {p.description || p.shortDescription ? (
<Typography sx={{ whiteSpace: 'pre-wrap' }}>{p.description}</Typography> <Typography sx={{ whiteSpace: 'pre-wrap' }}>{p.description}</Typography>
) : ( ) : (
<Typography color="text.secondary">Описание появится позже.</Typography> <Typography color="text.secondary">Описание появится позже.</Typography>
@@ -238,7 +238,7 @@ export function ProductPage() {
<OptimizedImage <OptimizedImage
src={rv.imageUrl} src={rv.imageUrl}
alt="Фото к отзыву" alt="Фото к отзыву"
widths={[140, 320]} widths={[320, 640]}
sizes="140px" sizes="140px"
sx={{ sx={{
width: '100%', width: '100%',
@@ -41,7 +41,7 @@ describe('OptimizedImage', () => {
}) })
it('respects custom widths', () => { it('respects custom widths', () => {
render(<OptimizedImage src="/uploads/abc123.png" alt="test" widths={[200, 400]} />) render(<OptimizedImage src="/uploads/abc123.png" alt="test" widths={[320, 640]} />)
const avifSource = screen const avifSource = screen
.getByAltText('test') .getByAltText('test')
.closest('picture') .closest('picture')
@@ -126,7 +126,7 @@ export function ReviewsBlock() {
<OptimizedImage <OptimizedImage
src={r.imageUrl} src={r.imageUrl}
alt="Фото к отзыву" alt="Фото к отзыву"
widths={[120, 320]} widths={[320, 640]}
sizes="120px" sizes="120px"
sx={{ sx={{
width: '100%', width: '100%',
+4
View File
@@ -29,6 +29,10 @@ export default defineConfig({
target: 'http://127.0.0.1:3333', target: 'http://127.0.0.1:3333',
changeOrigin: true, changeOrigin: true,
}, },
'/uploads-resized': {
target: 'http://127.0.0.1:3333',
changeOrigin: true,
},
}, },
}, },
build: { build: {
Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB