Исправлена передача имени словаря
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 1m4s

This commit is contained in:
poignatov
2026-01-22 19:32:52 +03:00
parent e823312f0e
commit 5a7c8b5d2f
4 changed files with 8 additions and 6 deletions

View File

@@ -1 +1 @@
3.26.0 3.26.1

View File

@@ -1,6 +1,6 @@
{ {
"name": "play-life-web", "name": "play-life-web",
"version": "3.26.0", "version": "3.26.1",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",

View File

@@ -642,7 +642,7 @@ function AppContent() {
setSelectedProject(null) setSelectedProject(null)
setTabParams({}) setTabParams({})
updateUrl('full', {}, activeTab) 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') const scrollContainer = document.querySelector('.flex-1.overflow-y-auto')
if (scrollContainer && mainTabs.includes(activeTab)) { if (scrollContainer && mainTabs.includes(activeTab)) {
@@ -1115,7 +1115,9 @@ function AppContent() {
{/* Кнопка добавления слов (только для таба words) */} {/* Кнопка добавления слов (только для таба words) */}
{activeTab === 'words' && ( {activeTab === 'words' && (
<button <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" 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="Добавить слова" title="Добавить слова"
> >

View File

@@ -130,8 +130,8 @@ function WordList({ onNavigate, dictionaryId, isNewDictionary, refreshTrigger =
await fetchDictionary(newDictionaryId) await fetchDictionary(newDictionaryId)
await fetchWordsForDictionary(newDictionaryId) await fetchWordsForDictionary(newDictionaryId)
// Update navigation to use the new dictionary ID // Update navigation to use the new dictionary ID and name
onNavigate?.('words', { dictionaryId: newDictionaryId }) onNavigate?.('words', { dictionaryId: newDictionaryId, dictionaryName: newDict.name })
} else if (hasValidDictionary(currentDictionaryId)) { } else if (hasValidDictionary(currentDictionaryId)) {
// Update existing dictionary (rename) // Update existing dictionary (rename)
const response = await authFetch(`${API_URL}/dictionaries/${currentDictionaryId}`, { const response = await authFetch(`${API_URL}/dictionaries/${currentDictionaryId}`, {