mirror of
https://github.com/bitwarden/web
synced 2025-12-06 00:03:28 +00:00
Compare commits
9 Commits
feature/ap
...
fix/filter
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
35034c2ced | ||
|
|
27977ff4fe | ||
|
|
2ba01990a2 | ||
|
|
b45d249a7d | ||
|
|
48508ef87a | ||
|
|
bcfc09a173 | ||
|
|
ddcd6d1137 | ||
|
|
7c3f0320e7 | ||
|
|
b3f9136aea |
@@ -25,10 +25,6 @@ export class VaultFilterComponent extends BaseVaultFilterComponent {
|
||||
}
|
||||
|
||||
searchTextChanged() {
|
||||
this.onSearchTextChanged.emit(this.searchText.normalize("NFD").replace(/[\u0300-\u036f]/g, ""));
|
||||
}
|
||||
|
||||
async initCollections() {
|
||||
return await this.vaultFilterService.buildCollections(this.organization?.id);
|
||||
this.onSearchTextChanged.emit(this.searchText);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
import { NgModule } from "@angular/core";
|
||||
|
||||
import { VaultFilterService } from "jslib-angular/modules/vault-filter/vault-filter.service";
|
||||
import { CipherService } from "jslib-common/abstractions/cipher.service";
|
||||
import { CollectionService } from "jslib-common/abstractions/collection.service";
|
||||
import { FolderService } from "jslib-common/abstractions/folder.service";
|
||||
import { OrganizationService } from "jslib-common/abstractions/organization.service";
|
||||
import { PolicyService } from "jslib-common/abstractions/policy.service";
|
||||
import { StateService } from "jslib-common/abstractions/state.service";
|
||||
|
||||
import { SharedModule } from "../shared.module";
|
||||
|
||||
@@ -30,19 +24,6 @@ import { VaultFilterComponent } from "./vault-filter.component";
|
||||
TypeFilterComponent,
|
||||
],
|
||||
exports: [VaultFilterComponent],
|
||||
providers: [
|
||||
{
|
||||
provide: VaultFilterService,
|
||||
useClass: VaultFilterService,
|
||||
deps: [
|
||||
StateService,
|
||||
OrganizationService,
|
||||
FolderService,
|
||||
CipherService,
|
||||
CollectionService,
|
||||
PolicyService,
|
||||
],
|
||||
},
|
||||
],
|
||||
providers: [VaultFilterService],
|
||||
})
|
||||
export class VaultFilterModule {}
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
import { VaultFilterService as BaseVaultFilterService } from "jslib-angular/modules/vault-filter/vault-filter.service";
|
||||
|
||||
export class VaultFilterService extends BaseVaultFilterService {}
|
||||
@@ -98,6 +98,7 @@ export class OrganizationVaultComponent implements OnInit, OnDestroy {
|
||||
this.vaultFilterComponent.reloadCollectionsAndFolders(
|
||||
new VaultFilter({
|
||||
selectedOrganizationId: this.organization.id,
|
||||
useAdminCollections: this.organization.canEditAnyCollection,
|
||||
} as Partial<VaultFilter>)
|
||||
),
|
||||
this.ciphersComponent.refresh(),
|
||||
@@ -110,7 +111,10 @@ export class OrganizationVaultComponent implements OnInit, OnDestroy {
|
||||
});
|
||||
}
|
||||
await this.vaultFilterComponent.reloadCollectionsAndFolders(
|
||||
new VaultFilter({ selectedOrganizationId: this.organization.id } as Partial<VaultFilter>)
|
||||
new VaultFilter({
|
||||
selectedOrganizationId: this.organization.id,
|
||||
useAdminCollections: this.organization.canEditAnyCollection,
|
||||
} as Partial<VaultFilter>)
|
||||
);
|
||||
await this.ciphersComponent.reload();
|
||||
|
||||
|
||||
@@ -35,10 +35,6 @@
|
||||
icon="bwi bwi-key"
|
||||
*ngIf="clientSecret"
|
||||
>
|
||||
<p class="mb-1">
|
||||
<strong>combined:</strong>
|
||||
<code>{{ combinedApiKey }}</code>
|
||||
</p>
|
||||
<p class="mb-1">
|
||||
<strong>client_id:</strong><br />
|
||||
<code>{{ clientId }}</code>
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
import { Component, OnInit } from "@angular/core";
|
||||
import { Component } from "@angular/core";
|
||||
|
||||
import { CryptoService } from "jslib-common/abstractions/crypto.service";
|
||||
import { LogService } from "jslib-common/abstractions/log.service";
|
||||
import { UserVerificationService } from "jslib-common/abstractions/userVerification.service";
|
||||
import { Utils } from "jslib-common/misc/utils";
|
||||
import { SecretVerificationRequest } from "jslib-common/models/request/secretVerificationRequest";
|
||||
import { ApiKeyResponse } from "jslib-common/models/response/apiKeyResponse";
|
||||
import { Verification } from "jslib-common/types/verification";
|
||||
@@ -12,7 +10,7 @@ import { Verification } from "jslib-common/types/verification";
|
||||
selector: "app-api-key",
|
||||
templateUrl: "api-key.component.html",
|
||||
})
|
||||
export class ApiKeyComponent implements OnInit {
|
||||
export class ApiKeyComponent {
|
||||
keyType: string;
|
||||
isRotation: boolean;
|
||||
postKey: (entityId: string, request: SecretVerificationRequest) => Promise<ApiKeyResponse>;
|
||||
@@ -27,20 +25,12 @@ export class ApiKeyComponent implements OnInit {
|
||||
formPromise: Promise<ApiKeyResponse>;
|
||||
clientId: string;
|
||||
clientSecret: string;
|
||||
clientKey: string;
|
||||
clientLocalKeyHash: string;
|
||||
|
||||
constructor(
|
||||
private cryptoService: CryptoService,
|
||||
private userVerificationService: UserVerificationService,
|
||||
private logService: LogService
|
||||
) {}
|
||||
|
||||
async ngOnInit(): Promise<void> {
|
||||
this.clientKey = Utils.fromBufferToB64((await this.cryptoService.getKey()).key);
|
||||
this.clientLocalKeyHash = await this.cryptoService.getKeyHash();
|
||||
}
|
||||
|
||||
async submit() {
|
||||
try {
|
||||
this.formPromise = this.userVerificationService
|
||||
@@ -53,17 +43,4 @@ export class ApiKeyComponent implements OnInit {
|
||||
this.logService.error(e);
|
||||
}
|
||||
}
|
||||
|
||||
get combinedApiKey() {
|
||||
return Utils.fromUtf8ToB64(
|
||||
JSON.stringify({
|
||||
clientId: this.clientId,
|
||||
clientSecret: this.clientSecret,
|
||||
encClientEncInfo: JSON.stringify({
|
||||
clientEncKey: this.clientKey,
|
||||
clientLocalKeyHash: this.clientLocalKeyHash,
|
||||
}),
|
||||
})
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ import { Component } from "@angular/core";
|
||||
import { ApiService } from "jslib-common/abstractions/api.service";
|
||||
import { LogService } from "jslib-common/abstractions/log.service";
|
||||
import { OrganizationConnectionType } from "jslib-common/enums/organizationConnectionType";
|
||||
import { Utils } from "jslib-common/misc/utils";
|
||||
import { BillingSyncConfigApi } from "jslib-common/models/api/billingSyncConfigApi";
|
||||
import { BillingSyncConfigRequest } from "jslib-common/models/request/billingSyncConfigRequest";
|
||||
import { OrganizationConnectionRequest } from "jslib-common/models/request/organizationConnectionRequest";
|
||||
|
||||
Reference in New Issue
Block a user