From 2236f95ffa439d02978ff932caf97596866147fe Mon Sep 17 00:00:00 2001 From: poignatov Date: Tue, 24 Feb 2026 15:50:41 +0300 Subject: [PATCH] =?UTF-8?q?5.3.1:=20=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D1=81=D0=BF=D0=B8=D1=81=D0=BA=D0=B0?= =?UTF-8?q?=20=D0=B7=D0=B0=D0=B4=D0=B0=D1=87=20Fitbit=20=D0=BF=D1=80=D0=B8?= =?UTF-8?q?=20=D0=BE=D1=82=D0=BA=D1=80=D1=8B=D1=82=D0=B8=D0=B8=20=D0=BC?= =?UTF-8?q?=D0=B5=D0=BD=D1=8E?= 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/FitbitIntegration.jsx | 12 ++++++++---- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/VERSION b/VERSION index 03f488b..c7cb131 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -5.3.0 +5.3.1 diff --git a/play-life-web/package.json b/play-life-web/package.json index 5a85e94..6b7e45a 100644 --- a/play-life-web/package.json +++ b/play-life-web/package.json @@ -1,6 +1,6 @@ { "name": "play-life-web", - "version": "5.3.0", + "version": "5.3.1", "type": "module", "scripts": { "dev": "vite", diff --git a/play-life-web/src/components/FitbitIntegration.jsx b/play-life-web/src/components/FitbitIntegration.jsx index 57802d8..428ed32 100644 --- a/play-life-web/src/components/FitbitIntegration.jsx +++ b/play-life-web/src/components/FitbitIntegration.jsx @@ -173,9 +173,9 @@ function FitbitIntegration({ onNavigate }) { } } - const loadTasks = async () => { + const loadTasks = async (silent = false) => { try { - setLoadingTasks(true) + if (!silent) setLoadingTasks(true) const response = await authFetch('/api/tasks') if (!response.ok) { throw new Error('Ошибка при загрузке задач') @@ -183,9 +183,9 @@ function FitbitIntegration({ onNavigate }) { const data = await response.json() setTasks(data || []) } catch (error) { - console.error('Error loading tasks:', error) + if (!silent) console.error('Error loading tasks:', error) } finally { - setLoadingTasks(false) + if (!silent) setLoadingTasks(false) } } @@ -416,6 +416,7 @@ function FitbitIntegration({ onNavigate }) { ...editedBindings, steps_task_id: e.target.value ? parseInt(e.target.value, 10) : null })} + onFocus={() => loadTasks(true)} disabled={loadingTasks} className="w-full px-3 py-2 border border-gray-300 rounded-lg disabled:bg-gray-100" > @@ -438,6 +439,7 @@ function FitbitIntegration({ onNavigate }) { steps_goal_task_id: e.target.value ? parseInt(e.target.value, 10) : null, steps_goal_subtask_id: null })} + onFocus={() => loadTasks(true)} disabled={loadingTasks} className="w-full px-3 py-2 border border-gray-300 rounded-lg disabled:bg-gray-100" > @@ -510,6 +512,7 @@ function FitbitIntegration({ onNavigate }) { ...editedBindings, floors_task_id: e.target.value ? parseInt(e.target.value, 10) : null })} + onFocus={() => loadTasks(true)} disabled={loadingTasks} className="w-full px-3 py-2 border border-gray-300 rounded-lg disabled:bg-gray-100" > @@ -532,6 +535,7 @@ function FitbitIntegration({ onNavigate }) { floors_goal_task_id: e.target.value ? parseInt(e.target.value, 10) : null, floors_goal_subtask_id: null })} + onFocus={() => loadTasks(true)} disabled={loadingTasks} className="w-full px-3 py-2 border border-gray-300 rounded-lg disabled:bg-gray-100" >