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();
|
||||
} else {
|
||||
this.cipher = new CipherView();
|
||||
this.cipher.folderId = null; // TODO
|
||||
this.cipher.folderId = this.folderId;
|
||||
this.cipher.type = CipherType.Login;
|
||||
this.cipher.login = new LoginView();
|
||||
this.cipher.card = new CardView();
|
||||
|
@ -11,17 +11,17 @@
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="list">
|
||||
<a *ngFor="let cipher of ciphers" appStopClick (click)="cipherClicked(cipher)"
|
||||
href="#" title="{{'viewItem' | i18n}}">
|
||||
<app-vault-icon [cipher]="cipher"></app-vault-icon>
|
||||
<a *ngFor="let c of ciphers" appStopClick (click)="cipherClicked(c)"
|
||||
href="#" title="{{'viewItem' | i18n}}" [ngClass]="{'active': c.id === activeCipherId}">
|
||||
<app-vault-icon [cipher]="c"></app-vault-icon>
|
||||
<span class="text">
|
||||
{{cipher.name}}
|
||||
<i class="fa fa-share-alt text-muted" *ngIf="cipher.organizationId"
|
||||
{{c.name}}
|
||||
<i class="fa fa-share-alt text-muted" *ngIf="c.organizationId"
|
||||
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>
|
||||
</span>
|
||||
<span class="detail">{{cipher.subTitle}}</span>
|
||||
<span class="detail">{{c.subTitle}}</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -17,6 +17,7 @@ import { CipherService } from 'jslib/abstractions/cipher.service';
|
||||
template: template,
|
||||
})
|
||||
export class CiphersComponent implements OnInit {
|
||||
@Input() activeCipherId: string = null;
|
||||
@Output() onCipherClicked = new EventEmitter<CipherView>();
|
||||
@Output() onAddCipher = new EventEmitter();
|
||||
|
||||
|
@ -7,6 +7,7 @@
|
||||
(onCollectionClicked)="filterCollection($event.id)">
|
||||
</app-vault-groupings>
|
||||
<app-vault-ciphers id="items"
|
||||
[activeCipherId]="cipherId"
|
||||
(onCipherClicked)="viewCipher($event)"
|
||||
(onAddCipher)="addCipher($event)">
|
||||
</app-vault-ciphers>
|
||||
@ -17,7 +18,7 @@
|
||||
</app-vault-view>
|
||||
<app-vault-add-edit id="details"
|
||||
*ngIf="action === 'add' || action === 'edit'"
|
||||
[folderId]="null"
|
||||
[folderId]="action === 'add' && folderId !== 'none' ? folderId : null"
|
||||
[cipherId]="action === 'edit' ? cipherId : null"
|
||||
(onSavedCipher)="savedCipher($event)"
|
||||
(onDeletedCipher)="deletedCipher($event)"
|
||||
|
@ -34,11 +34,16 @@
|
||||
background-color: $list-item-hover;
|
||||
}
|
||||
|
||||
&:not(:hover):focus {
|
||||
&.active {
|
||||
border-left: 5px solid $brand-primary;
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
&:focus:not(.active) {
|
||||
border-left: 5px solid $text-muted;
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
.text, .detail {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
|
Loading…
Reference in New Issue
Block a user