feat: implement soft deletes, mailbox reclaims, cooldowns, and auto-cleanup
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user