Skip to content

Commit

Permalink
Tried to fix some bugs, failed. Official v1.10.0 release!
Browse files Browse the repository at this point in the history
  • Loading branch information
kaubu committed Dec 27, 2023
1 parent b5a06ba commit 2c1ace6
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,23 @@

- [x] Function that takes the list of lemmas, gets their etymology and, if the
etymology origin and sub-origin isn't present, add them to a list
- [x] When a chip is pressed, emit that word up and send it back to the dictionary
- [x] When a chip is pressed, emit that word up and send it back to the
dictionary
- [x] Colour chips depending on their etymology
- [x] Filter chips, depending on what origin(s) are selected
- [ ] Statistics on what percentage is Romance, what percentage Germanic, etc
* Perhaps include "Old English" in the score, but remove any Germanic
scores (by stopping them from being added in the first place) that also
have Old English. Therefore, it only counts Germanic words that aren't
from Old English. Put Norse words there too, maybe.
- [ ] Add a search button inside of the search

### Editor errors

- [ ] Fix first word chip being a yellow colour always
- [ ] Fix picking the first Origin resulting in nothing happening
- [ ] If you unselect a word origin and then begin to type, should the origins
shuffle around it will reselect said word origin

## TODO

Expand Down
11 changes: 9 additions & 2 deletions src/views/Editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
variant="outlined"
counter
v-model="rawText"
id="user-input"
>
</v-textarea>
</v-col>
Expand Down Expand Up @@ -61,6 +62,7 @@
<v-row v-if="splitRawText.length > 0">
<v-col>
<h4>Words</h4>
<p>Press on a word to search the dictionary.</p>

<v-chip-group
mandatory
Expand Down Expand Up @@ -189,9 +191,14 @@ const sortedWords = computed(() => {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
watch(sortedWords, async (_oldSortedWords, _newSortedWords) => {
const newValue = Object.keys(sortedWords.value).indexOf(chosenLanguage.value);
const userInput = document.getElementById("user-input");
if (!(userInput === document.activeElement && selectedOrigin.value)) {
const newValue = Object.keys(sortedWords.value).indexOf(chosenLanguage.value);
selectedOrigin.value = newValue;
}
// console.log(`Watch triggered: ${selectedOrigin.value} > ${newValue} (index of ${chosenLanguage.value})\nkeys = '${Object.keys(sortedWords.value)}'`);
selectedOrigin.value = newValue;
});
const copyContent = async (text: string) => {
Expand Down

0 comments on commit 2c1ace6

Please sign in to comment.