update so add access filter resets on org switch, and if addaccess logic will only apply to collections

This commit is contained in:
jng 2024-04-25 16:15:47 -04:00
parent 8f132fc6a1
commit f947271e4b
No known key found for this signature in database
GPG Key ID: AF822623CAD19C85
1 changed files with 6 additions and 1 deletions

View File

@ -254,6 +254,11 @@ export class VaultComponent implements OnInit, OnDestroy {
.pipe(takeUntil(this.destroy$)) .pipe(takeUntil(this.destroy$))
.subscribe((activeFilter) => { .subscribe((activeFilter) => {
this.activeFilter = activeFilter; this.activeFilter = activeFilter;
// watch the active filters. Only show toggle when viewing the collections filter
if (!this.activeFilter.collectionId) {
this.showAddAccessToggle = false;
}
}); });
this.searchText$ this.searchText$
@ -323,7 +328,7 @@ export class VaultComponent implements OnInit, OnDestroy {
const allCiphers$ = organization$.pipe( const allCiphers$ = organization$.pipe(
concatMap(async (organization) => { concatMap(async (organization) => {
// If user swaps organization reset the addAccessToggle // If user swaps organization reset the addAccessToggle
if (!this.showAddAccessToggle) { if (!this.showAddAccessToggle || organization) {
this.addAccessToggle(0); this.addAccessToggle(0);
} }
let ciphers; let ciphers;