Use consistent naming convention for launchCipher

This commit is contained in:
Thomas Rittson 2021-01-28 07:45:54 +10:00
parent 4045ce2d15
commit ea1a1cc99b
5 changed files with 10 additions and 10 deletions

View File

@ -2,7 +2,7 @@
<i class="fa fa-lg fa-list-alt" aria-hidden="true"></i>
</span>
<ng-container *ngIf="cipher.type === cipherType.Login">
<span class="row-btn" appStopClick appStopProp appA11yTitle="{{'launch' | i18n}}" (click)="launch()"
<span class="row-btn" appStopClick appStopProp appA11yTitle="{{'launch' | i18n}}" (click)="launchCipher()"
*ngIf="!showView" [ngClass]="{disabled: !cipher.login.canLaunch}">
<i class="fa fa-lg fa-share-square-o" aria-hidden="true"></i>
</span>

View File

@ -29,7 +29,7 @@ import { PopupUtilsService } from '../services/popup-utils.service';
})
export class ActionButtonsComponent {
@Output() onView = new EventEmitter<CipherView>();
@Output() onLaunch = new EventEmitter<CipherView>();
@Output() launchEvent = new EventEmitter<CipherView>();
@Input() cipher: CipherView;
@Input() showView = false;
@ -45,8 +45,8 @@ export class ActionButtonsComponent {
this.userHasPremiumAccess = await this.userService.canAccessPremium();
}
launch() {
this.onLaunch.emit(this.cipher);
launchCipher() {
this.launchEvent.emit(this.cipher);
}
async copy(cipher: CipherView, value: string, typeI18nKey: string, aType: string) {

View File

@ -1,4 +1,4 @@
<a *ngFor="let c of ciphers" (click)="selectCipher(c)" (dblclick)="doubleSelectCipher(c)" href="#" appStopClick
<a *ngFor="let c of ciphers" (click)="selectCipher(c)" (dblclick)="launchCipher(c)" href="#" appStopClick
title="{{title}} - {{c.name}}" class="box-content-row box-content-row-flex">
<div class="row-main">
<app-vault-icon [cipher]="c"></app-vault-icon>
@ -17,7 +17,7 @@
<span class="detail">{{c.subTitle}}</span>
</div>
</div>
<app-action-buttons [cipher]="c" [showView]="showView" (onView)="viewCipher(c)" (onLaunch)="doubleSelectCipher(c)"
<app-action-buttons [cipher]="c" [showView]="showView" (onView)="viewCipher(c)" (launchEvent)="launchCipher(c)"
class="action-buttons">
</app-action-buttons>
</a>

View File

@ -15,7 +15,7 @@ import { CipherView } from 'jslib/models/view/cipherView';
})
export class CiphersListComponent {
@Output() onSelected = new EventEmitter<CipherView>();
@Output() onDoubleSelected = new EventEmitter<CipherView>();
@Output() launchEvent = new EventEmitter<CipherView>();
@Output() onView = new EventEmitter<CipherView>();
@Input() ciphers: CipherView[];
@Input() showView = false;
@ -27,8 +27,8 @@ export class CiphersListComponent {
this.onSelected.emit(c);
}
doubleSelectCipher(c: CipherView) {
this.onDoubleSelected.emit(c);
launchCipher(c: CipherView) {
this.launchEvent.emit(c);
}
viewCipher(c: CipherView) {

View File

@ -72,7 +72,7 @@
</div>
<div class="box-content">
<app-ciphers-list [ciphers]="filteredCiphers" title="{{'viewItem' | i18n}}"
(onSelected)="selectCipher($event)" (onDoubleSelected)="launchCipher($event)"></app-ciphers-list>
(onSelected)="selectCipher($event)" (launchEvent)="launchCipher($event)"></app-ciphers-list>
</div>
</div>
</ng-container>