Skip to content

Commit

Permalink
fix lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
khaitruong922 committed Jul 30, 2024
1 parent f457ff3 commit a8d1601
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
15 changes: 11 additions & 4 deletions ext/js/pages/settings/dictionary-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,14 @@ class DictionaryEntry {
}
}

/**
* @param {string} alias
*/
updateAliasSettings(alias) {
this._aliasNode.textContent = alias;
this._aliasNode.dispatchEvent(new CustomEvent('change', {bubbles: true}));
}

/**
* @param {import('dom-data-binder').SettingChangedEvent} e
*/
Expand Down Expand Up @@ -916,10 +924,9 @@ export class DictionaryController {
/** @type {HTMLInputElement} */
const input = querySelectorNotNull(modal.node, '#dictionary-alias-input');
const inputValue = input.value.trim();
if (!inputValue) return;
const aliasNode = this._dictionaryEntries[indexNumber]._aliasNode;
aliasNode.textContent = inputValue;
aliasNode.dispatchEvent(new Event('change', {bubbles: true}));
if (inputValue) {
this._dictionaryEntries[indexNumber].updateAliasSettings(inputValue);
}
}

/**
Expand Down
1 change: 0 additions & 1 deletion ext/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -2835,7 +2835,6 @@ <h5>or click here to upload</h5>
</div>
</div></div>


<!-- Custom CSS modal -->
<div id="custom-css-modal" class="modal modal-left" tabindex="-1" role="dialog" hidden>
<div class="modal-content-container">
Expand Down

0 comments on commit a8d1601

Please sign in to comment.