2 Commits

Author SHA1 Message Date
a5f5e27b5f fix enableOTP handling to match docs: prioritize store, then extension config 2022-11-07 04:16:29 -08:00
e342264adf move getSetting from background.js -> helpers.js
it will have use in `detailsInterface.js`, not just `background.js`
(next patch).
2022-11-06 01:19:10 -08:00
2 changed files with 2 additions and 6 deletions

View File

@@ -870,7 +870,7 @@ function hostAction(settings, action, params = {}) {
async function parseFields(settings, login) {
var response = await hostAction(settings, "fetch", {
storeId: login.store.id,
file: login.loginPath,
file: login.login + ".gpg",
});
if (response.status != "ok") {
throw new Error(JSON.stringify(response)); // TODO handle host error

View File

@@ -87,14 +87,10 @@ function prepareLogins(files, settings) {
for (let storeId in files) {
for (let key in files[storeId]) {
// set login fields
const loginPath = files[storeId][key];
const lastDot = loginPath.lastIndexOf(".");
const loginName = lastDot < 0 ? loginPath : loginPath.substr(0, lastDot);
const login = {
index: index++,
store: settings.stores[storeId],
login: loginName,
loginPath: loginPath,
login: files[storeId][key].replace(/\.gpg$/i, ""),
allowFill: true,
};