WIP
This commit is contained in:
parent
d3a0173874
commit
92fbc14e0b
@ -20,7 +20,7 @@
|
|||||||
class Dictionary {
|
class Dictionary {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.db = null;
|
this.db = null;
|
||||||
this.dbVer = 4;
|
this.dbVer = 5;
|
||||||
this.entities = null;
|
this.entities = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -34,8 +34,7 @@ class Dictionary {
|
|||||||
terms: '++id, dictionary, expression, reading',
|
terms: '++id, dictionary, expression, reading',
|
||||||
kanji: '++, dictionary, character',
|
kanji: '++, dictionary, character',
|
||||||
entities: '++, dictionary',
|
entities: '++, dictionary',
|
||||||
termDicts: '++, dictionary',
|
dictionaries: '++, dictionary, version',
|
||||||
kanjiDicts: '++, dictionary, version',
|
|
||||||
meta: 'name, value',
|
meta: 'name, value',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -138,7 +137,7 @@ class Dictionary {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const indexLoaded = (dictionary, version, entities) => {
|
const indexLoaded = (dictionary, version, entities) => {
|
||||||
return this.db.termDicts.add({dictionary, version}).then(() => {
|
return this.db.dictionaries.add({dictionary, version}).then(() => {
|
||||||
this.entities = entities || {};
|
this.entities = entities || {};
|
||||||
|
|
||||||
const rows = [];
|
const rows = [];
|
||||||
@ -182,7 +181,7 @@ class Dictionary {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const indexLoaded = (dictionary, version) => {
|
const indexLoaded = (dictionary, version) => {
|
||||||
return this.db.kanjiDicts.add({dictionary, version});
|
return this.db.dictionaries.add({dictionary, version});
|
||||||
};
|
};
|
||||||
|
|
||||||
const entriesLoaded = (dictionary, version, entries, total, current) => {
|
const entriesLoaded = (dictionary, version, entries, total, current) => {
|
||||||
|
@ -62,6 +62,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<h3>Dictionaries</h3>
|
||||||
|
|
||||||
|
<div name="dictionaries">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div>
|
||||||
<img src="img/spinner.gif" class="pull-right" id="anki-spinner" alt>
|
<img src="img/spinner.gif" class="pull-right" id="anki-spinner" alt>
|
||||||
|
Loading…
Reference in New Issue
Block a user