Pass launchCipher down to grandchild for reuse
This commit is contained in:
parent
1d79172876
commit
4045ce2d15
|
@ -29,6 +29,7 @@ import { PopupUtilsService } from '../services/popup-utils.service';
|
|||
})
|
||||
export class ActionButtonsComponent {
|
||||
@Output() onView = new EventEmitter<CipherView>();
|
||||
@Output() onLaunch = new EventEmitter<CipherView>();
|
||||
@Input() cipher: CipherView;
|
||||
@Input() showView = false;
|
||||
|
||||
|
@ -45,15 +46,7 @@ export class ActionButtonsComponent {
|
|||
}
|
||||
|
||||
launch() {
|
||||
if (this.cipher.type !== CipherType.Login || !this.cipher.login.canLaunch) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.analytics.eventTrack.next({ action: 'Launched URI From Listing' });
|
||||
BrowserApi.createNewTab(this.cipher.login.launchUri);
|
||||
if (this.popupUtilsService.inPopup(window)) {
|
||||
BrowserApi.closePopup(window);
|
||||
}
|
||||
this.onLaunch.emit(this.cipher);
|
||||
}
|
||||
|
||||
async copy(cipher: CipherView, value: string, typeI18nKey: string, aType: string) {
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
<span class="detail">{{c.subTitle}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<app-action-buttons [cipher]="c" [showView]="showView" (onView)="viewCipher(c)" class="action-buttons">
|
||||
<app-action-buttons [cipher]="c" [showView]="showView" (onView)="viewCipher(c)" (onLaunch)="doubleSelectCipher(c)"
|
||||
class="action-buttons">
|
||||
</app-action-buttons>
|
||||
</a>
|
||||
|
|
Loading…
Reference in New Issue