Browse Source

move showTooltip in password generator file

pull/342/head
Guillaume Vincent 7 years ago
parent
commit
46472fbd58
2 changed files with 10 additions and 10 deletions
  1. +0
    -8
      src/api/tooltip.js
  2. +10
    -2
      src/views/PasswordGenerator.vue

+ 0
- 8
src/api/tooltip.js View File

@@ -1,8 +0,0 @@
export function showTooltip(elem, msg) {
var classNames = elem.className;
elem.setAttribute('class', classNames + ' hint--right');
elem.setAttribute('aria-label', msg);
setTimeout(function () {
elem.setAttribute('class', classNames);
}, 2000);
}

+ 10
- 2
src/views/PasswordGenerator.vue View File

@@ -1,6 +1,6 @@
<style> <style>
#generated-password { #generated-password {
font-family: Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,sans-serif;
font-family: Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, sans-serif;
} }


#password-generator { #password-generator {
@@ -209,7 +209,6 @@
import LessPass from 'lesspass'; import LessPass from 'lesspass';
import {mapGetters} from 'vuex'; import {mapGetters} from 'vuex';
import Clipboard from 'clipboard'; import Clipboard from 'clipboard';
import {showTooltip} from '../api/tooltip';
import Password from '../domain/password'; import Password from '../domain/password';
import {getSite} from '../domain/url-parser'; import {getSite} from '../domain/url-parser';
import RemoveAutoComplete from '../components/RemoveAutoComplete.vue'; import RemoveAutoComplete from '../components/RemoveAutoComplete.vue';
@@ -221,6 +220,15 @@
return store.dispatch('FETCH_PASSWORDS') return store.dispatch('FETCH_PASSWORDS')
} }


function showTooltip(elem, msg) {
var classNames = elem.className;
elem.setAttribute('class', classNames + ' hint--right');
elem.setAttribute('aria-label', msg);
setTimeout(function () {
elem.setAttribute('class', classNames);
}, 2000);
}

export default { export default {
name: 'password-generator-view', name: 'password-generator-view',
components: { components: {


Loading…
Cancel
Save