Ver a proveniência

Select site field and open suggestions after web extension opened

When the user open the pop up of the web extension, site field is automatically populated with the base domain name.
On site https://www.example.org/ site field become www.example.org.
Some users use example.org, some other example only, some users a custom site.

It's easy now to:
 - remove the site by hitting backspace
 - or hitting arrow down to get the first entry: example
 - or hitting arrow down x 2 to get example.org
 - or hitting tab to keep www.example.org and go on login

Fixes: https://github.com/lesspass/lesspass/issues/386
Fixes: https://github.com/lesspass/lesspass/issues/439
pull/448/head
Guillaume Vincent há 5 anos
ascendente
cometimento
99f089ed66
6 ficheiros alterados com 30 adições e 23 eliminações
  1. +1
    -1
      packages/lesspass-pure/cypress/integration/connectedMode.spec.js
  2. +3
    -3
      packages/lesspass-pure/cypress/integration/passwordGeneration.spec.js
  3. +4
    -4
      packages/lesspass-pure/dist/lesspass.min.js
  4. +5
    -1
      packages/lesspass-pure/src/components/InputSite.vue
  5. +13
    -10
      packages/lesspass-pure/src/views/PasswordGenerator.vue
  6. +4
    -4
      packages/lesspass-web-extension/extension/dist/lesspass.min.js

+ 1
- 1
packages/lesspass-pure/cypress/integration/connectedMode.spec.js Ver ficheiro

@@ -9,7 +9,7 @@ describe("Connected Mode", function() {
cy.get("#fingerprint .fa-btc").should("be.visible");
cy.get("#fingerprint .fa-subway").should("be.visible");
cy.get("#signInButton").click();
cy.get("#siteField").type("lesspass.com");
cy.get("#siteField").type("lesspass.com").blur();
cy.get("#login").type("test@lesspass.com");
cy.get("#passwordField").type("test@lesspass.com");
cy.get("#generatePassword__btn").click();


+ 3
- 3
packages/lesspass-pure/cypress/integration/passwordGeneration.spec.js Ver ficheiro

@@ -19,7 +19,7 @@ describe("Password Generation", function() {
}

cy.visit("/");
cy.get("#siteField").type("lesspass.com");
cy.get("#siteField").type("lesspass.com").blur();
cy.get("#login").type("test@lesspass.com");
cy.get("#passwordField").type("test@lesspass.com");
cy.wait(500);
@@ -105,7 +105,7 @@ describe("Password Generation", function() {
});
it("should generate password when hit enter nrt_266", function() {
cy.visit("/");
cy.get("#siteField").type("lesspass.com");
cy.get("#siteField").type("lesspass.com").blur();
cy.get("#login").type("test@lesspass.com");
cy.get("#passwordField")
.type("test@lesspass.com")
@@ -129,7 +129,7 @@ describe("Password Generation", function() {
});
it("should clear password generated when master password change", function() {
cy.visit("/");
cy.get("#siteField").type("example.org");
cy.get("#siteField").type("example.org").blur();
cy.get("#login").type("user");
cy.get("#passwordField").type("password");
cy.get("#generatePassword__btn").should("be.visible");


+ 4
- 4
packages/lesspass-pure/dist/lesspass.min.js
A apresentação das diferenças no ficheiro foi suprimida por ser demasiado grande
Ver ficheiro


+ 5
- 1
packages/lesspass-pure/src/components/InputSite.vue Ver ficheiro

@@ -38,7 +38,9 @@
}
},
mounted() {
this.awesomplete = new Awesomplete(this.$refs.siteField);
this.awesomplete = new Awesomplete(this.$refs.siteField,{
minChars: 0,
});
this.awesomplete.item = (element, input) => {
let item = Awesomplete.ITEM(element.value.site, input);
item.innerHTML += ` ${element.value.login}`;
@@ -80,6 +82,8 @@
return {site: suggestion, suggestion: true, login: ''}
});
this.awesomplete.list = this.passwords.concat(suggestions);
this.awesomplete.evaluate();
this.awesomplete.open();
}
},
methods: {}


+ 13
- 10
packages/lesspass-pure/src/views/PasswordGenerator.vue Ver ficheiro

@@ -227,16 +227,19 @@ export default {
});
},
focusBestInputField() {
try {
const site = this.$refs.site.$refs.siteField;
const login = this.$refs.login;
const masterPassword = this.$refs.masterPassword;
if (site && !site.value) return void site.focus();
if (login && !login.value) return void login.focus();
masterPassword.$refs.passwordField.focus();
}
catch(err) {
console.error("Can't focus password field")
const site = this.$refs.site;
const login = this.$refs.login;
const masterPassword = this.$refs.masterPassword;
if (site && login && masterPassword){
const siteField = site.$refs.siteField;
if (siteField.value && login.value){
return void masterPassword.$refs.passwordField.focus();
}
if (siteField.value && !login.value){
return void siteField.select();
}else{
return void siteField.focus();
}
}
},
copyPassword() {


+ 4
- 4
packages/lesspass-web-extension/extension/dist/lesspass.min.js
A apresentação das diferenças no ficheiro foi suprimida por ser demasiado grande
Ver ficheiro


Carregando…
Cancelar
Guardar