1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-23 11:56:00 +01:00

rename select functions

This commit is contained in:
Kyle Spearrin 2018-04-05 09:11:56 -04:00
parent d9ff799681
commit b5f9920a92
2 changed files with 13 additions and 13 deletions

View File

@ -2,12 +2,12 @@
<div class="inner-content"> <div class="inner-content">
<ul> <ul>
<li [ngClass]="{active: selectedAll}"> <li [ngClass]="{active: selectedAll}">
<a href="#" appStopClick appBlurClick (click)="all()"> <a href="#" appStopClick appBlurClick (click)="selectAll()">
<i class="fa fa-fw fa-th"></i>&nbsp;{{'allItems' | i18n}} <i class="fa fa-fw fa-th"></i>&nbsp;{{'allItems' | i18n}}
</a> </a>
</li> </li>
<li [ngClass]="{active: selectedFavorites}"> <li [ngClass]="{active: selectedFavorites}">
<a href="#" appStopClick appBlurClick (click)="favorites()"> <a href="#" appStopClick appBlurClick (click)="selectFavorites()">
<i class="fa fa-fw fa-star"></i>&nbsp;{{'favorites' | i18n}} <i class="fa fa-fw fa-star"></i>&nbsp;{{'favorites' | i18n}}
</a> </a>
</li> </li>
@ -15,22 +15,22 @@
<h2>{{'types' | i18n}}</h2> <h2>{{'types' | i18n}}</h2>
<ul> <ul>
<li [ngClass]="{active: selectedType === cipherType.Login}"> <li [ngClass]="{active: selectedType === cipherType.Login}">
<a href="#" appStopClick appBlurClick (click)="type(cipherType.Login)"> <a href="#" appStopClick appBlurClick (click)="selectType(cipherType.Login)">
<i class="fa fa-fw fa-globe"></i>&nbsp;{{'typeLogin' | i18n}} <i class="fa fa-fw fa-globe"></i>&nbsp;{{'typeLogin' | i18n}}
</a> </a>
</li> </li>
<li [ngClass]="{active: selectedType === cipherType.Card}"> <li [ngClass]="{active: selectedType === cipherType.Card}">
<a href="#" appStopClick appBlurClick (click)="type(cipherType.Card)"> <a href="#" appStopClick appBlurClick (click)="selectType(cipherType.Card)">
<i class="fa fa-fw fa-credit-card"></i>&nbsp;{{'typeCard' | i18n}} <i class="fa fa-fw fa-credit-card"></i>&nbsp;{{'typeCard' | i18n}}
</a> </a>
</li> </li>
<li [ngClass]="{active: selectedType === cipherType.Identity}"> <li [ngClass]="{active: selectedType === cipherType.Identity}">
<a href="#" appStopClick appBlurClick (click)="type(cipherType.Identity)"> <a href="#" appStopClick appBlurClick (click)="selectType(cipherType.Identity)">
<i class="fa fa-fw fa-id-card-o"></i>&nbsp;{{'typeIdentity' | i18n}} <i class="fa fa-fw fa-id-card-o"></i>&nbsp;{{'typeIdentity' | i18n}}
</a> </a>
</li> </li>
<li [ngClass]="{active: selectedType === cipherType.SecureNote}"> <li [ngClass]="{active: selectedType === cipherType.SecureNote}">
<a href="#" appStopClick appBlurClick (click)="type(cipherType.SecureNote)"> <a href="#" appStopClick appBlurClick (click)="selectType(cipherType.SecureNote)">
<i class="fa fa-fw fa-sticky-note-o"></i>&nbsp;{{'typeSecureNote' | i18n}} <i class="fa fa-fw fa-sticky-note-o"></i>&nbsp;{{'typeSecureNote' | i18n}}
</a> </a>
</li> </li>
@ -45,7 +45,7 @@
</h2> </h2>
<ul class="fa-ul"> <ul class="fa-ul">
<li *ngFor="let f of folders" [ngClass]="{active: selectedFolder && f.id === selectedFolderId}"> <li *ngFor="let f of folders" [ngClass]="{active: selectedFolder && f.id === selectedFolderId}">
<a href="#" appStopClick appBlurClick (click)="folder(f)"> <a href="#" appStopClick appBlurClick (click)="selectFolder(f)">
<i class="fa-li fa fa-caret-right"></i> {{f.name}} <i class="fa-li fa fa-caret-right"></i> {{f.name}}
<span appStopProp appStopClick (click)="editFolder(f)" title="{{'editFolder' | i18n}}" <span appStopProp appStopClick (click)="editFolder(f)" title="{{'editFolder' | i18n}}"
*ngIf="f.id"> *ngIf="f.id">
@ -58,7 +58,7 @@
<h2>{{'collections' | i18n}}</h2> <h2>{{'collections' | i18n}}</h2>
<ul class="fa-ul"> <ul class="fa-ul">
<li *ngFor="let c of collections" [ngClass]="{active: c.id === selectedCollectionId}"> <li *ngFor="let c of collections" [ngClass]="{active: c.id === selectedCollectionId}">
<a href="#" appStopClick appBlurClick (click)="collection(c)"> <a href="#" appStopClick appBlurClick (click)="selectCollection(c)">
<i class="fa-li fa fa-caret-right"></i> {{c.name}} <i class="fa-li fa fa-caret-right"></i> {{c.name}}
</a> </a>
</li> </li>

View File

@ -55,25 +55,25 @@ export class GroupingsComponent {
this.folders = await this.folderService.getAllDecrypted(); this.folders = await this.folderService.getAllDecrypted();
} }
all() { selectAll() {
this.clearSelections(); this.clearSelections();
this.selectedAll = true; this.selectedAll = true;
this.onAllClicked.emit(); this.onAllClicked.emit();
} }
favorites() { selectFavorites() {
this.clearSelections(); this.clearSelections();
this.selectedFavorites = true; this.selectedFavorites = true;
this.onFavoritesClicked.emit(); this.onFavoritesClicked.emit();
} }
type(type: CipherType) { selectType(type: CipherType) {
this.clearSelections(); this.clearSelections();
this.selectedType = type; this.selectedType = type;
this.onCipherTypeClicked.emit(type); this.onCipherTypeClicked.emit(type);
} }
folder(folder: FolderView) { selectFolder(folder: FolderView) {
this.clearSelections(); this.clearSelections();
this.selectedFolder = true; this.selectedFolder = true;
this.selectedFolderId = folder.id; this.selectedFolderId = folder.id;
@ -88,7 +88,7 @@ export class GroupingsComponent {
this.onEditFolder.emit(folder); this.onEditFolder.emit(folder);
} }
collection(collection: CollectionView) { selectCollection(collection: CollectionView) {
this.clearSelections(); this.clearSelections();
this.selectedCollectionId = collection.id; this.selectedCollectionId = collection.id;
this.onCollectionClicked.emit(collection); this.onCollectionClicked.emit(collection);