Another batch of important updates and fixes

This commit is contained in:
Luka Romih
2026-02-23 15:29:58 +01:00
parent d0e53fee3b
commit fd02e25719
40 changed files with 216 additions and 71 deletions
+4 -3
View File
@@ -544,6 +544,7 @@ function initDictionaries() {
}
function handleClick({ target }) {
// TODO Fix leaks and related server request spam. Many click action create a new object or attach a new event listener on every click.
const term = target.closest('.terms-label')
const versionEl = target.closest('.date-element')
const deleteEntryEl = target.closest('#delete-entry')
@@ -652,11 +653,11 @@ function initDictionaries() {
} = window.dictionaryElements
event?.preventDefault()
const dictionaryIdElem = document.getElementById('hidden-dictionary-id')
const dictctionaryId = dictionaryIdElem.value
const dictionaryId = dictionaryIdElem.value
const deleteEntry = document.getElementById('delete-entry')
try {
const { data } = await axios.get('/api/v1/entries', {
params: { id: entryId, dictctionaryId: dictctionaryId }
params: { id: entryId, dictionaryId }
})
insertTermData(entryId, data)
const isPublishedEl = data.entry.is_published
@@ -947,7 +948,7 @@ function initDictionaries() {
const dictionaryId = hiddenEl.value
try {
const { data } = await axios.get('/api/v1/entries/fetch-terms', {
params: { id: dictionaryId }
params: { dictionaryId }
})
renderTerms(data, entryId)
} catch (error) {