diff options
author | siikamiika <siikamiika@users.noreply.github.com> | 2017-10-24 16:23:13 +0300 |
---|---|---|
committer | siikamiika <siikamiika@users.noreply.github.com> | 2017-10-24 16:23:13 +0300 |
commit | 78442fff1a995632f2b315994f2540459ee20eca (patch) | |
tree | 171311101b93d3a5be284c3dab93987f663fefe4 /ext/bg/js/database.js | |
parent | df0d2beb735c75948feccd64398e6187c61c2fde (diff) |
settings: main dictionary selection as dropdown
Diffstat (limited to 'ext/bg/js/database.js')
-rw-r--r-- | ext/bg/js/database.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/ext/bg/js/database.js b/ext/bg/js/database.js index 9e90e6de..fcf8ef3f 100644 --- a/ext/bg/js/database.js +++ b/ext/bg/js/database.js @@ -228,6 +228,21 @@ class Database { } } + async getTitlesWithSequences() { + if (!this.db) { + throw 'Database not initialized'; + } + + const titles = []; + await this.db.dictionaries.each(row => { + if (row.hasSequences) { + titles.push(row.title); + } + }); + + return titles; + } + async importDictionary(archive, callback) { if (!this.db) { throw 'Database not initialized'; |