mirror of
https://github.com/bitwarden/desktop.git
synced 2024-11-24 11:55:50 +01:00
highlight active cipher and default folder for add
This commit is contained in:
parent
6d23338aa4
commit
7d2d4eafcb
@ -113,7 +113,7 @@ export class AddEditComponent implements OnChanges {
|
|||||||
this.cipher = await cipher.decrypt();
|
this.cipher = await cipher.decrypt();
|
||||||
} else {
|
} else {
|
||||||
this.cipher = new CipherView();
|
this.cipher = new CipherView();
|
||||||
this.cipher.folderId = null; // TODO
|
this.cipher.folderId = this.folderId;
|
||||||
this.cipher.type = CipherType.Login;
|
this.cipher.type = CipherType.Login;
|
||||||
this.cipher.login = new LoginView();
|
this.cipher.login = new LoginView();
|
||||||
this.cipher.card = new CardView();
|
this.cipher.card = new CardView();
|
||||||
|
@ -11,17 +11,17 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="list">
|
<div class="list">
|
||||||
<a *ngFor="let cipher of ciphers" appStopClick (click)="cipherClicked(cipher)"
|
<a *ngFor="let c of ciphers" appStopClick (click)="cipherClicked(c)"
|
||||||
href="#" title="{{'viewItem' | i18n}}">
|
href="#" title="{{'viewItem' | i18n}}" [ngClass]="{'active': c.id === activeCipherId}">
|
||||||
<app-vault-icon [cipher]="cipher"></app-vault-icon>
|
<app-vault-icon [cipher]="c"></app-vault-icon>
|
||||||
<span class="text">
|
<span class="text">
|
||||||
{{cipher.name}}
|
{{c.name}}
|
||||||
<i class="fa fa-share-alt text-muted" *ngIf="cipher.organizationId"
|
<i class="fa fa-share-alt text-muted" *ngIf="c.organizationId"
|
||||||
title="{{'shared' | i18n}}"></i>
|
title="{{'shared' | i18n}}"></i>
|
||||||
<i class="fa fa-paperclip text-muted" *ngIf="cipher.attachments"
|
<i class="fa fa-paperclip text-muted" *ngIf="c.hasAttachments"
|
||||||
title="{{'attachments' | i18n}}"></i>
|
title="{{'attachments' | i18n}}"></i>
|
||||||
</span>
|
</span>
|
||||||
<span class="detail">{{cipher.subTitle}}</span>
|
<span class="detail">{{c.subTitle}}</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -17,6 +17,7 @@ import { CipherService } from 'jslib/abstractions/cipher.service';
|
|||||||
template: template,
|
template: template,
|
||||||
})
|
})
|
||||||
export class CiphersComponent implements OnInit {
|
export class CiphersComponent implements OnInit {
|
||||||
|
@Input() activeCipherId: string = null;
|
||||||
@Output() onCipherClicked = new EventEmitter<CipherView>();
|
@Output() onCipherClicked = new EventEmitter<CipherView>();
|
||||||
@Output() onAddCipher = new EventEmitter();
|
@Output() onAddCipher = new EventEmitter();
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
(onCollectionClicked)="filterCollection($event.id)">
|
(onCollectionClicked)="filterCollection($event.id)">
|
||||||
</app-vault-groupings>
|
</app-vault-groupings>
|
||||||
<app-vault-ciphers id="items"
|
<app-vault-ciphers id="items"
|
||||||
|
[activeCipherId]="cipherId"
|
||||||
(onCipherClicked)="viewCipher($event)"
|
(onCipherClicked)="viewCipher($event)"
|
||||||
(onAddCipher)="addCipher($event)">
|
(onAddCipher)="addCipher($event)">
|
||||||
</app-vault-ciphers>
|
</app-vault-ciphers>
|
||||||
@ -17,7 +18,7 @@
|
|||||||
</app-vault-view>
|
</app-vault-view>
|
||||||
<app-vault-add-edit id="details"
|
<app-vault-add-edit id="details"
|
||||||
*ngIf="action === 'add' || action === 'edit'"
|
*ngIf="action === 'add' || action === 'edit'"
|
||||||
[folderId]="null"
|
[folderId]="action === 'add' && folderId !== 'none' ? folderId : null"
|
||||||
[cipherId]="action === 'edit' ? cipherId : null"
|
[cipherId]="action === 'edit' ? cipherId : null"
|
||||||
(onSavedCipher)="savedCipher($event)"
|
(onSavedCipher)="savedCipher($event)"
|
||||||
(onDeletedCipher)="deletedCipher($event)"
|
(onDeletedCipher)="deletedCipher($event)"
|
||||||
|
@ -34,11 +34,16 @@
|
|||||||
background-color: $list-item-hover;
|
background-color: $list-item-hover;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:not(:hover):focus {
|
&.active {
|
||||||
border-left: 5px solid $brand-primary;
|
border-left: 5px solid $brand-primary;
|
||||||
padding-left: 5px;
|
padding-left: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&:focus:not(.active) {
|
||||||
|
border-left: 5px solid $text-muted;
|
||||||
|
padding-left: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
.text, .detail {
|
.text, .detail {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
Loading…
Reference in New Issue
Block a user