Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions vault/static/src/backend/vault.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,24 +44,6 @@ const vaultService = {
}

class Vault {
/**
* Check if the user actually has keys otherwise generate them on init
*
* @override
*/
constructor() {
const self = this;

function waitAndCheck() {
if (!vault_utils.supported()) return null;

if (odoo.isReady) self._initialize_keys();
else setTimeout(waitAndCheck, 500);
}

setTimeout(waitAndCheck, 500);
}

/**
* Generate a new key pair and export to database and object store
*/
Expand Down
8 changes: 2 additions & 6 deletions vault/static/src/common/vault_utils_service.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ export class AskPassDialog extends Component {
}

onCancel() {
this.props.onReject(_t("Cancelled"));
this.props.close();
}
}
Expand Down Expand Up @@ -88,7 +87,6 @@ export class GeneratePassDialog extends Component {
}

onCancel() {
this.props.onReject(_t("Cancelled"));
this.props.close();
}

Expand All @@ -111,22 +109,20 @@ export const vaultUtilsService = {
title,
confirm: Boolean(options.confirm),
};
return new Promise((resolve, reject) => {
return new Promise((resolve) => {
dialog.add(AskPassDialog, {
...props,
onResolve: resolve,
onReject: reject,
});
});
}

function generate_pass(title, options = {}) {
const props = {title, ...options};
return new Promise((resolve, reject) => {
return new Promise((resolve) => {
dialog.add(GeneratePassDialog, {
...props,
onResolve: resolve,
onReject: reject,
});
});
}
Expand Down
Loading