diff --git a/VERSION b/VERSION index dd0ad7a..26f30f7 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -5.12.0 +5.13.0 diff --git a/play-life-web/package.json b/play-life-web/package.json index e98a718..ccd4870 100644 --- a/play-life-web/package.json +++ b/play-life-web/package.json @@ -1,6 +1,6 @@ { "name": "play-life-web", - "version": "5.12.0", + "version": "5.13.0", "type": "module", "scripts": { "dev": "vite", diff --git a/play-life-web/src/components/CurrentWeek.css b/play-life-web/src/components/CurrentWeek.css index aaf25f1..b0ed811 100644 --- a/play-life-web/src/components/CurrentWeek.css +++ b/play-life-web/src/components/CurrentWeek.css @@ -175,19 +175,34 @@ cursor: not-allowed; } -/* Внешний контейнер для карточки проекта */ +/* Внешний контейнер для карточки проекта — без общей тени и рамки */ .project-card-wrapper { - border: 1px solid #e0e4ed; - border-radius: 1.5rem; - transition: all 0.3s; - box-shadow: 0 1px 3px 0 rgb(99 102 241 / 0.08); - background-color: #eef0f7; + background-color: transparent; } -.project-card-wrapper:hover { +/* Карточка с инфой по проекту — своя тень */ +.project-card-inner { + box-shadow: 0 1px 3px 0 rgb(99 102 241 / 0.08); + transition: box-shadow 0.3s; +} + +.project-card-inner:hover { box-shadow: 0 2px 6px 0 rgb(99 102 241 / 0.12); } +/* Блок с инфой по проекту: при наличии желаний убираем нижние закругления и добавляем отступ снизу */ +.project-card-inner-with-wishes { + border-radius: 1.5rem 1.5rem 0 0 !important; + margin-bottom: 0.5rem; +} + +/* Блок списка желаний: отдельная карточка со своей тенью */ +.project-wishes-block { + background-color: #fff; + border-radius: 0 0 1.5rem 1.5rem; + box-shadow: 0 1px 3px 0 rgb(99 102 241 / 0.08); +} + /* Стили для горизонтального скролла желаний в карточке проекта */ .project-wishes-scroll { display: flex; @@ -226,6 +241,7 @@ border-radius: 8px; overflow: hidden; position: relative; + container-type: inline-size; } .mini-wish-image img { @@ -236,14 +252,37 @@ .mini-wish-overlay { position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - background: rgba(255, 255, 255, 0.4); + inset: 0; + z-index: 1; + background: rgba(255, 255, 255, 0.65); pointer-events: none; } +/* Текст баллов поверх пелены (отдельный слой, выше по z-index) */ +.mini-wish-unlock-points { + position: absolute; + top: 0; + left: 4px; + right: 4px; + bottom: 0; + z-index: 2; + display: flex; + align-items: center; + justify-content: center; + width: calc(100% - 8px); + max-width: calc(100% - 8px); + color: #5b6b8a; + /* font-size задаётся в JS по количеству цифр (auto-size) */ + font-weight: 700; + line-height: 1.2; + pointer-events: none; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + box-sizing: border-box; + text-align: center; +} + .mini-wish-placeholder { width: 100%; height: 100%; diff --git a/play-life-web/src/components/CurrentWeek.jsx b/play-life-web/src/components/CurrentWeek.jsx index 86f8035..b8ac36c 100644 --- a/play-life-web/src/components/CurrentWeek.jsx +++ b/play-life-web/src/components/CurrentWeek.jsx @@ -104,6 +104,17 @@ function MiniWishCard({ wish, onClick }) { } } + const cond = wish.first_locked_condition + const isPointsCondition = cond?.type === 'project_points' + const required = cond?.required_points ?? 0 + const current = cond?.current_points ?? 0 + const remaining = isPointsCondition ? Math.max(0, required - current) : 0 + const showUnlockPoints = remaining > 0 + + // Auto-size: уменьшаем шрифт при большом количестве цифр, чтобы текст влезал + const digits = String(Math.round(remaining)).length + const fontSizePx = digits <= 1 ? 22 : digits === 2 ? 19 : digits === 3 ? 16 : 14 + return (