1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-12-01 13:13:36 +01:00

Various small vault filter fixes (#1659)

This commit is contained in:
Robyn MacCallum 2022-05-10 17:33:53 -04:00 committed by GitHub
parent 9627782a04
commit 9f977cfc68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 21 additions and 26 deletions

View File

@ -78,14 +78,12 @@
</ul> </ul>
</ng-container> </ng-container>
<ng-container *ngSwitchCase="'singleOrganizationAndPersonalOwnershipPolicies'"> <ng-container *ngSwitchCase="'singleOrganizationAndPersonalOwnershipPolicies'">
<ul class="filter-options"> <div class="filter-heading">
<li class="filter-option active"> <button class="filter-button active">
<button class="filter-button"> <i class="bwi bwi-fw bwi-business" aria-hidden="true"></i>
<i class="bwi bwi-fw bwi-business" aria-hidden="true"></i> {{ organizations[0].name }}
{{ organizations[0].name }} </button>
</button> </div>
</li>
</ul>
</ng-container> </ng-container>
<ng-container *ngSwitchCase="'organizationMember'"> <ng-container *ngSwitchCase="'organizationMember'">
<div class="filter-heading"> <div class="filter-heading">
@ -140,7 +138,7 @@
<i class="bwi bwi-fw bwi-business" aria-hidden="true"></i> <i class="bwi bwi-fw bwi-business" aria-hidden="true"></i>
{{ organization.name }} {{ organization.name }}
</button> </button>
<ng-container *ngIf="organization.id === activeFilter.selectedOrganizationId"> <ng-container>
<button [bitMenuTriggerFor]="orgMenu" class="org-options ml-auto"> <button [bitMenuTriggerFor]="orgMenu" class="org-options ml-auto">
<i class="bwi bwi-ellipsis-v" aria-hidden="true"></i> <i class="bwi bwi-ellipsis-v" aria-hidden="true"></i>
</button> </button>

View File

@ -26,19 +26,17 @@
autocomplete="off" autocomplete="off"
appAutofocus appAutofocus
/> />
<div class="filter"> <app-organization-filter
<app-organization-filter *ngIf="showOrgFilter"
*ngIf="showOrgFilter" [hide]="hideOrganizations"
[hide]="hideOrganizations" [activeFilter]="activeFilter"
[activeFilter]="activeFilter" [collapsedFilterNodes]="collapsedFilterNodes"
[collapsedFilterNodes]="collapsedFilterNodes" [organizations]="organizations"
[organizations]="organizations" [activePersonalOwnershipPolicy]="activePersonalOwnershipPolicy"
[activePersonalOwnershipPolicy]="activePersonalOwnershipPolicy" [activeSingleOrganizationPolicy]="activeSingleOrganizationPolicy"
[activeSingleOrganizationPolicy]="activeSingleOrganizationPolicy" (onNodeCollapseStateChange)="toggleFilterNodeCollapseState($event)"
(onNodeCollapseStateChange)="toggleFilterNodeCollapseState($event)" (onFilterChange)="applyFilter($event)"
(onFilterChange)="applyFilter($event)" ></app-organization-filter>
></app-organization-filter>
</div>
<div class="filter"> <div class="filter">
<app-status-filter <app-status-filter
[hideFavorites]="!showFavorites" [hideFavorites]="!showFavorites"

View File

@ -86,7 +86,7 @@ export class OrganizationVaultComponent implements OnInit, OnDestroy {
this.ciphersComponent.organization = this.organization; this.ciphersComponent.organization = this.organization;
this.route.queryParams.pipe(first()).subscribe(async (qParams) => { this.route.queryParams.pipe(first()).subscribe(async (qParams) => {
// this.ciphersComponent.searchText = this.vaultFilterComponent.search = qParams.search; this.ciphersComponent.searchText = this.vaultFilterComponent.searchText = qParams.search;
if (!this.organization.canViewAllCollections) { if (!this.organization.canViewAllCollections) {
await this.syncService.fullSync(false); await this.syncService.fullSync(false);
this.broadcasterService.subscribe(BroadcasterSubscriptionId, (message: any) => { this.broadcasterService.subscribe(BroadcasterSubscriptionId, (message: any) => {

View File

@ -58,7 +58,8 @@ export class CiphersComponent extends BaseCiphersComponent {
); );
} }
async load(filter: (cipher: CipherView) => boolean = null) { async load(filter: (cipher: CipherView) => boolean = null, deleted = false) {
this.deleted = deleted || false;
if (this.organization.canEditAnyCollection) { if (this.organization.canEditAnyCollection) {
this.accessEvents = this.organization.useEvents; this.accessEvents = this.organization.useEvents;
this.allCiphers = await this.cipherService.getAllFromApiForOrganization(this.organization.id); this.allCiphers = await this.cipherService.getAllFromApiForOrganization(this.organization.id);

View File

@ -28,8 +28,6 @@
h3, h3,
button.filter-button { button.filter-button {
text-transform: uppercase;
text-transform: uppercase;
margin: 0; margin: 0;
@include themify($themes) { @include themify($themes) {
color: themed("textMuted"); color: themed("textMuted");