mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 08:13:42 +00:00
Add auto delete warning to trash page (#953)
* Add warning to trash page
This commit is contained in:
@@ -29,6 +29,9 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<app-callout type="warning" *ngIf="deleted" icon="fa-warning">
|
||||||
|
{{trashCleanupWarning}}
|
||||||
|
</app-callout>
|
||||||
<app-org-vault-ciphers (onCipherClicked)="editCipher($event)"
|
<app-org-vault-ciphers (onCipherClicked)="editCipher($event)"
|
||||||
(onAttachmentsClicked)="editCipherAttachments($event)" (onAddCipher)="addCipher()"
|
(onAttachmentsClicked)="editCipherAttachments($event)" (onAddCipher)="addCipher()"
|
||||||
(onCollectionsClicked)="editCipherCollections($event)" (onEventsClicked)="viewEvents($event)"
|
(onCollectionsClicked)="editCipherCollections($event)" (onEventsClicked)="viewEvents($event)"
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import {
|
|||||||
|
|
||||||
import { I18nService } from 'jslib/abstractions/i18n.service';
|
import { I18nService } from 'jslib/abstractions/i18n.service';
|
||||||
import { MessagingService } from 'jslib/abstractions/messaging.service';
|
import { MessagingService } from 'jslib/abstractions/messaging.service';
|
||||||
|
import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service';
|
||||||
import { SyncService } from 'jslib/abstractions/sync.service';
|
import { SyncService } from 'jslib/abstractions/sync.service';
|
||||||
import { UserService } from 'jslib/abstractions/user.service';
|
import { UserService } from 'jslib/abstractions/user.service';
|
||||||
|
|
||||||
@@ -52,6 +53,7 @@ export class VaultComponent implements OnInit, OnDestroy {
|
|||||||
collectionId: string = null;
|
collectionId: string = null;
|
||||||
type: CipherType = null;
|
type: CipherType = null;
|
||||||
deleted: boolean = false;
|
deleted: boolean = false;
|
||||||
|
trashCleanupWarning: string = null;
|
||||||
|
|
||||||
modal: ModalComponent = null;
|
modal: ModalComponent = null;
|
||||||
|
|
||||||
@@ -59,9 +61,14 @@ export class VaultComponent implements OnInit, OnDestroy {
|
|||||||
private router: Router, private changeDetectorRef: ChangeDetectorRef,
|
private router: Router, private changeDetectorRef: ChangeDetectorRef,
|
||||||
private syncService: SyncService, private i18nService: I18nService,
|
private syncService: SyncService, private i18nService: I18nService,
|
||||||
private componentFactoryResolver: ComponentFactoryResolver, private messagingService: MessagingService,
|
private componentFactoryResolver: ComponentFactoryResolver, private messagingService: MessagingService,
|
||||||
private broadcasterService: BroadcasterService, private ngZone: NgZone) { }
|
private broadcasterService: BroadcasterService, private ngZone: NgZone,
|
||||||
|
private platformUtilsService: PlatformUtilsService) { }
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
this.trashCleanupWarning = this.i18nService.t(
|
||||||
|
this.platformUtilsService.isSelfHost() ? 'trashCleanupWarningSelfHosted' : 'trashCleanupWarning'
|
||||||
|
);
|
||||||
|
|
||||||
const queryParams = this.route.parent.params.subscribe(async params => {
|
const queryParams = this.route.parent.params.subscribe(async params => {
|
||||||
this.organization = await this.userService.getOrganization(params.organizationId);
|
this.organization = await this.userService.getOrganization(params.organizationId);
|
||||||
this.groupingsComponent.organization = this.organization;
|
this.groupingsComponent.organization = this.organization;
|
||||||
|
|||||||
@@ -28,6 +28,9 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<app-callout type="warning" *ngIf="deleted" icon="fa-warning">
|
||||||
|
{{trashCleanupWarning}}
|
||||||
|
</app-callout>
|
||||||
<app-vault-ciphers (onCipherClicked)="editCipher($event)"
|
<app-vault-ciphers (onCipherClicked)="editCipher($event)"
|
||||||
(onAttachmentsClicked)="editCipherAttachments($event)" (onAddCipher)="addCipher()"
|
(onAttachmentsClicked)="editCipherAttachments($event)" (onAddCipher)="addCipher()"
|
||||||
(onShareClicked)="shareCipher($event)" (onCollectionsClicked)="editCipherCollections($event)"
|
(onShareClicked)="shareCipher($event)" (onCollectionsClicked)="editCipherCollections($event)"
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ export class VaultComponent implements OnInit, OnDestroy {
|
|||||||
showUpdateKey = false;
|
showUpdateKey = false;
|
||||||
showPremiumCallout = false;
|
showPremiumCallout = false;
|
||||||
deleted: boolean = false;
|
deleted: boolean = false;
|
||||||
|
trashCleanupWarning: string = null;
|
||||||
|
|
||||||
modal: ModalComponent = null;
|
modal: ModalComponent = null;
|
||||||
|
|
||||||
@@ -79,6 +80,9 @@ export class VaultComponent implements OnInit, OnDestroy {
|
|||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
this.showVerifyEmail = !(await this.tokenService.getEmailVerified());
|
this.showVerifyEmail = !(await this.tokenService.getEmailVerified());
|
||||||
this.showBrowserOutdated = window.navigator.userAgent.indexOf('MSIE') !== -1;
|
this.showBrowserOutdated = window.navigator.userAgent.indexOf('MSIE') !== -1;
|
||||||
|
this.trashCleanupWarning = this.i18nService.t(
|
||||||
|
this.platformUtilsService.isSelfHost() ? 'trashCleanupWarningSelfHosted' : 'trashCleanupWarning'
|
||||||
|
);
|
||||||
|
|
||||||
const queryParamsSub = this.route.queryParams.subscribe(async params => {
|
const queryParamsSub = this.route.queryParams.subscribe(async params => {
|
||||||
await this.syncService.fullSync(false);
|
await this.syncService.fullSync(false);
|
||||||
|
|||||||
@@ -3875,5 +3875,11 @@
|
|||||||
"example": "John Smith"
|
"example": "John Smith"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"trashCleanupWarning": {
|
||||||
|
"message": "Ciphers that have been in Trash more than 30 days will be automatically deleted."
|
||||||
|
},
|
||||||
|
"trashCleanupWarningSelfHosted": {
|
||||||
|
"message": "Ciphers that have been in Trash for a while will be automatically deleted."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user