fix(web): reset hyous mts on reloading database

This commit is contained in:
Masahiko AMANO 2023-02-12 16:17:38 +03:00
parent 39215e02ce
commit 5f8cb21f03
2 changed files with 6 additions and 3 deletions

View File

@ -20,6 +20,9 @@ $(document).on("click", "#btn-discard", function (e) {
}
let resp = tdb_query(db_name, 2);
if (resp.status) {
localStorage["sasahyou_mts"] = sasahyou_mts = 0;
localStorage["sappyou_mts"] = sappyou_mts = 0;
localStorage["shoppyou_mts"] = shoppyou_mts = 0;
alert("Successfully reloaded database!");
} else {
alert("Something went wrong!");

View File

@ -47,9 +47,9 @@ $(document).on("submit", "#settings", function (e) {
localStorage["tfm_db_name"] = db_name = db_name_val;
found = true;
db_name_input.removeClass("is-invalid");
sasahyou_mts = 0;
sappyou_mts = 0;
shoppyou_mts = 0;
localStorage["sasahyou_mts"] = sasahyou_mts = 0;
localStorage["sappyou_mts"] = sappyou_mts = 0;
localStorage["shoppyou_mts"] = shoppyou_mts = 0;
return false;
}
return true;