1
0
mirror of https://github.com/bitwarden/desktop.git synced 2024-11-24 11:55:50 +01:00

Add flexbox to cipher list to correct display center issue.

This commit is contained in:
Chad Griffis 2021-05-01 23:55:49 +08:00
parent 20b8a83dd8
commit 0c12367721
2 changed files with 25 additions and 13 deletions

View File

@ -12,20 +12,22 @@
(scrolled)="loadMore()">
<a *ngFor="let c of filteredCiphers" appStopClick (click)="selectCipher(c)"
(contextmenu)="rightClickCipher(c)" href="#" title="{{'viewItem' | i18n}}"
[ngClass]="{'active': c.id === activeCipherId}">
[ngClass]="{'active': c.id === activeCipherId}" class="flex-list-item">
<app-vault-icon [cipher]="c"></app-vault-icon>
<span class="text">
{{c.name}}
<ng-container *ngIf="c.organizationId">
<i class="fa fa-share-alt text-muted" title="{{'shared' | i18n}}" aria-hidden="true"></i>
<span class="sr-only">{{'shared' | i18n}}</span>
</ng-container>
<ng-container *ngIf="c.hasAttachments">
<i class="fa fa-paperclip text-muted" title="{{'attachments' | i18n}}" aria-hidden="true"></i>
<span class="sr-only">{{'attachments' | i18n}}</span>
</ng-container>
</span>
<span class="detail">{{c.subTitle}}</span>
<a class='flex-cipher-list-item'>
<span class="text">
{{c.name}}
<ng-container *ngIf="c.organizationId">
<i class="fa fa-share-alt text-muted" title="{{'shared' | i18n}}" aria-hidden="true"></i>
<span class="sr-only">{{'shared' | i18n}}</span>
</ng-container>
<ng-container *ngIf="c.hasAttachments">
<i class="fa fa-paperclip text-muted" title="{{'attachments' | i18n}}" aria-hidden="true"></i>
<span class="sr-only">{{'attachments' | i18n}}</span>
</ng-container>
</span>
<span *ngIf="c.subTitle" class="detail">{{c.subTitle}}</span>
</a>
</a>
</div>
<div class="no-items" *ngIf="!filteredCiphers.length">

View File

@ -130,4 +130,14 @@
}
}
}
.flex-cipher-list-item {
flex-direction: column;
flex-wrap: nowrap;
justify-content: center;
align-items: flex-start;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}