mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-27 12:36:14 +01:00
Add auto delete warning to trash page (#953)
* Add warning to trash page
This commit is contained in:
parent
19f92e74f5
commit
dd56c9bc87
@ -29,6 +29,9 @@
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<app-callout type="warning" *ngIf="deleted" icon="fa-warning">
|
||||
{{trashCleanupWarning}}
|
||||
</app-callout>
|
||||
<app-org-vault-ciphers (onCipherClicked)="editCipher($event)"
|
||||
(onAttachmentsClicked)="editCipherAttachments($event)" (onAddCipher)="addCipher()"
|
||||
(onCollectionsClicked)="editCipherCollections($event)" (onEventsClicked)="viewEvents($event)"
|
||||
|
@ -15,6 +15,7 @@ import {
|
||||
|
||||
import { I18nService } from 'jslib/abstractions/i18n.service';
|
||||
import { MessagingService } from 'jslib/abstractions/messaging.service';
|
||||
import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service';
|
||||
import { SyncService } from 'jslib/abstractions/sync.service';
|
||||
import { UserService } from 'jslib/abstractions/user.service';
|
||||
|
||||
@ -52,6 +53,7 @@ export class VaultComponent implements OnInit, OnDestroy {
|
||||
collectionId: string = null;
|
||||
type: CipherType = null;
|
||||
deleted: boolean = false;
|
||||
trashCleanupWarning: string = null;
|
||||
|
||||
modal: ModalComponent = null;
|
||||
|
||||
@ -59,9 +61,14 @@ export class VaultComponent implements OnInit, OnDestroy {
|
||||
private router: Router, private changeDetectorRef: ChangeDetectorRef,
|
||||
private syncService: SyncService, private i18nService: I18nService,
|
||||
private componentFactoryResolver: ComponentFactoryResolver, private messagingService: MessagingService,
|
||||
private broadcasterService: BroadcasterService, private ngZone: NgZone) { }
|
||||
private broadcasterService: BroadcasterService, private ngZone: NgZone,
|
||||
private platformUtilsService: PlatformUtilsService) { }
|
||||
|
||||
ngOnInit() {
|
||||
this.trashCleanupWarning = this.i18nService.t(
|
||||
this.platformUtilsService.isSelfHost() ? 'trashCleanupWarningSelfHosted' : 'trashCleanupWarning'
|
||||
);
|
||||
|
||||
const queryParams = this.route.parent.params.subscribe(async params => {
|
||||
this.organization = await this.userService.getOrganization(params.organizationId);
|
||||
this.groupingsComponent.organization = this.organization;
|
||||
|
@ -28,6 +28,9 @@
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<app-callout type="warning" *ngIf="deleted" icon="fa-warning">
|
||||
{{trashCleanupWarning}}
|
||||
</app-callout>
|
||||
<app-vault-ciphers (onCipherClicked)="editCipher($event)"
|
||||
(onAttachmentsClicked)="editCipherAttachments($event)" (onAddCipher)="addCipher()"
|
||||
(onShareClicked)="shareCipher($event)" (onCollectionsClicked)="editCipherCollections($event)"
|
||||
|
@ -65,6 +65,7 @@ export class VaultComponent implements OnInit, OnDestroy {
|
||||
showUpdateKey = false;
|
||||
showPremiumCallout = false;
|
||||
deleted: boolean = false;
|
||||
trashCleanupWarning: string = null;
|
||||
|
||||
modal: ModalComponent = null;
|
||||
|
||||
@ -79,6 +80,9 @@ export class VaultComponent implements OnInit, OnDestroy {
|
||||
async ngOnInit() {
|
||||
this.showVerifyEmail = !(await this.tokenService.getEmailVerified());
|
||||
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 => {
|
||||
await this.syncService.fullSync(false);
|
||||
|
@ -3875,5 +3875,11 @@
|
||||
"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."
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user