From e41f721106e6b88d15d65dc954dc00861badbaf4 Mon Sep 17 00:00:00 2001 From: poignatov Date: Tue, 20 Jan 2026 21:33:23 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D1=8B=20=D0=BE=D1=82=D1=81=D1=82=D1=83=D0=BF=D1=8B?= =?UTF-8?q?=20=D0=B2=20=D1=81=D0=BF=D0=B8=D1=81=D0=BA=D0=B5=20=D1=81=D0=BB?= =?UTF-8?q?=D0=BE=D0=B2?= 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/App.jsx | 6 ++- .../src/components/DictionaryList.jsx | 43 +++++++----------- .../src/components/FullStatistics.jsx | 44 +++++++++---------- play-life-web/src/components/TaskDetail.jsx | 4 +- play-life-web/src/components/TaskForm.jsx | 41 +++++++++-------- play-life-web/src/components/Wishlist.jsx | 25 ++++------- .../src/components/WishlistDetail.jsx | 20 ++++----- play-life-web/src/components/WishlistForm.jsx | 43 +++++++++--------- play-life-web/src/components/WordList.css | 2 + play-life-web/src/components/WordList.jsx | 27 +++++------- 12 files changed, 115 insertions(+), 144 deletions(-) diff --git a/VERSION b/VERSION index 455cf2c..5edc0a6 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.24.1 +3.24.2 diff --git a/play-life-web/package.json b/play-life-web/package.json index 9f80abd..54c5685 100644 --- a/play-life-web/package.json +++ b/play-life-web/package.json @@ -1,6 +1,6 @@ { "name": "play-life-web", - "version": "3.24.1", + "version": "3.24.2", "type": "module", "scripts": { "dev": "vite", diff --git a/play-life-web/src/App.jsx b/play-life-web/src/App.jsx index 41dd0ac..14fc242 100644 --- a/play-life-web/src/App.jsx +++ b/play-life-web/src/App.jsx @@ -765,7 +765,7 @@ function AppContent() { }, [activeTab]) // Определяем, нужно ли скрывать нижнюю панель (для fullscreen экранов) - const isFullscreenTab = activeTab === 'test' || activeTab === 'add-words' || activeTab === 'task-form' || activeTab === 'wishlist-form' || activeTab === 'wishlist-detail' || activeTab === 'todoist-integration' || activeTab === 'telegram-integration' || activeTab === 'full' || activeTab === 'priorities' || activeTab === 'dictionaries' + const isFullscreenTab = activeTab === 'test' || activeTab === 'add-words' || activeTab === 'task-form' || activeTab === 'wishlist-form' || activeTab === 'wishlist-detail' || activeTab === 'todoist-integration' || activeTab === 'telegram-integration' || activeTab === 'full' || activeTab === 'priorities' || activeTab === 'dictionaries' || activeTab === 'words' // Определяем отступы для контейнера const getContainerPadding = () => { @@ -788,6 +788,10 @@ function AppContent() { if (activeTab === 'dictionaries') { return 'px-4 md:px-8 py-0' } + // Для экрана списка слов используем такие же отступы как для словарей + if (activeTab === 'words') { + return 'px-4 md:px-8 py-0' + } // Для остальных fullscreen экранов без отступов return 'p-0' } diff --git a/play-life-web/src/components/DictionaryList.jsx b/play-life-web/src/components/DictionaryList.jsx index 26a0bb2..2f09962 100644 --- a/play-life-web/src/components/DictionaryList.jsx +++ b/play-life-web/src/components/DictionaryList.jsx @@ -89,42 +89,28 @@ function DictionaryList({ onNavigate, refreshTrigger = 0 }) { setSelectedDictionary(null) } - // Показываем загрузку только при первой инициализации и если нет данных для отображения - const shouldShowLoading = loading && !isInitializedRef.current && dictionaries.length === 0 - - if (shouldShowLoading) { - return ( -
-
-
-
-
Загрузка...
-
-
-
- ) - } - - if (error) { - return ( -
- -
- ) - } - return (
{/* Кнопка закрытия */} - - -
+ {/* Показываем загрузку только при первой инициализации и если нет данных для отображения */} + {loading && !isInitializedRef.current && dictionaries.length === 0 ? ( +
+
+
+
Загрузка...
+
+
+ ) : error ? ( + + ) : ( +
{dictionaries.map((dict) => (
+
Добавить
-
+
+ )} {selectedDictionary && (
diff --git a/play-life-web/src/components/FullStatistics.jsx b/play-life-web/src/components/FullStatistics.jsx index baec64e..a67bcd3 100644 --- a/play-life-web/src/components/FullStatistics.jsx +++ b/play-life-web/src/components/FullStatistics.jsx @@ -117,19 +117,7 @@ function FullStatistics({ selectedProject, onClearSelection, data, loading, erro const chartData = processData() - // Показываем loading только если данных нет и идет загрузка - if (loading && !chartData) { - return ( -
-
-
-
Загрузка...
-
-
- ) - } - - if (error && !chartData) { + if (error && !chartData && !loading) { return } @@ -194,13 +182,6 @@ function FullStatistics({ selectedProject, onClearSelection, data, loading, erro }, } - if (!chartData) { - return ( -
-
Нет данных для отображения
-
- ) - } return (
@@ -213,10 +194,25 @@ function FullStatistics({ selectedProject, onClearSelection, data, loading, erro ✕ )} -
- -
- + {loading && !chartData ? ( +
+
+
+
Загрузка...
+
+
+ ) : !chartData ? ( +
+
Нет данных для отображения
+
+ ) : ( + <> +
+ +
+ + + )}
) } diff --git a/play-life-web/src/components/TaskDetail.jsx b/play-life-web/src/components/TaskDetail.jsx index 902b62a..76eabd1 100644 --- a/play-life-web/src/components/TaskDetail.jsx +++ b/play-life-web/src/components/TaskDetail.jsx @@ -705,7 +705,6 @@ function TaskDetail({ taskId, onClose, onRefresh, onTaskCompleted, onNavigate })
)} -
{toastMessage && ( )} - ) + +) } export default TaskDetail diff --git a/play-life-web/src/components/TaskForm.jsx b/play-life-web/src/components/TaskForm.jsx index d9fef54..10c329b 100644 --- a/play-life-web/src/components/TaskForm.jsx +++ b/play-life-web/src/components/TaskForm.jsx @@ -765,25 +765,21 @@ function TaskForm({ onNavigate, taskId, wishlistId, isTest: isTestFromProps = fa } } - if (loadingTask) { - return ( -
+ return ( +
+ + {loadingTask ? (
Загрузка...
-
- ) - } - - return ( -
- -

{taskId ? 'Редактировать задачу' : 'Новая задача'}

+ ) : ( + <> +

{taskId ? 'Редактировать задачу' : 'Новая задача'}

@@ -1196,14 +1192,17 @@ function TaskForm({ onNavigate, taskId, wishlistId, isTest: isTestFromProps = fa )}
- {toastMessage && ( - setToastMessage(null)} - /> - )} -
+ {toastMessage && ( + setToastMessage(null)} + /> + )} + + )} + )} +
) } diff --git a/play-life-web/src/components/Wishlist.jsx b/play-life-web/src/components/Wishlist.jsx index 822bb5b..913257a 100644 --- a/play-life-web/src/components/Wishlist.jsx +++ b/play-life-web/src/components/Wishlist.jsx @@ -595,21 +595,7 @@ function Wishlist({ onNavigate, refreshTrigger = 0, isActive = false, initialBoa ) } - // Показываем loading только если и доски и желания грузятся - if (boardsLoading && loading) { - return ( -
-
-
-
-
Загрузка...
-
-
-
- ) - } - - if (error && items.length === 0) { + if (error && items.length === 0 && !boardsLoading && !loading) { return (
{/* Основной список */} - {loading ? ( + {boardsLoading && loading ? ( +
+
+
+
Загрузка...
+
+
+ ) : loading ? (
diff --git a/play-life-web/src/components/WishlistDetail.jsx b/play-life-web/src/components/WishlistDetail.jsx index d4046e3..52271a6 100644 --- a/play-life-web/src/components/WishlistDetail.jsx +++ b/play-life-web/src/components/WishlistDetail.jsx @@ -298,24 +298,20 @@ function WishlistDetail({ wishlistId, onNavigate, onRefresh, boardId }) { ) } - if (loadingWishlist) { - return ( -
-
-
-
-
Загрузка...
-
-
-
- ) - } return (
+ {loadingWishlist && ( +
+
+
+
Загрузка...
+
+
+ )}

{wishlistItem ? wishlistItem.name : 'Желание'}

diff --git a/play-life-web/src/components/WishlistForm.jsx b/play-life-web/src/components/WishlistForm.jsx index 419e48d..befc1d2 100644 --- a/play-life-web/src/components/WishlistForm.jsx +++ b/play-life-web/src/components/WishlistForm.jsx @@ -645,25 +645,21 @@ function WishlistForm({ onNavigate, wishlistId, editConditionIndex, newTaskId, b } } - if (loadingWishlist) { - return ( -
-
-
-
-
Загрузка...
-
-
-
- ) - } - return (
-

{wishlistId ? 'Редактировать желание' : 'Новое желание'}

+ {loadingWishlist ? ( +
+
+
+
Загрузка...
+
+
+ ) : ( + <> +

{wishlistId ? 'Редактировать желание' : 'Новое желание'}

@@ -855,14 +851,17 @@ function WishlistForm({ onNavigate, wishlistId, editConditionIndex, newTaskId, b /> )} - {toastMessage && ( - setToastMessage(null)} - /> - )} -
+ {toastMessage && ( + setToastMessage(null)} + /> + )} + + )} + )} +
) } diff --git a/play-life-web/src/components/WordList.css b/play-life-web/src/components/WordList.css index e3aeae2..2e2a115 100644 --- a/play-life-web/src/components/WordList.css +++ b/play-life-web/src/components/WordList.css @@ -1,5 +1,7 @@ .word-list { position: relative; + max-width: 42rem; /* max-w-2xl = 672px */ + margin: 0 auto; } .close-x-button { diff --git a/play-life-web/src/components/WordList.jsx b/play-life-web/src/components/WordList.jsx index f3b85f3..d71a242 100644 --- a/play-life-web/src/components/WordList.jsx +++ b/play-life-web/src/components/WordList.jsx @@ -161,20 +161,7 @@ function WordList({ onNavigate, dictionaryId, isNewDictionary, refreshTrigger = // Show save button only if name is not empty and has changed const showSaveButton = dictionaryName.trim() !== '' && dictionaryName.trim() !== originalDictionaryName - if (loading) { - return ( -
-
-
-
-
Загрузка...
-
-
-
- ) - } - - if (error) { + if (error && !loading) { return (
{ @@ -188,13 +175,21 @@ function WordList({ onNavigate, dictionaryId, isNewDictionary, refreshTrigger = return (
- + {loading && ( +
+
+
+
Загрузка...
+
+
+ )} {/* Dictionary name input */}