From 5ac3c931b9ad96c14be68783a3f284e2481fadf5 Mon Sep 17 00:00:00 2001 From: poignatov Date: Mon, 2 Feb 2026 19:24:50 +0300 Subject: [PATCH] =?UTF-8?q?4.7.2:=20=D0=A3=D0=BF=D1=80=D0=BE=D1=89=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D0=BE=D1=82=D0=BE=D0=B1=D1=80=D0=B0=D0=B6?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=BF=D1=80=D0=BE=D0=B3=D1=80=D0=B5?= =?UTF-8?q?=D1=81=D1=81=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VERSION | 2 +- play-life-web/package.json | 2 +- play-life-web/src/components/CurrentWeek.jsx | 63 +++----------------- 3 files changed, 9 insertions(+), 58 deletions(-) diff --git a/VERSION b/VERSION index 7c66fca..af9764a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.7.1 +4.7.2 diff --git a/play-life-web/package.json b/play-life-web/package.json index 7508aa6..dae782e 100644 --- a/play-life-web/package.json +++ b/play-life-web/package.json @@ -1,6 +1,6 @@ { "name": "play-life-web", - "version": "4.7.1", + "version": "4.7.2", "type": "module", "scripts": { "dev": "vite", diff --git a/play-life-web/src/components/CurrentWeek.jsx b/play-life-web/src/components/CurrentWeek.jsx index 2fb7ea3..952f206 100644 --- a/play-life-web/src/components/CurrentWeek.jsx +++ b/play-life-web/src/components/CurrentWeek.jsx @@ -6,21 +6,15 @@ import { CircularProgressbar, buildStyles } from 'react-circular-progressbar' import 'react-circular-progressbar/dist/styles.css' // Компонент круглого прогрессбара с использованием react-circular-progressbar -function CircularProgressBar({ progress, size = 120, strokeWidth = 8, showCheckmark = true, extraProgress = null, maxProgress = 100, textSize = 'large', displayProgress = null, textPosition = 'default', projectColor = null }) { +function CircularProgressBar({ progress, size = 120, strokeWidth = 8, showCheckmark = true, textSize = 'large', displayProgress = null, textPosition = 'default', projectColor = null }) { // Нормализуем прогресс для визуализации (0-100%) const normalizedProgress = Math.min(Math.max(progress || 0, 0), 100) - - // Если есть extra progress, вычисляем визуальный прогресс для overlay - const extraVisual = extraProgress !== null && extraProgress > 0 - ? Math.min((extraProgress / maxProgress) * 100, 100) - : 0 // Определяем, достигнут ли 100% или выше const isComplete = (displayProgress !== null ? displayProgress : progress) >= 100 - // Определяем градиент ID: зелёный если >= 100%, иначе по наличию extra progress - const gradientId = isComplete ? 'success-gradient' : (extraVisual > 0 ? 'project-gradient' : 'overall-gradient') - const extraGradientId = 'project-extra-gradient' + // Определяем градиент ID: зелёный если >= 100%, иначе обычный градиент + const gradientId = isComplete ? 'success-gradient' : 'overall-gradient' // Определяем класс размера текста const textSizeClass = textSize === 'large' ? 'text-4xl' : textSize === 'small' ? 'text-base' : 'text-lg' @@ -48,24 +42,6 @@ function CircularProgressBar({ progress, size = 120, strokeWidth = 8, showCheckm // Создаем неполный круг (270 градусов) circleRatio={0.75} /> - - {/* Extra progress overlay (если есть) */} - {extraVisual > 0 && ( - - )} {/* Иконка статистики в центре */}
@@ -104,14 +80,6 @@ function CircularProgressBar({ progress, size = 120, strokeWidth = 8, showCheckm - - - - - - - - @@ -170,26 +138,9 @@ function ProjectCard({ project, projectColor, onProjectClick }) { } const goalProgress = getGoalProgress() - const maxProgressForPriority = 100 + (() => { - const normalizedPriority = (() => { - if (priority === null || priority === undefined) return null - const numeric = Number(priority) - return Number.isFinite(numeric) ? numeric : null - })() - if (normalizedPriority === 1) return 50 - if (normalizedPriority === 2) return 35 - return 20 - })() - - // Для визуального отображения: 100% прогрессбара = максимум для данного приоритета - // visualProgress показывает процент заполнения прогрессбара (0-100%), где 100% = maxProgressForPriority - const visualProgress = Math.min((goalProgress / maxProgressForPriority) * 100, 100) - // Для extra overlay: если goalProgress > 100%, показываем extra часть - // Но визуально это уже учтено в visualProgress, так что extra overlay не нужен - // Однако если нужно показать, что достигнут максимум, можно использовать другой подход - const baseVisualProgress = visualProgress - const extraVisualProgress = 0 // Не используем extra overlay, так как visualProgress уже показывает весь прогресс + // Для визуального отображения: круг показывает максимум 100% + const visualProgress = Math.min(goalProgress, 100) // Вычисляем целевую зону const getTargetZone = () => { @@ -233,7 +184,7 @@ function ProjectCard({ project, projectColor, onProjectClick }) { {/* Правая часть - круглый прогрессбар */}
onNavigate && onNavigate('full')}>