diff --git a/jslib b/jslib
index 72e3893f8ee..e9db844285e 160000
--- a/jslib
+++ b/jslib
@@ -1 +1 @@
-Subproject commit 72e3893f8eee79f1e3678839aa194f1096c343ea
+Subproject commit e9db844285e21525f5152e782063f04e02543553
diff --git a/src/app/vault/ciphers.component.html b/src/app/vault/ciphers.component.html
index 4c97530f796..55faedc2cee 100644
--- a/src/app/vault/ciphers.component.html
+++ b/src/app/vault/ciphers.component.html
@@ -39,8 +39,8 @@
diff --git a/src/app/vault/groupings.component.html b/src/app/vault/groupings.component.html
index 4f47e43c88b..2104dec5a9d 100644
--- a/src/app/vault/groupings.component.html
+++ b/src/app/vault/groupings.component.html
@@ -13,6 +13,11 @@
{{'favorites' | i18n}}
+
+
+ {{'trash' | i18n}}
+
+
{{'types' | i18n}}
diff --git a/src/app/vault/vault.component.html b/src/app/vault/vault.component.html
index 98ab31d7d53..93938ac95f9 100644
--- a/src/app/vault/vault.component.html
+++ b/src/app/vault/vault.component.html
@@ -2,7 +2,7 @@
+ (onCollectionClicked)="filterCollection($event.id)" (onTrashClicked)="filterDeleted()">
+ (onViewCipherPasswordHistory)="viewCipherPasswordHistory($event)" (onRestoredCipher)="restoredCipher($event)"
+ (onDeletedCipher)="deletedCipher($event)">
this.functionWithChangeDetection(() => {
- this.editCipher(cipher);
- }),
- }));
- menu.append(new remote.MenuItem({
- label: this.i18nService.t('clone'),
- click: () => this.functionWithChangeDetection(() => {
- this.cloneCipher(cipher);
- }),
- }));
+ if (!cipher.isDeleted) {
+ menu.append(new remote.MenuItem({
+ label: this.i18nService.t('edit'),
+ click: () => this.functionWithChangeDetection(() => {
+ this.editCipher(cipher);
+ }),
+ }));
+ menu.append(new remote.MenuItem({
+ label: this.i18nService.t('clone'),
+ click: () => this.functionWithChangeDetection(() => {
+ this.cloneCipher(cipher);
+ }),
+ }));
+ }
switch (cipher.type) {
case CipherType.Login:
@@ -402,6 +408,13 @@ export class VaultComponent implements OnInit, OnDestroy {
await this.ciphersComponent.refresh();
}
+ async restoredCipher(cipher: CipherView) {
+ this.cipherId = null;
+ this.action = null;
+ this.go();
+ await this.ciphersComponent.refresh();
+ }
+
editCipherAttachments(cipher: CipherView) {
if (this.modal != null) {
this.modal.close();
@@ -498,6 +511,15 @@ export class VaultComponent implements OnInit, OnDestroy {
this.go();
}
+ async filterDeleted() {
+ this.ciphersComponent.searchPlaceholder = this.i18nService.t('searchTrash');
+ this.ciphersComponent.deleted = true;
+ await this.ciphersComponent.reload(null, true);
+ this.clearFilters();
+ this.deleted = true;
+ this.go();
+ }
+
async filterCipherType(type: CipherType) {
this.ciphersComponent.searchPlaceholder = this.i18nService.t('searchType');
await this.ciphersComponent.reload((c) => c.type === type);
@@ -630,6 +652,7 @@ export class VaultComponent implements OnInit, OnDestroy {
this.addCollectionIds = null;
this.addType = null;
this.addOrganizationId = null;
+ this.deleted = false;
}
private go(queryParams: any = null) {
@@ -641,6 +664,7 @@ export class VaultComponent implements OnInit, OnDestroy {
type: this.type,
folderId: this.folderId,
collectionId: this.collectionId,
+ deleted: this.deleted ? true : null,
};
}
diff --git a/src/app/vault/view.component.html b/src/app/vault/view.component.html
index b197353aeea..8752b096b08 100644
--- a/src/app/vault/view.component.html
+++ b/src/app/vault/view.component.html
@@ -273,10 +273,21 @@
diff --git a/src/locales/en/messages.json b/src/locales/en/messages.json
index 2fe5e3ebf30..a932ec9b891 100644
--- a/src/locales/en/messages.json
+++ b/src/locales/en/messages.json
@@ -1292,5 +1292,33 @@
"lock": {
"message": "Lock",
"description": "Verb form: to make secure or inaccesible by"
+ },
+ "trash": {
+ "message": "Trash",
+ "description": "Noun: a special folder to hold deleted items"
+ },
+ "searchTrash": {
+ "message": "Search trash"
+ },
+ "permanentlyDeleteItem": {
+ "message": "Permanently Delete Item"
+ },
+ "permanentlyDeleteItemConfirmation": {
+ "message": "Are you sure you want to permanently delete this item?"
+ },
+ "permanentlyDeletedItem": {
+ "message": "Permanently Deleted item"
+ },
+ "restoreItem": {
+ "message": "Restore Item"
+ },
+ "restoreItemConfirmation": {
+ "message": "Are you sure you want to restore this item?"
+ },
+ "restoredItem": {
+ "message": "Restored Item"
+ },
+ "permanentlyDelete": {
+ "message": "Permanently Delete"
}
}