1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 07:43:35 +00:00

Add a "launch site" button directly to the list of ciphers (#384)

* Add a button to launch the primary uri for a site straight from the list.

* Take cues from the add-edit component on properly checking if we can launch.

* Move the launch button to the dropdown menu.

* Take LoginView as launch parameter instead of LoginUriView.
This commit is contained in:
Shawn Beachy
2019-04-26 09:07:57 -04:00
committed by Kyle Spearrin
parent 96cc9c681c
commit 1060775cad
2 changed files with 16 additions and 1 deletions

View File

@@ -19,6 +19,7 @@ import { CiphersComponent as BaseCiphersComponent } from 'jslib/angular/componen
import { CipherType } from 'jslib/enums/cipherType';
import { CipherView } from 'jslib/models/view/cipherView';
import { LoginView } from 'jslib/models/view/loginView';
const MaxCheckedCount = 500;
@@ -50,6 +51,15 @@ export class CiphersComponent extends BaseCiphersComponent implements OnDestroy
(c as any).checked = select == null ? !(c as any).checked : select;
}
launch(view: LoginView) {
if (!view.canLaunch) {
return;
}
this.platformUtilsService.eventTrack('Launched Login URI');
this.platformUtilsService.launchUri(view.launchUri);
}
selectAll(select: boolean) {
if (select) {
this.selectAll(false);