diff --git a/src/app/vault/ciphers.component.html b/src/app/vault/ciphers.component.html
index 4c97530f..9c441dab 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 4f47e43c..2104dec5 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 98ab31d7..93938ac9 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 b197353a..8752b096 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 64fb8a41..607f16d7 100644
--- a/src/locales/en/messages.json
+++ b/src/locales/en/messages.json
@@ -343,7 +343,7 @@
"message": "Are you sure you want to delete this item?"
},
"deletedItem": {
- "message": "Deleted item"
+ "message": "Sent item to trash"
},
"overwritePasswordConfirmation": {
"message": "Are you sure you want to overwrite the current password?"
@@ -1299,6 +1299,34 @@
"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"
+ },
"vaultTimeoutLogOutConfirmation": {
"message": "Logging out will remove all access to your vault and requires online authentication after the timeout period. Are you sure you want to use this setting?"
},