diff --git a/VERSION b/VERSION index ee893b7..954e228 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.23.0 +3.24.0 diff --git a/play-life-web/package.json b/play-life-web/package.json index a6e7ada..6c920d6 100644 --- a/play-life-web/package.json +++ b/play-life-web/package.json @@ -1,6 +1,6 @@ { "name": "play-life-web", - "version": "3.23.0", + "version": "3.24.0", "type": "module", "scripts": { "dev": "vite", diff --git a/play-life-web/src/components/TaskList.css b/play-life-web/src/components/TaskList.css index 7d87720..b082823 100644 --- a/play-life-web/src/components/TaskList.css +++ b/play-life-web/src/components/TaskList.css @@ -149,7 +149,7 @@ flex-shrink: 0; } -.task-onetime-icon { +.task-recurring-icon { color: #9ca3af; flex-shrink: 0; } diff --git a/play-life-web/src/components/TaskList.jsx b/play-life-web/src/components/TaskList.jsx index ed7c4be..f1b3bda 100644 --- a/play-life-web/src/components/TaskList.jsx +++ b/play-life-web/src/components/TaskList.jsx @@ -602,43 +602,9 @@ function TaskList({ onNavigate, data, loading, backgroundLoading, error, onRetry (+{task.subtasks_count}) )} - {hasProgression && ( - - )} - {isInfinite && ( - - )} - {isOneTime && !isWishlist && ( + {!isOneTime && !isInfinite && !isWishlist && ( + )} + {isInfinite && ( + + )} + {hasProgression && ( + )} diff --git a/play-life-web/src/components/WishlistDetail.css b/play-life-web/src/components/WishlistDetail.css index 6c7b07c..cc31be8 100644 --- a/play-life-web/src/components/WishlistDetail.css +++ b/play-life-web/src/components/WishlistDetail.css @@ -291,12 +291,13 @@ } .wishlist-detail-uncomplete-button { - background-color: #f39c12; + flex: 1; + background-color: #f1c40f; color: white; } .wishlist-detail-uncomplete-button:hover:not(:disabled) { - background-color: #e67e22; + background-color: #f39c12; transform: translateY(-1px); } @@ -320,6 +321,41 @@ cursor: not-allowed; } +.wishlist-detail-bottom-actions { + position: fixed; + bottom: 0; + left: 0; + right: 0; + padding: 1rem; + background: white; + border-top: 1px solid #e5e7eb; + box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1); + z-index: 1500; +} + +.wishlist-detail-bottom-actions .wishlist-detail-uncomplete-button { + flex: 1; + padding: 0.75rem 1.5rem; + border: none; + border-radius: 6px; + font-size: 1rem; + font-weight: 500; + cursor: pointer; + transition: all 0.2s; + background-color: #f1c40f; + color: white; +} + +.wishlist-detail-bottom-actions .wishlist-detail-uncomplete-button:hover:not(:disabled) { + background-color: #f39c12; + transform: translateY(-1px); +} + +.wishlist-detail-bottom-actions .wishlist-detail-uncomplete-button:disabled { + opacity: 0.6; + cursor: not-allowed; +} + .loading { text-align: center; padding: 2rem; diff --git a/play-life-web/src/components/WishlistDetail.jsx b/play-life-web/src/components/WishlistDetail.jsx index be35598..d4046e3 100644 --- a/play-life-web/src/components/WishlistDetail.jsx +++ b/play-life-web/src/components/WishlistDetail.jsx @@ -91,7 +91,7 @@ function WishlistDetail({ wishlistId, onNavigate, onRefresh, boardId }) { }) if (!response.ok) { - throw new Error('Ошибка при отмене завершения') + throw new Error('Ошибка при возобновлении желания') } if (onRefresh) { @@ -100,7 +100,7 @@ function WishlistDetail({ wishlistId, onNavigate, onRefresh, boardId }) { fetchWishlistDetail() } catch (err) { console.error('Error uncompleting wishlist:', err) - setToastMessage({ text: err.message || 'Ошибка при отмене завершения', type: 'error' }) + setToastMessage({ text: err.message || 'Ошибка при возобновлении желания', type: 'error' }) } finally { setIsCompleting(false) } @@ -172,7 +172,7 @@ function WishlistDetail({ wishlistId, onNavigate, onRefresh, boardId }) { const handleDeleteTask = async (e) => { e.stopPropagation() - if (!wishlistItem?.linked_task) return + if (!wishlistItem?.linked_task || wishlistItem?.completed) return if (!window.confirm('Удалить задачу, связанную с желанием?')) { return @@ -367,7 +367,7 @@ function WishlistDetail({ wishlistId, onNavigate, onRefresh, boardId }) { {renderUnlockConditions()} {/* Связанная задача или кнопки действий */} - {wishlistItem.unlocked && !wishlistItem.completed && ( + {wishlistItem.unlocked && ( <> {wishlistItem.linked_task && wishlistItem.linked_task.user_id === user?.id ? (