mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 08:43:33 +00:00
rename cipehrs component to vault items component (#4081)
This commit is contained in:
@@ -90,7 +90,6 @@ import { SharedModule } from "./shared/shared.module";
|
||||
import { AddEditCustomFieldsComponent } from "./vault/add-edit-custom-fields.component";
|
||||
import { AddEditComponent } from "./vault/add-edit.component";
|
||||
import { AttachmentsComponent } from "./vault/attachments.component";
|
||||
import { CiphersComponent } from "./vault/ciphers.component";
|
||||
import { CollectionsComponent } from "./vault/collections.component";
|
||||
import { ExportComponent } from "./vault/export.component";
|
||||
import { FolderAddEditComponent } from "./vault/folder-add-edit.component";
|
||||
@@ -99,6 +98,7 @@ import { PasswordGeneratorHistoryComponent } from "./vault/password-generator-hi
|
||||
import { PasswordHistoryComponent } from "./vault/password-history.component";
|
||||
import { ShareComponent } from "./vault/share.component";
|
||||
import { VaultFilterModule } from "./vault/vault-filter/vault-filter.module";
|
||||
import { VaultItemsComponent } from "./vault/vault-items.component";
|
||||
import { VaultComponent } from "./vault/vault.component";
|
||||
import { ViewCustomFieldsComponent } from "./vault/view-custom-fields.component";
|
||||
import { ViewComponent } from "./vault/view.component";
|
||||
@@ -168,7 +168,7 @@ registerLocaleData(localeZhTw, "zh-TW");
|
||||
AddEditCustomFieldsComponent,
|
||||
AppComponent,
|
||||
AttachmentsComponent,
|
||||
CiphersComponent,
|
||||
VaultItemsComponent,
|
||||
CollectionsComponent,
|
||||
DeleteAccountComponent,
|
||||
EnvironmentComponent,
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
import { Component } from "@angular/core";
|
||||
|
||||
import { CiphersComponent as BaseCiphersComponent } from "@bitwarden/angular/components/ciphers.component";
|
||||
import { VaultItemsComponent as BaseVaultItemsComponent } from "@bitwarden/angular/components/vault-items.component";
|
||||
import { SearchService } from "@bitwarden/common/abstractions/search.service";
|
||||
import { CipherView } from "@bitwarden/common/models/view/cipher.view";
|
||||
|
||||
import { SearchBarService } from "../layout/search/search-bar.service";
|
||||
|
||||
@Component({
|
||||
selector: "app-vault-ciphers",
|
||||
templateUrl: "ciphers.component.html",
|
||||
selector: "app-vault-items",
|
||||
templateUrl: "vault-items.component.html",
|
||||
})
|
||||
// eslint-disable-next-line rxjs-angular/prefer-takeuntil
|
||||
export class CiphersComponent extends BaseCiphersComponent {
|
||||
export class VaultItemsComponent extends BaseVaultItemsComponent {
|
||||
constructor(searchService: SearchService, searchBarService: SearchBarService) {
|
||||
super(searchService);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div id="vault" class="vault" attr.aria-hidden="{{ showingModal }}">
|
||||
<app-vault-ciphers
|
||||
<app-vault-items
|
||||
id="items"
|
||||
class="items"
|
||||
[activeCipherId]="cipherId"
|
||||
@@ -8,7 +8,7 @@
|
||||
(onAddCipher)="addCipher($event)"
|
||||
(onAddCipherOptions)="addCipherOptions()"
|
||||
>
|
||||
</app-vault-ciphers>
|
||||
</app-vault-items>
|
||||
<app-vault-view
|
||||
id="details"
|
||||
class="details"
|
||||
|
||||
@@ -33,13 +33,13 @@ import { SearchBarService } from "../layout/search/search-bar.service";
|
||||
|
||||
import { AddEditComponent } from "./add-edit.component";
|
||||
import { AttachmentsComponent } from "./attachments.component";
|
||||
import { CiphersComponent } from "./ciphers.component";
|
||||
import { CollectionsComponent } from "./collections.component";
|
||||
import { FolderAddEditComponent } from "./folder-add-edit.component";
|
||||
import { GeneratorComponent } from "./generator.component";
|
||||
import { PasswordHistoryComponent } from "./password-history.component";
|
||||
import { ShareComponent } from "./share.component";
|
||||
import { VaultFilterComponent } from "./vault-filter/vault-filter.component";
|
||||
import { VaultItemsComponent } from "./vault-items.component";
|
||||
import { ViewComponent } from "./view.component";
|
||||
|
||||
const BroadcasterSubscriptionId = "VaultComponent";
|
||||
@@ -51,7 +51,7 @@ const BroadcasterSubscriptionId = "VaultComponent";
|
||||
export class VaultComponent implements OnInit, OnDestroy {
|
||||
@ViewChild(ViewComponent) viewComponent: ViewComponent;
|
||||
@ViewChild(AddEditComponent) addEditComponent: AddEditComponent;
|
||||
@ViewChild(CiphersComponent, { static: true }) ciphersComponent: CiphersComponent;
|
||||
@ViewChild(VaultItemsComponent, { static: true }) vaultItemsComponent: VaultItemsComponent;
|
||||
@ViewChild("generator", { read: ViewContainerRef, static: true })
|
||||
generatorModalRef: ViewContainerRef;
|
||||
@ViewChild(VaultFilterComponent, { static: true }) vaultFilterComponent: VaultFilterComponent;
|
||||
@@ -128,12 +128,12 @@ export class VaultComponent implements OnInit, OnDestroy {
|
||||
await this.openGenerator(false);
|
||||
break;
|
||||
case "syncCompleted":
|
||||
await this.ciphersComponent.reload(this.activeFilter.buildFilter());
|
||||
await this.vaultItemsComponent.reload(this.activeFilter.buildFilter());
|
||||
await this.vaultFilterComponent.reloadCollectionsAndFolders(this.activeFilter);
|
||||
await this.vaultFilterComponent.reloadOrganizations();
|
||||
break;
|
||||
case "refreshCiphers":
|
||||
this.ciphersComponent.refresh();
|
||||
this.vaultItemsComponent.refresh();
|
||||
break;
|
||||
case "modalShown":
|
||||
this.showingModal = true;
|
||||
@@ -242,7 +242,7 @@ export class VaultComponent implements OnInit, OnDestroy {
|
||||
selectedOrganizationId: params.selectedOrganizationId,
|
||||
myVaultOnly: params.myVaultOnly ?? false,
|
||||
});
|
||||
await this.ciphersComponent.reload(this.activeFilter.buildFilter());
|
||||
await this.vaultItemsComponent.reload(this.activeFilter.buildFilter());
|
||||
});
|
||||
}
|
||||
|
||||
@@ -429,21 +429,21 @@ export class VaultComponent implements OnInit, OnDestroy {
|
||||
this.cipherId = cipher.id;
|
||||
this.action = "view";
|
||||
this.go();
|
||||
await this.ciphersComponent.refresh();
|
||||
await this.vaultItemsComponent.refresh();
|
||||
}
|
||||
|
||||
async deletedCipher(cipher: CipherView) {
|
||||
this.cipherId = null;
|
||||
this.action = null;
|
||||
this.go();
|
||||
await this.ciphersComponent.refresh();
|
||||
await this.vaultItemsComponent.refresh();
|
||||
}
|
||||
|
||||
async restoredCipher(cipher: CipherView) {
|
||||
this.cipherId = null;
|
||||
this.action = null;
|
||||
this.go();
|
||||
await this.ciphersComponent.refresh();
|
||||
await this.vaultItemsComponent.refresh();
|
||||
}
|
||||
|
||||
async editCipherAttachments(cipher: CipherView) {
|
||||
@@ -468,7 +468,7 @@ export class VaultComponent implements OnInit, OnDestroy {
|
||||
this.modal.onClosed.subscribe(async () => {
|
||||
this.modal = null;
|
||||
if (madeAttachmentChanges) {
|
||||
await this.ciphersComponent.refresh();
|
||||
await this.vaultItemsComponent.refresh();
|
||||
}
|
||||
madeAttachmentChanges = false;
|
||||
});
|
||||
@@ -490,7 +490,7 @@ export class VaultComponent implements OnInit, OnDestroy {
|
||||
childComponent.onSharedCipher.subscribe(async () => {
|
||||
this.modal.close();
|
||||
this.viewCipher(cipher);
|
||||
await this.ciphersComponent.refresh();
|
||||
await this.vaultItemsComponent.refresh();
|
||||
});
|
||||
// eslint-disable-next-line rxjs-angular/prefer-takeuntil, rxjs/no-async-subscribe
|
||||
this.modal.onClosed.subscribe(async () => {
|
||||
@@ -549,7 +549,7 @@ export class VaultComponent implements OnInit, OnDestroy {
|
||||
this.i18nService.t(this.calculateSearchBarLocalizationString(vaultFilter))
|
||||
);
|
||||
this.activeFilter = vaultFilter;
|
||||
await this.ciphersComponent.reload(
|
||||
await this.vaultItemsComponent.reload(
|
||||
this.activeFilter.buildFilter(),
|
||||
vaultFilter.status === "trash"
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user