aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/database.js
diff options
context:
space:
mode:
authorsiikamiika <siikamiika@users.noreply.github.com>2017-10-24 16:23:13 +0300
committersiikamiika <siikamiika@users.noreply.github.com>2017-10-24 16:23:13 +0300
commit78442fff1a995632f2b315994f2540459ee20eca (patch)
tree171311101b93d3a5be284c3dab93987f663fefe4 /ext/bg/js/database.js
parentdf0d2beb735c75948feccd64398e6187c61c2fde (diff)
settings: main dictionary selection as dropdown
Diffstat (limited to 'ext/bg/js/database.js')
-rw-r--r--ext/bg/js/database.js15
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';