1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 16:23:44 +00:00

convert password generator to jslib

This commit is contained in:
Kyle Spearrin
2018-01-09 17:55:28 -05:00
parent 79aca025d0
commit eb031eda0f
4 changed files with 10 additions and 250 deletions

View File

@@ -3,7 +3,10 @@ import BrowserApi from '../browser/browserApi';
import MainBackground from './main.background';
import CipherService from '../services/cipher.service';
import PasswordGenerationService from '../services/passwordGeneration.service';
import {
PasswordGenerationService,
} from 'jslib/abstractions';
import { UtilsService } from 'jslib/services/utils.service';
@@ -32,7 +35,7 @@ export default class ContextMenusBackground {
private async generatePasswordToClipboard() {
const options = await this.passwordGenerationService.getOptions();
const password = PasswordGenerationService.generatePassword(options);
const password = this.passwordGenerationService.generatePassword(options);
UtilsService.copyToClipboard(password);
this.passwordGenerationService.addHistory(password);