summaryrefslogtreecommitdiff
path: root/html
diff options
context:
space:
mode:
Diffstat (limited to 'html')
-rw-r--r--html/default_blocking_policy.js2
-rw-r--r--html/file_preview.js4
-rw-r--r--html/install.js5
-rw-r--r--html/text_entry_list.js2
4 files changed, 6 insertions, 7 deletions
diff --git a/html/default_blocking_policy.js b/html/default_blocking_policy.js
index b0577f7..edac02d 100644
--- a/html/default_blocking_policy.js
+++ b/html/default_blocking_policy.js
@@ -66,7 +66,7 @@ function update_policy(change)
async function track_default_allow()
{
const set_val = ch => default_allow = (ch.new_val || {}).value;
- const [tracking, settings] = await haketilodb.track.settings(update_policy);
+ const [tracking, settings] = await haketilodb.track.setting(update_policy);
for (const setting of settings) {
if (setting.name === "default_allow")
default_allow = setting.value;
diff --git a/html/file_preview.js b/html/file_preview.js
index 3e22225..be54201 100644
--- a/html/file_preview.js
+++ b/html/file_preview.js
@@ -55,8 +55,8 @@ function error(msg) {
async function show_preview(hash_key) {
const db = await haketilodb.get();
- const file = await haketilodb.idb_get(db.transaction("files"),
- "files", hash_key);
+ const file = await haketilodb.idb_get(db.transaction("file"),
+ "file", hash_key);
if (file === undefined) {
error("Couldn't find file in Haketilo's internal database :(");
} else {
diff --git a/html/install.js b/html/install.js
index df63626..2a72662 100644
--- a/html/install.js
+++ b/html/install.js
@@ -382,15 +382,14 @@ function InstallView(tab_id, on_view_show, on_view_hide) {
if (files !== undefined) {
const data = {file: {sha256: files}};
- const names = [["mappings", "mapping"], ["resources", "resource"]];
- for (const [set_name, type] of names) {
+ for (const type of ["resource", "mapping"]) {
const set = {};
for (const def of item_defs.filter(def => def.type === type))
set[def.identifier] = {[version_string(def.version)]: def};
- data[set_name] = set;
+ data[type] = set;
}
try {
diff --git a/html/text_entry_list.js b/html/text_entry_list.js
index 0ea2862..80895c9 100644
--- a/html/text_entry_list.js
+++ b/html/text_entry_list.js
@@ -311,7 +311,7 @@ async function repo_list(dialog_ctx) {
}
dialog.loader(dialog_ctx, "Loading repositories...");
- const [tracking, items] = await haketilodb.track.repos(onchange);
+ const [tracking, items] = await haketilodb.track.repo(onchange);
dialog.close(dialog_ctx);
list = new TextEntryList(dialog_ctx, () => haketilodb.untrack(tracking),