6.4.12: Навигация назад по стеку после создания
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 1m4s
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 1m4s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "play-life-web",
|
"name": "play-life-web",
|
||||||
"version": "6.4.11",
|
"version": "6.4.12",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
|||||||
@@ -774,9 +774,9 @@ function TaskForm({ onNavigate, taskId, wishlistId, isTest: isTestFromProps = fa
|
|||||||
newTaskId: newTaskId,
|
newTaskId: newTaskId,
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
console.log('[TaskForm] No returnTo, navigating to tasks')
|
console.log('[TaskForm] No returnTo, going back in history')
|
||||||
// Стандартное поведение - возврат к списку задач
|
// Возврат назад по стеку истории (на список задач, желаний и т.д.)
|
||||||
onNavigate?.('tasks')
|
window.history.back()
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
setToastMessage({ text: err.message || 'Ошибка при сохранении задачи', type: 'error' })
|
setToastMessage({ text: err.message || 'Ошибка при сохранении задачи', type: 'error' })
|
||||||
|
|||||||
@@ -712,12 +712,8 @@ function WishlistForm({ onNavigate, wishlistId, editConditionIndex, newTaskId, b
|
|||||||
}
|
}
|
||||||
|
|
||||||
resetForm()
|
resetForm()
|
||||||
// Возвращаемся на доску, если она была указана
|
// Возврат назад по стеку истории
|
||||||
if (boardId) {
|
window.history.back()
|
||||||
onNavigate?.('wishlist', { boardId })
|
|
||||||
} else {
|
|
||||||
onNavigate?.('wishlist')
|
|
||||||
}
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
setError(err.message)
|
setError(err.message)
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
Reference in New Issue
Block a user