Fix styling

This commit is contained in:
Thijmen
2024-06-10 20:43:34 +00:00
committed by github-actions[bot]
parent 41fb6a1fc9
commit d86274cc37
429 changed files with 5307 additions and 2831 deletions

View File

@@ -8,14 +8,18 @@ use Livewire\Component;
class BackupExecutions extends Component
{
public ?ScheduledDatabaseBackup $backup = null;
public $executions = [];
public $setDeletableBackup;
public function getListeners()
{
$userId = auth()->user()->id;
return [
"echo-private:team.{$userId},BackupCreated" => 'refreshBackupExecutions',
"deleteBackup"
'deleteBackup',
];
}
@@ -27,11 +31,13 @@ class BackupExecutions extends Component
$this->dispatch('success', 'Failed backups cleaned up.');
}
}
public function deleteBackup($exeuctionId)
{
$execution = $this->backup->executions()->where('id', $exeuctionId)->first();
if (is_null($execution)) {
$this->dispatch('error', 'Backup execution not found.');
return;
}
if ($execution->scheduledDatabaseBackup->database->getMorphClass() === 'App\Models\ServiceDatabase') {
@@ -43,10 +49,12 @@ class BackupExecutions extends Component
$this->dispatch('success', 'Backup deleted.');
$this->refreshBackupExecutions();
}
public function download_file($exeuctionId)
{
return redirect()->route('download.backup', $exeuctionId);
}
public function refreshBackupExecutions(): void
{
if ($this->backup) {