get-logins messages

This commit is contained in:
antelle 2021-04-27 14:29:00 +02:00
parent f52a00a156
commit 4477c3fc2c
No known key found for this signature in database
GPG Key ID: 63C9777AAB7C563C
2 changed files with 36 additions and 3 deletions

View File

@ -29,6 +29,10 @@ const Errors = {
userRejected: {
message: Locale.extensionErrorUserRejected,
code: '6'
},
noMatches: {
message: Locale.extensionErrorNoMatches,
code: '15'
}
};
@ -394,10 +398,38 @@ const ProtocolHandlers = {
},
async 'get-logins'(request) {
decryptRequest(request);
const payload = decryptRequest(request);
await checkContentRequestPermissions(request);
throw new Error('Not implemented');
if (!payload.url) {
throw new Error('Empty url');
}
// const files = getAvailableFiles(request);
const client = getClient(request);
// throw makeError(Errors.noMatches);
client.stats.passwordsRead++;
return encryptResponse(request, {
success: 'true',
version: getVersion(request),
hash: KeeWebHash,
count: 1,
entries: [
{
group: 'Group1',
login: 'urls-user',
name: 'URLS',
password: 'urls-passs',
skipAutoSubmit: 'false',
stringFields: [],
uuid: '7cfc6ceb56674f26bad6ff79d73a06f5'
}
],
id: ''
});
},
async 'get-totp'(request) {

View File

@ -774,7 +774,8 @@
"extensionErrorNoOpenFiles": "No open files",
"extensionErrorUserRejected": "The request was denied",
"extensionErrorAlertDisplayed": "Cannot ask a question now because there's another alert displayed, please try again",
"extensionErrorNoMatches": "No matching logins",
"extensionErrorAlertDisplayed": "Cannot ask a question now because there's another dialog displayed, please try again",
"extensionConnectHeader": "Extension data exchange",
"extensionConnectIntro": "A browser extension that identifies itself as {} tries to exchange data with KeeWeb.",
"extensionConnectUnknownActivity": "KeeWeb doesn't verify that the connected application is what it pretends to be. Approve the request only if you recognize this activity.",