Show info about whether a dictionary supports wildcard searches

This commit is contained in:
toasted-nutbread 2019-11-23 23:23:08 -05:00
parent 1a0a345ae7
commit b862035fbc
3 changed files with 10 additions and 3 deletions

View File

@ -503,7 +503,8 @@ class Database {
termMetaDataLoaded, termMetaDataLoaded,
kanjiDataLoaded, kanjiDataLoaded,
kanjiMetaDataLoaded, kanjiMetaDataLoaded,
tagDataLoaded tagDataLoaded,
details
); );
} }
@ -520,7 +521,8 @@ class Database {
termMetaDataLoaded, termMetaDataLoaded,
kanjiDataLoaded, kanjiDataLoaded,
kanjiMetaDataLoaded, kanjiMetaDataLoaded,
tagDataLoaded tagDataLoaded,
details
) { ) {
const zip = await JSZip.loadAsync(archive); const zip = await JSZip.loadAsync(archive);
@ -538,7 +540,8 @@ class Database {
title: index.title, title: index.title,
revision: index.revision, revision: index.revision,
sequenced: index.sequenced, sequenced: index.sequenced,
version: index.format || index.version version: index.format || index.version,
prefixWildcardsSupported: !!details.prefixWildcardsSupported
}; };
await indexDataLoaded(summary); await indexDataLoaded(summary);

View File

@ -189,6 +189,7 @@ class SettingsDictionaryEntryUI {
this.content.querySelector('.dict-title').textContent = this.dictionaryInfo.title; this.content.querySelector('.dict-title').textContent = this.dictionaryInfo.title;
this.content.querySelector('.dict-revision').textContent = `rev.${this.dictionaryInfo.revision}`; this.content.querySelector('.dict-revision').textContent = `rev.${this.dictionaryInfo.revision}`;
this.content.querySelector('.dict-prefix-wildcard-searches-supported').checked = !!this.dictionaryInfo.prefixWildcardsSupported;
this.applyValues(); this.applyValues();

View File

@ -550,6 +550,9 @@
<div class="checkbox options-advanced"> <div class="checkbox options-advanced">
<label><input type="checkbox" class="dict-allow-secondary-searches"> Allow secondary searches</label> <label><input type="checkbox" class="dict-allow-secondary-searches"> Allow secondary searches</label>
</div> </div>
<div class="checkbox dict-prefix-wildcard-searches-supported-container">
<label><input type="checkbox" class="dict-prefix-wildcard-searches-supported" disabled> Prefix wildcard searches supported</label>
</div>
<div class="form-group options-advanced"> <div class="form-group options-advanced">
<label class="dict-result-priority-label">Result priority</label> <label class="dict-result-priority-label">Result priority</label>
<input type="number" class="form-control dict-priority"> <input type="number" class="form-control dict-priority">