feat: implement soft deletes, mailbox reclaims, cooldowns, and auto-cleanup

This commit is contained in:
idevakk
2026-03-06 02:39:47 +05:30
parent e79c3f79a2
commit e6fd4e6f4c
8 changed files with 176 additions and 11 deletions

View File

@@ -160,6 +160,7 @@
created_at: '{{ $currentMailbox->created_at?->toIso8601String() }}',
timeLeft: 'Never',
percent: 100,
isExpired: false,
init() {
if (!this.expiresAt) return;
@@ -174,6 +175,10 @@
if (now > end) {
this.timeLeft = 'Expired';
this.percent = 0;
if (!this.isExpired) {
this.isExpired = true;
$wire.deleteMailbox({{ $currentMailbox->id }});
}
return;
}
@@ -235,6 +240,7 @@
x-data="{
expiresAt: '{{ $mailbox->expires_at?->toIso8601String() }}',
timeLeft: 'Never',
isExpired: false,
init() {
if (!this.expiresAt) return;
this.update();
@@ -246,6 +252,10 @@
if (now > end) {
this.timeLeft = 'Expired';
if (!this.isExpired) {
this.isExpired = true;
$wire.deleteMailbox({{ $mailbox->id }});
}
return;
}