Исправлена передача имени словаря
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
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "play-life-web",
|
||||
"version": "3.26.0",
|
||||
"version": "3.26.1",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -642,7 +642,7 @@ function AppContent() {
|
||||
setSelectedProject(null)
|
||||
setTabParams({})
|
||||
updateUrl('full', {}, activeTab)
|
||||
} else if (tab !== activeTab || tab === 'task-form' || tab === 'wishlist-form') {
|
||||
} else if (tab !== activeTab || tab === 'task-form' || tab === 'wishlist-form' || (tab === 'words' && Object.keys(params).length > 0)) {
|
||||
// Сохраняем позицию скролла для текущего таба перед переходом
|
||||
const scrollContainer = document.querySelector('.flex-1.overflow-y-auto')
|
||||
if (scrollContainer && mainTabs.includes(activeTab)) {
|
||||
@@ -1115,7 +1115,9 @@ function AppContent() {
|
||||
{/* Кнопка добавления слов (только для таба words) */}
|
||||
{activeTab === 'words' && (
|
||||
<button
|
||||
onClick={() => handleNavigate('add-words', { dictionaryId: tabParams.dictionaryId })}
|
||||
onClick={() => {
|
||||
handleNavigate('add-words', { dictionaryId: tabParams.dictionaryId, dictionaryName: tabParams.dictionaryName })
|
||||
}}
|
||||
className="fixed bottom-4 right-4 z-20 bg-gradient-to-r from-indigo-600 to-purple-600 hover:from-indigo-700 hover:to-purple-700 text-white w-[61px] h-[61px] rounded-2xl shadow-lg transition-all duration-200 hover:scale-105 flex items-center justify-center"
|
||||
title="Добавить слова"
|
||||
>
|
||||
|
||||
@@ -130,8 +130,8 @@ function WordList({ onNavigate, dictionaryId, isNewDictionary, refreshTrigger =
|
||||
await fetchDictionary(newDictionaryId)
|
||||
await fetchWordsForDictionary(newDictionaryId)
|
||||
|
||||
// Update navigation to use the new dictionary ID
|
||||
onNavigate?.('words', { dictionaryId: newDictionaryId })
|
||||
// Update navigation to use the new dictionary ID and name
|
||||
onNavigate?.('words', { dictionaryId: newDictionaryId, dictionaryName: newDict.name })
|
||||
} else if (hasValidDictionary(currentDictionaryId)) {
|
||||
// Update existing dictionary (rename)
|
||||
const response = await authFetch(`${API_URL}/dictionaries/${currentDictionaryId}`, {
|
||||
|
||||
Reference in New Issue
Block a user