diff --git a/mo-lunfardo/data/lunfardo-dict-es.json b/mo-lunfardo/data/lunfardo-dict-es.json index 9e5b7d8..95d2c5c 100644 --- a/mo-lunfardo/data/lunfardo-dict-es.json +++ b/mo-lunfardo/data/lunfardo-dict-es.json @@ -132,7 +132,7 @@ { "t": "Batifondo", "d": "Alboroto, follon." }, { "t": "Batilana", "d": "Delator." }, { "t": "Batir", "d": "Confesar, delatar, denunciar," }, - { "t": "decir la verdad Batir la justa", "d": "Decir la verdad." }, + { "t": "Batir la justa", "d": "Decir la verdad." }, { "t": "Batuque", "d": "Alboroto, fiesta ruidosa." }, { "t": "Beberaje", "d": "Bebida alcohólica." }, { "t": "Bebestible", "d": "Bebida." }, diff --git a/mo-lunfardo/lunfardo.js b/mo-lunfardo/lunfardo.js index fddddd6..703eecd 100644 --- a/mo-lunfardo/lunfardo.js +++ b/mo-lunfardo/lunfardo.js @@ -1,12 +1,12 @@ // Runs at https://minimo.io/diccionario-de-lunfardo-2020062059/, loaded via jsdelivr (fetched from Github) // @minimo-io -// v.0.1 const App = Vue.createApp({ data(){ return { placeholder: 'Buscá che...', searchQuery: '', + noResults: false, wordsJson: [] } }, @@ -40,13 +40,15 @@ const App = Vue.createApp({ //return this.listValues.slice(0, 10); return this.listValues.slice(0, 50); } - return this.listValues - .map((v) => { - if (this.matches(v)) { - return v; - } - }) - .filter((v) => v); + var filteredValues = this.listValues + .map((v) => { + if (this.matches(v)) { + return v; + } + }) + .filter((v) => v); + if (filteredValues.length <= 0) this.noResults = true; + return filteredValues; } }, diff --git a/mo-lunfardo/test.html b/mo-lunfardo/test.html index 118ffe6..4358fd7 100644 --- a/mo-lunfardo/test.html +++ b/mo-lunfardo/test.html @@ -12,7 +12,7 @@