diff --git a/app/Http/Livewire/ActivityMonitor.php b/app/Livewire/ActivityMonitor.php similarity index 94% rename from app/Http/Livewire/ActivityMonitor.php rename to app/Livewire/ActivityMonitor.php index 9ce37f9b3..2bfbe7348 100644 --- a/app/Http/Livewire/ActivityMonitor.php +++ b/app/Livewire/ActivityMonitor.php @@ -1,6 +1,6 @@ setStatus(ProcessStatus::ERROR); } $this->isPollingActive = false; - $this->emit('activityFinished'); + $this->dispatch('activityFinished'); } } diff --git a/app/Http/Livewire/Boarding/Index.php b/app/Livewire/Boarding/Index.php similarity index 95% rename from app/Http/Livewire/Boarding/Index.php rename to app/Livewire/Boarding/Index.php index 19c51d5ce..9c59f66ab 100644 --- a/app/Http/Livewire/Boarding/Index.php +++ b/app/Livewire/Boarding/Index.php @@ -1,6 +1,6 @@ selectedServerType === 'localhost') { $this->createdServer = Server::find(0); if (!$this->createdServer) { - return $this->emit('error', 'Localhost server is not found. Something went wrong during installation. Please try to reinstall or contact support.'); + return $this->dispatch('error', 'Localhost server is not found. Something went wrong during installation. Please try to reinstall or contact support.'); } $this->serverPublicKey = $this->createdServer->privateKey->publicKey(); return $this->validateServer('localhost'); @@ -110,7 +110,7 @@ uZx9iFkCELtxrh31QJ68AAAAEXNhaWxANzZmZjY2ZDJlMmRkAQIDBA== { $this->createdServer = Server::find($this->selectedExistingServer); if (!$this->createdServer) { - $this->emit('error', 'Server is not found.'); + $this->dispatch('error', 'Server is not found.'); $this->currentState = 'private-key'; return; } @@ -173,7 +173,7 @@ uZx9iFkCELtxrh31QJ68AAAAEXNhaWxANzZmZjY2ZDJlMmRkAQIDBA== $this->privateKey = formatPrivateKey($this->privateKey); $foundServer = Server::whereIp($this->remoteServerHost)->first(); if ($foundServer) { - return $this->emit('error', 'IP address is already in use by another team.'); + return $this->dispatch('error', 'IP address is already in use by another team.'); } $this->createdServer = Server::create([ 'name' => $this->remoteServerName, @@ -227,8 +227,8 @@ uZx9iFkCELtxrh31QJ68AAAAEXNhaWxANzZmZjY2ZDJlMmRkAQIDBA== try { $this->dockerInstallationStarted = true; $activity = InstallDocker::run($this->createdServer); - $this->emit('installDocker'); - $this->emit('newMonitorActivity', $activity->id); + $this->dispatch('installDocker'); + $this->dispatch('newMonitorActivity', $activity->id); } catch (\Throwable $e) { $this->dockerInstallationStarted = false; return handleError(error: $e, livewire: $this); diff --git a/app/Http/Livewire/CheckLicense.php b/app/Livewire/CheckLicense.php similarity index 94% rename from app/Http/Livewire/CheckLicense.php rename to app/Livewire/CheckLicense.php index 3c2933bfc..0b3677fc2 100644 --- a/app/Http/Livewire/CheckLicense.php +++ b/app/Livewire/CheckLicense.php @@ -1,6 +1,6 @@ settings->resale_license) { try { CheckResaleLicense::run(); - $this->emit('reloadWindow'); + $this->dispatch('reloadWindow'); } catch (\Throwable $e) { session()->flash('error', 'Something went wrong. Please contact support.
Error: ' . $e->getMessage()); ray($e->getMessage()); diff --git a/app/Http/Livewire/Dashboard.php b/app/Livewire/Dashboard.php similarity index 96% rename from app/Http/Livewire/Dashboard.php rename to app/Livewire/Dashboard.php index 05bef207d..51d964a29 100644 --- a/app/Http/Livewire/Dashboard.php +++ b/app/Livewire/Dashboard.php @@ -1,6 +1,6 @@ destination->getMorphClass() === 'App\Models\StandaloneDocker') { if ($this->destination->attachedTo()) { - return $this->emit('error', 'You must delete all resources before deleting this destination.'); + return $this->dispatch('error', 'You must delete all resources before deleting this destination.'); } instant_remote_process(["docker network disconnect {$this->destination->network} coolify-proxy"], $this->destination->server, throwError: false); instant_remote_process(['docker network rm -f ' . $this->destination->network], $this->destination->server); diff --git a/app/Http/Livewire/Destination/New/StandaloneDocker.php b/app/Livewire/Destination/New/StandaloneDocker.php similarity index 95% rename from app/Http/Livewire/Destination/New/StandaloneDocker.php rename to app/Livewire/Destination/New/StandaloneDocker.php index 75ceb1a0b..6634214ab 100644 --- a/app/Http/Livewire/Destination/New/StandaloneDocker.php +++ b/app/Livewire/Destination/New/StandaloneDocker.php @@ -1,6 +1,6 @@ server->standaloneDockers()->where('network', $this->network)->first(); if ($found) { $this->createNetworkAndAttachToProxy(); - $this->emit('error', 'Network already added to this server.'); + $this->dispatch('error', 'Network already added to this server.'); return; } else { $docker = ModelsStandaloneDocker::create([ diff --git a/app/Http/Livewire/Destination/Show.php b/app/Livewire/Destination/Show.php similarity index 89% rename from app/Http/Livewire/Destination/Show.php rename to app/Livewire/Destination/Show.php index d68537ac4..77495c83e 100644 --- a/app/Http/Livewire/Destination/Show.php +++ b/app/Livewire/Destination/Show.php @@ -1,6 +1,6 @@ contains('network', $network['Name']); }); if ($this->networks->count() === 0) { - $this->emit('success', 'No new networks found.'); + $this->dispatch('success', 'No new networks found.'); } } } diff --git a/app/Http/Livewire/Dev/Compose.php b/app/Livewire/Dev/Compose.php similarity index 95% rename from app/Http/Livewire/Dev/Compose.php rename to app/Livewire/Dev/Compose.php index d3a0ee4e5..ec2c4f54d 100644 --- a/app/Http/Livewire/Dev/Compose.php +++ b/app/Livewire/Dev/Compose.php @@ -1,6 +1,6 @@ subject("[HELP - {$subscriptionType}]: {$this->subject}"); send_user_an_email($mail, auth()->user()?->email, 'hi@coollabs.io'); - $this->emit('success', 'Your message has been sent successfully.
We will get in touch with you as soon as possible.'); + $this->dispatch('success', 'Your message has been sent successfully.
We will get in touch with you as soon as possible.'); } catch (\Throwable $e) { return handleError($e, $this); } diff --git a/app/Http/Livewire/Modal/EditCompose.php b/app/Livewire/Modal/EditCompose.php similarity index 76% rename from app/Http/Livewire/Modal/EditCompose.php rename to app/Livewire/Modal/EditCompose.php index 2ed129f9d..e5222404f 100644 --- a/app/Http/Livewire/Modal/EditCompose.php +++ b/app/Livewire/Modal/EditCompose.php @@ -1,6 +1,6 @@ emit('warning', "Saving new docker compose..."); - $this->emit('saveCompose', $this->service->docker_compose_raw); + $this->dispatch('warning', "Saving new docker compose..."); + $this->dispatch('saveCompose', $this->service->docker_compose_raw); $this->closeModal(); } } diff --git a/app/Http/Livewire/Notifications/DiscordSettings.php b/app/Livewire/Notifications/DiscordSettings.php similarity index 89% rename from app/Http/Livewire/Notifications/DiscordSettings.php rename to app/Livewire/Notifications/DiscordSettings.php index f39ea9175..cf8b116d4 100644 --- a/app/Http/Livewire/Notifications/DiscordSettings.php +++ b/app/Livewire/Notifications/DiscordSettings.php @@ -1,6 +1,6 @@ team->save(); refreshSession(); - $this->emit('success', 'Settings saved.'); + $this->dispatch('success', 'Settings saved.'); } public function sendTestNotification() { $this->team->notify(new Test()); - $this->emit('success', 'Test notification sent.'); + $this->dispatch('success', 'Test notification sent.'); } } diff --git a/app/Http/Livewire/Notifications/EmailSettings.php b/app/Livewire/Notifications/EmailSettings.php similarity index 90% rename from app/Http/Livewire/Notifications/EmailSettings.php rename to app/Livewire/Notifications/EmailSettings.php index 68c0b931b..f3b121851 100644 --- a/app/Http/Livewire/Notifications/EmailSettings.php +++ b/app/Livewire/Notifications/EmailSettings.php @@ -1,6 +1,6 @@ team->save(); refreshSession(); - $this->emit('success', 'Settings saved successfully.'); + $this->dispatch('success', 'Settings saved successfully.'); } catch (\Throwable $e) { return handleError($e, $this); } @@ -71,7 +71,7 @@ class EmailSettings extends Component public function sendTestNotification() { $this->team->notify(new Test($this->emails)); - $this->emit('success', 'Test Email sent successfully.'); + $this->dispatch('success', 'Test Email sent successfully.'); } public function instantSaveInstance() { @@ -83,7 +83,7 @@ class EmailSettings extends Component $this->team->resend_enabled = false; $this->team->save(); refreshSession(); - $this->emit('success', 'Settings saved successfully.'); + $this->dispatch('success', 'Settings saved successfully.'); } catch (\Throwable $e) { return handleError($e, $this); } @@ -113,7 +113,7 @@ class EmailSettings extends Component { $this->team->save(); refreshSession(); - $this->emit('success', 'Settings saved.'); + $this->dispatch('success', 'Settings saved.'); } public function submit() { @@ -131,7 +131,7 @@ class EmailSettings extends Component ]); $this->team->save(); refreshSession(); - $this->emit('success', 'Settings saved successfully.'); + $this->dispatch('success', 'Settings saved successfully.'); } catch (\Throwable $e) { $this->team->smtp_enabled = false; return handleError($e, $this); @@ -148,7 +148,7 @@ class EmailSettings extends Component ]); $this->team->save(); refreshSession(); - $this->emit('success', 'Settings saved successfully.'); + $this->dispatch('success', 'Settings saved successfully.'); } catch (\Throwable $e) { $this->team->resend_enabled = false; return handleError($e, $this); @@ -173,7 +173,7 @@ class EmailSettings extends Component ]); refreshSession(); $this->team = $team; - $this->emit('success', 'Settings saved.'); + $this->dispatch('success', 'Settings saved.'); return; } if ($settings->resend_enabled) { @@ -184,9 +184,9 @@ class EmailSettings extends Component ]); refreshSession(); $this->team = $team; - $this->emit('success', 'Settings saved.'); + $this->dispatch('success', 'Settings saved.'); return; } - $this->emit('error', 'Instance SMTP/Resend settings are not enabled.'); + $this->dispatch('error', 'Instance SMTP/Resend settings are not enabled.'); } } diff --git a/app/Http/Livewire/Notifications/TelegramSettings.php b/app/Livewire/Notifications/TelegramSettings.php similarity index 92% rename from app/Http/Livewire/Notifications/TelegramSettings.php rename to app/Livewire/Notifications/TelegramSettings.php index 1f4200076..08f1be005 100644 --- a/app/Http/Livewire/Notifications/TelegramSettings.php +++ b/app/Livewire/Notifications/TelegramSettings.php @@ -1,6 +1,6 @@ team->save(); refreshSession(); - $this->emit('success', 'Settings saved.'); + $this->dispatch('success', 'Settings saved.'); } public function sendTestNotification() { $this->team->notify(new Test()); - $this->emit('success', 'Test notification sent.'); + $this->dispatch('success', 'Test notification sent.'); } } diff --git a/app/Http/Livewire/PrivateKey/Change.php b/app/Livewire/PrivateKey/Change.php similarity index 86% rename from app/Http/Livewire/PrivateKey/Change.php rename to app/Livewire/PrivateKey/Change.php index 742212396..8177ea55b 100644 --- a/app/Http/Livewire/PrivateKey/Change.php +++ b/app/Livewire/PrivateKey/Change.php @@ -1,6 +1,6 @@ privateKeys = PrivateKey::where('team_id', currentTeam()->id)->get(); return redirect()->route('security.private-key.index'); } - $this->emit('error', 'This private key is in use and cannot be deleted. Please delete all servers, applications, and GitHub/GitLab apps that use this private key before deleting it.'); + $this->dispatch('error', 'This private key is in use and cannot be deleted. Please delete all servers, applications, and GitHub/GitLab apps that use this private key before deleting it.'); } catch (\Throwable $e) { return handleError($e, $this); } diff --git a/app/Http/Livewire/PrivateKey/Create.php b/app/Livewire/PrivateKey/Create.php similarity index 98% rename from app/Http/Livewire/PrivateKey/Create.php rename to app/Livewire/PrivateKey/Create.php index 4dcaedbe2..a82b6fb48 100644 --- a/app/Http/Livewire/PrivateKey/Create.php +++ b/app/Livewire/PrivateKey/Create.php @@ -1,6 +1,6 @@ application->isLogDrainEnabled()) { if (!$this->application->destination->server->isLogDrainEnabled()) { $this->application->settings->is_log_drain_enabled = false; - $this->emit('error', 'Log drain is not enabled on this server.'); + $this->dispatch('error', 'Log drain is not enabled on this server.'); return; } } if ($this->application->settings->is_force_https_enabled) { - $this->emit('resetDefaultLabels', false); + $this->dispatch('resetDefaultLabels', false); } $this->application->settings->save(); - $this->emit('success', 'Settings saved.'); + $this->dispatch('success', 'Settings saved.'); } public function submit() { if ($this->application->settings->gpu_count && $this->application->settings->gpu_device_ids) { - $this->emit('error', 'You cannot set both GPU count and GPU device IDs.'); + $this->dispatch('error', 'You cannot set both GPU count and GPU device IDs.'); $this->application->settings->gpu_count = null; $this->application->settings->gpu_device_ids = null; $this->application->settings->save(); return; } $this->application->settings->save(); - $this->emit('success', 'Settings saved.'); + $this->dispatch('success', 'Settings saved.'); } public function render() { diff --git a/app/Http/Livewire/Project/Application/Command.php b/app/Livewire/Project/Application/Command.php similarity index 97% rename from app/Http/Livewire/Project/Application/Command.php rename to app/Livewire/Project/Application/Command.php index 5fea572ee..7d6bdb0f5 100644 --- a/app/Http/Livewire/Project/Application/Command.php +++ b/app/Livewire/Project/Application/Command.php @@ -1,6 +1,6 @@ container} {$this->command}"; } $activity = remote_process([$exec], $this->server, ignore_errors: true); - $this->emit('newMonitorActivity', $activity->id); + $this->dispatch('newMonitorActivity', $activity->id); } catch (\Throwable $e) { return handleError($e, $this); } diff --git a/app/Http/Livewire/Project/Application/Configuration.php b/app/Livewire/Project/Application/Configuration.php similarity index 96% rename from app/Http/Livewire/Project/Application/Configuration.php rename to app/Livewire/Project/Application/Configuration.php index 51d964d37..691cbb7c4 100644 --- a/app/Http/Livewire/Project/Application/Configuration.php +++ b/app/Livewire/Project/Application/Configuration.php @@ -1,6 +1,6 @@ emit('deploymentFinished'); + $this->dispatch('deploymentFinished'); $this->application_deployment_queue->refresh(); if (data_get($this->application_deployment_queue, 'status') == 'finished' || data_get($this->application_deployment_queue, 'status') == 'failed') { $this->isKeepAliveOn = false; diff --git a/app/Http/Livewire/Project/Application/DeploymentNavbar.php b/app/Livewire/Project/Application/DeploymentNavbar.php similarity index 97% rename from app/Http/Livewire/Project/Application/DeploymentNavbar.php rename to app/Livewire/Project/Application/DeploymentNavbar.php index 2cee34d11..aa5ea3a2d 100644 --- a/app/Http/Livewire/Project/Application/DeploymentNavbar.php +++ b/app/Livewire/Project/Application/DeploymentNavbar.php @@ -1,6 +1,6 @@ application->settings->is_debug_enabled = !$this->application->settings->is_debug_enabled; $this->application->settings->save(); $this->is_debug_enabled = $this->application->settings->is_debug_enabled; - $this->emit('refreshQueue'); + $this->dispatch('refreshQueue'); } public function cancel() diff --git a/app/Http/Livewire/Project/Application/Deployments.php b/app/Livewire/Project/Application/Deployments.php similarity index 97% rename from app/Http/Livewire/Project/Application/Deployments.php rename to app/Livewire/Project/Application/Deployments.php index 4f4d5ef67..241167a8f 100644 --- a/app/Http/Livewire/Project/Application/Deployments.php +++ b/app/Livewire/Project/Application/Deployments.php @@ -1,6 +1,6 @@ parsedServices = $this->application->parseCompose(); } catch (\Throwable $e) { - $this->emit('error', $e->getMessage()); + $this->dispatch('error', $e->getMessage()); } $this->parsedServiceDomains = $this->application->docker_compose_domains ? json_decode($this->application->docker_compose_domains, true) : []; @@ -121,7 +121,7 @@ class General extends Component public function instantSave() { $this->application->settings->save(); - $this->emit('success', 'Settings saved.'); + $this->dispatch('success', 'Settings saved.'); $this->application->refresh(); if ($this->ports_exposes !== $this->application->ports_exposes) { $this->resetDefaultLabels(false); @@ -134,7 +134,7 @@ class General extends Component return; } ['parsedServices' => $this->parsedServices, 'initialDockerComposeLocation' => $this->initialDockerComposeLocation, 'initialDockerComposePrLocation' => $this->initialDockerComposePrLocation] = $this->application->loadComposeFile($isInit); - $this->emit('success', 'Docker compose file loaded.'); + $this->dispatch('success', 'Docker compose file loaded.'); } catch (\Throwable $e) { $this->application->docker_compose_location = $this->initialDockerComposeLocation; $this->application->docker_compose_pr_location = $this->initialDockerComposePrLocation; @@ -151,7 +151,7 @@ class General extends Component $this->parsedServiceDomains[$serviceName]['domain'] = $domain; $this->application->docker_compose_domains = json_encode($this->parsedServiceDomains); $this->application->save(); - $this->emit('success', 'Domain generated.'); + $this->dispatch('success', 'Domain generated.'); } return $domain; } @@ -196,7 +196,7 @@ class General extends Component public function updatedApplicationFqdn() { $this->resetDefaultLabels(false); - $this->emit('success', 'Labels reseted to default!'); + $this->dispatch('success', 'Labels reseted to default!'); } public function submit($showToaster = true) { @@ -220,6 +220,7 @@ class General extends Component }); $this->application->fqdn = $domains->implode(','); } + if (data_get($this->application, 'dockerfile')) { $port = get_port_from_dockerfile($this->application->dockerfile); if ($port && !$this->application->ports_exposes) { @@ -241,7 +242,7 @@ class General extends Component $this->parsedServices = $this->application->parseCompose(); } $this->application->save(); - $showToaster && $this->emit('success', 'Application settings updated!'); + $showToaster && $this->dispatch('success', 'Application settings updated!'); } catch (\Throwable $e) { return handleError($e, $this); } finally { diff --git a/app/Http/Livewire/Project/Application/Heading.php b/app/Livewire/Project/Application/Heading.php similarity index 93% rename from app/Http/Livewire/Project/Application/Heading.php rename to app/Livewire/Project/Application/Heading.php index 3d5af34da..0e4c4e458 100644 --- a/app/Http/Livewire/Project/Application/Heading.php +++ b/app/Livewire/Project/Application/Heading.php @@ -1,6 +1,6 @@ application->build_pack === 'dockercompose' && is_null($this->application->docker_compose_raw)) { - $this->emit('error', 'Please load a Compose file first.'); + $this->dispatch('error', 'Please load a Compose file first.'); return; } $this->setDeploymentUuid(); @@ -62,7 +62,7 @@ class Heading extends Component public function deploy(bool $force_rebuild = false) { if ($this->application->build_pack === 'dockercompose' && is_null($this->application->docker_compose_raw)) { - $this->emit('error', 'Please load a Compose file first.'); + $this->dispatch('error', 'Please load a Compose file first.'); return; } $this->setDeploymentUuid(); @@ -71,12 +71,12 @@ class Heading extends Component deployment_uuid: $this->deploymentUuid, force_rebuild: $force_rebuild, ); - return redirect()->route('project.application.deployment', [ + $this->redirectRoute('project.application.deployment', [ 'project_uuid' => $this->parameters['project_uuid'], 'application_uuid' => $this->parameters['application_uuid'], 'deployment_uuid' => $this->deploymentUuid, 'environment_name' => $this->parameters['environment_name'], - ]); + ], navigate: true); } protected function setDeploymentUuid() diff --git a/app/Http/Livewire/Project/Application/Preview/Form.php b/app/Livewire/Project/Application/Preview/Form.php similarity index 91% rename from app/Http/Livewire/Project/Application/Preview/Form.php rename to app/Livewire/Project/Application/Preview/Form.php index fb71e5e47..0da8b1d76 100644 --- a/app/Http/Livewire/Project/Application/Preview/Form.php +++ b/app/Livewire/Project/Application/Preview/Form.php @@ -1,6 +1,6 @@ validate(); $this->application->preview_url_template = str_replace(' ', '', $this->application->preview_url_template); $this->application->save(); - $this->emit('success', 'Preview url template updated successfully.'); + $this->dispatch('success', 'Preview url template updated successfully.'); $this->generate_real_url(); } } diff --git a/app/Http/Livewire/Project/Application/Previews.php b/app/Livewire/Project/Application/Previews.php similarity index 98% rename from app/Http/Livewire/Project/Application/Previews.php rename to app/Livewire/Project/Application/Previews.php index effdd7f7c..6605123fa 100644 --- a/app/Http/Livewire/Project/Application/Previews.php +++ b/app/Livewire/Project/Application/Previews.php @@ -1,6 +1,6 @@ toArray(); } - $showToast && $this->emit('success', 'Images loaded.'); + $showToast && $this->dispatch('success', 'Images loaded.'); return []; } catch (\Throwable $e) { return handleError($e, $this); diff --git a/app/Http/Livewire/Project/Application/Source.php b/app/Livewire/Project/Application/Source.php similarity index 92% rename from app/Http/Livewire/Project/Application/Source.php rename to app/Livewire/Project/Application/Source.php index 801d533aa..c9907c8c4 100644 --- a/app/Http/Livewire/Project/Application/Source.php +++ b/app/Livewire/Project/Application/Source.php @@ -1,6 +1,6 @@ application->git_commit_sha = 'HEAD'; } $this->application->save(); - $this->emit('success', 'Application source updated!'); + $this->dispatch('success', 'Application source updated!'); } } diff --git a/app/Http/Livewire/Project/CloneProject.php b/app/Livewire/Project/CloneProject.php similarity index 99% rename from app/Http/Livewire/Project/CloneProject.php rename to app/Livewire/Project/CloneProject.php index 48852b7ce..275c0999c 100644 --- a/app/Http/Livewire/Project/CloneProject.php +++ b/app/Livewire/Project/CloneProject.php @@ -1,6 +1,6 @@ custom_validate(); $this->backup->save(); $this->backup->refresh(); - $this->emit('success', 'Backup updated successfully'); + $this->dispatch('success', 'Backup updated successfully'); } catch (\Throwable $e) { - $this->emit('error', $e->getMessage()); + $this->dispatch('error', $e->getMessage()); } } @@ -90,9 +90,9 @@ class BackupEdit extends Component } $this->backup->save(); $this->backup->refresh(); - $this->emit('success', 'Backup updated successfully'); + $this->dispatch('success', 'Backup updated successfully'); } catch (\Throwable $e) { - $this->emit('error', $e->getMessage()); + $this->dispatch('error', $e->getMessage()); } } } diff --git a/app/Http/Livewire/Project/Database/BackupExecutions.php b/app/Livewire/Project/Database/BackupExecutions.php similarity index 87% rename from app/Http/Livewire/Project/Database/BackupExecutions.php rename to app/Livewire/Project/Database/BackupExecutions.php index 41a1cfbd6..f92b9790b 100644 --- a/app/Http/Livewire/Project/Database/BackupExecutions.php +++ b/app/Livewire/Project/Database/BackupExecutions.php @@ -1,6 +1,6 @@ backup->executions()->where('id', $exeuctionId)->first(); if (is_null($execution)) { - $this->emit('error', 'Backup execution not found.'); + $this->dispatch('error', 'Backup execution not found.'); return; } if ($execution->scheduledDatabaseBackup->database->getMorphClass() === 'App\Models\ServiceDatabase') { @@ -25,15 +25,15 @@ class BackupExecutions extends Component delete_backup_locally($execution->filename, $execution->scheduledDatabaseBackup->database->destination->server); } $execution->delete(); - $this->emit('success', 'Backup deleted successfully.'); - $this->emit('refreshBackupExecutions'); + $this->dispatch('success', 'Backup deleted successfully.'); + $this->dispatch('refreshBackupExecutions'); } public function download($exeuctionId) { try { $execution = $this->backup->executions()->where('id', $exeuctionId)->first(); if (is_null($execution)) { - $this->emit('error', 'Backup execution not found.'); + $this->dispatch('error', 'Backup execution not found.'); return; } $filename = data_get($execution, 'filename'); diff --git a/app/Http/Livewire/Project/Database/BackupNow.php b/app/Livewire/Project/Database/BackupNow.php similarity index 65% rename from app/Http/Livewire/Project/Database/BackupNow.php rename to app/Livewire/Project/Database/BackupNow.php index 35bd8318d..988f382a0 100644 --- a/app/Http/Livewire/Project/Database/BackupNow.php +++ b/app/Livewire/Project/Database/BackupNow.php @@ -1,6 +1,6 @@ backup )); - $this->emit('success', 'Backup queued. It will be available in a few minutes.'); + $this->dispatch('success', 'Backup queued. It will be available in a few minutes.'); } } diff --git a/app/Http/Livewire/Project/Database/CreateScheduledBackup.php b/app/Livewire/Project/Database/CreateScheduledBackup.php similarity index 89% rename from app/Http/Livewire/Project/Database/CreateScheduledBackup.php rename to app/Livewire/Project/Database/CreateScheduledBackup.php index a36266a6c..e58ea9df3 100644 --- a/app/Http/Livewire/Project/Database/CreateScheduledBackup.php +++ b/app/Livewire/Project/Database/CreateScheduledBackup.php @@ -1,6 +1,6 @@ validate(); $isValid = validate_cron_expression($this->frequency); if (!$isValid) { - $this->emit('error', 'Invalid Cron / Human expression.'); + $this->dispatch('error', 'Invalid Cron / Human expression.'); return; } $payload = [ @@ -57,9 +57,9 @@ class CreateScheduledBackup extends Component $databaseBackup = ScheduledDatabaseBackup::create($payload); if ($this->database->getMorphClass() === 'App\Models\ServiceDatabase') { - $this->emit('refreshScheduledBackups', $databaseBackup->id); + $this->dispatch('refreshScheduledBackups', $databaseBackup->id); } else { - $this->emit('refreshScheduledBackups'); + $this->dispatch('refreshScheduledBackups'); } } catch (\Throwable $e) { handleError($e, $this); diff --git a/app/Http/Livewire/Project/Database/Heading.php b/app/Livewire/Project/Database/Heading.php similarity index 81% rename from app/Http/Livewire/Project/Database/Heading.php rename to app/Livewire/Project/Database/Heading.php index 7b14e5368..3e5442677 100644 --- a/app/Http/Livewire/Project/Database/Heading.php +++ b/app/Livewire/Project/Database/Heading.php @@ -1,6 +1,6 @@ database->update([ 'started_at' => now(), ]); - $this->emit('refresh'); + $this->dispatch('refresh'); $this->check_status(); } @@ -50,19 +50,19 @@ class Heading extends Component { if ($this->database->type() === 'standalone-postgresql') { $activity = StartPostgresql::run($this->database); - $this->emit('newMonitorActivity', $activity->id); + $this->dispatch('newMonitorActivity', $activity->id); } else if ($this->database->type() === 'standalone-redis') { $activity = StartRedis::run($this->database); - $this->emit('newMonitorActivity', $activity->id); + $this->dispatch('newMonitorActivity', $activity->id); } else if ($this->database->type() === 'standalone-mongodb') { $activity = StartMongodb::run($this->database); - $this->emit('newMonitorActivity', $activity->id); + $this->dispatch('newMonitorActivity', $activity->id); } else if ($this->database->type() === 'standalone-mysql') { $activity = StartMysql::run($this->database); - $this->emit('newMonitorActivity', $activity->id); + $this->dispatch('newMonitorActivity', $activity->id); } else if ($this->database->type() === 'standalone-mariadb') { $activity = StartMariadb::run($this->database); - $this->emit('newMonitorActivity', $activity->id); + $this->dispatch('newMonitorActivity', $activity->id); } } } diff --git a/app/Http/Livewire/Project/Database/InitScript.php b/app/Livewire/Project/Database/InitScript.php similarity index 84% rename from app/Http/Livewire/Project/Database/InitScript.php rename to app/Livewire/Project/Database/InitScript.php index a371bb33e..2014fba3b 100644 --- a/app/Http/Livewire/Project/Database/InitScript.php +++ b/app/Livewire/Project/Database/InitScript.php @@ -1,7 +1,8 @@ script['index'] = $this->index; $this->script['content'] = $this->content; $this->script['filename'] = $this->filename; - $this->emitUp('save_init_script', $this->script); + $this->dispatch('save_init_script', $this->script); } catch (Exception $e) { return handleError($e, $this); } @@ -42,6 +43,6 @@ class InitScript extends Component public function delete() { - $this->emitUp('delete_init_script', $this->script); + $this->dispatch('delete_init_script', $this->script); } } diff --git a/app/Http/Livewire/Project/Database/Mariadb/General.php b/app/Livewire/Project/Database/Mariadb/General.php similarity index 82% rename from app/Http/Livewire/Project/Database/Mariadb/General.php rename to app/Livewire/Project/Database/Mariadb/General.php index 455f1b4ca..305633cba 100644 --- a/app/Http/Livewire/Project/Database/Mariadb/General.php +++ b/app/Livewire/Project/Database/Mariadb/General.php @@ -1,6 +1,6 @@ database->destination->server->isLogDrainEnabled()) { $this->database->is_log_drain_enabled = false; - $this->emit('error', 'Log drain is not enabled on the server. Please enable it first.'); + $this->dispatch('error', 'Log drain is not enabled on the server. Please enable it first.'); return; } $this->database->save(); - $this->emit('success', 'Database updated successfully.'); - $this->emit('success', 'You need to restart the service for the changes to take effect.'); + $this->dispatch('success', 'Database updated successfully.'); + $this->dispatch('success', 'You need to restart the service for the changes to take effect.'); } catch (Exception $e) { return handleError($e, $this); } @@ -73,7 +73,7 @@ class General extends Component } $this->validate(); $this->database->save(); - $this->emit('success', 'Database updated successfully.'); + $this->dispatch('success', 'Database updated successfully.'); } catch (Exception $e) { return handleError($e, $this); } @@ -82,23 +82,23 @@ class General extends Component { try { if ($this->database->is_public && !$this->database->public_port) { - $this->emit('error', 'Public port is required.'); + $this->dispatch('error', 'Public port is required.'); $this->database->is_public = false; return; } if ($this->database->is_public) { if (!str($this->database->status)->startsWith('running')) { - $this->emit('error', 'Database must be started to be publicly accessible.'); + $this->dispatch('error', 'Database must be started to be publicly accessible.'); $this->database->is_public = false; return; } StartDatabaseProxy::run($this->database); $this->db_url_public = $this->database->getDbUrl(); - $this->emit('success', 'Database is now publicly accessible.'); + $this->dispatch('success', 'Database is now publicly accessible.'); } else { StopDatabaseProxy::run($this->database); $this->db_url_public = null; - $this->emit('success', 'Database is no longer publicly accessible.'); + $this->dispatch('success', 'Database is no longer publicly accessible.'); } $this->database->save(); } catch (\Throwable $e) { diff --git a/app/Http/Livewire/Project/Database/Mongodb/General.php b/app/Livewire/Project/Database/Mongodb/General.php similarity index 82% rename from app/Http/Livewire/Project/Database/Mongodb/General.php rename to app/Livewire/Project/Database/Mongodb/General.php index 84669a019..70f54cc3f 100644 --- a/app/Http/Livewire/Project/Database/Mongodb/General.php +++ b/app/Livewire/Project/Database/Mongodb/General.php @@ -1,6 +1,6 @@ database->destination->server->isLogDrainEnabled()) { $this->database->is_log_drain_enabled = false; - $this->emit('error', 'Log drain is not enabled on the server. Please enable it first.'); + $this->dispatch('error', 'Log drain is not enabled on the server. Please enable it first.'); return; } $this->database->save(); - $this->emit('success', 'Database updated successfully.'); - $this->emit('success', 'You need to restart the service for the changes to take effect.'); + $this->dispatch('success', 'Database updated successfully.'); + $this->dispatch('success', 'You need to restart the service for the changes to take effect.'); } catch (Exception $e) { return handleError($e, $this); } @@ -75,7 +75,7 @@ class General extends Component } $this->validate(); $this->database->save(); - $this->emit('success', 'Database updated successfully.'); + $this->dispatch('success', 'Database updated successfully.'); } catch (Exception $e) { return handleError($e, $this); } @@ -84,23 +84,23 @@ class General extends Component { try { if ($this->database->is_public && !$this->database->public_port) { - $this->emit('error', 'Public port is required.'); + $this->dispatch('error', 'Public port is required.'); $this->database->is_public = false; return; } if ($this->database->is_public) { if (!str($this->database->status)->startsWith('running')) { - $this->emit('error', 'Database must be started to be publicly accessible.'); + $this->dispatch('error', 'Database must be started to be publicly accessible.'); $this->database->is_public = false; return; } StartDatabaseProxy::run($this->database); $this->db_url_public = $this->database->getDbUrl(); - $this->emit('success', 'Database is now publicly accessible.'); + $this->dispatch('success', 'Database is now publicly accessible.'); } else { StopDatabaseProxy::run($this->database); $this->db_url_public = null; - $this->emit('success', 'Database is no longer publicly accessible.'); + $this->dispatch('success', 'Database is no longer publicly accessible.'); } $this->database->save(); } catch (\Throwable $e) { diff --git a/app/Http/Livewire/Project/Database/Mysql/General.php b/app/Livewire/Project/Database/Mysql/General.php similarity index 82% rename from app/Http/Livewire/Project/Database/Mysql/General.php rename to app/Livewire/Project/Database/Mysql/General.php index c63cea293..98b16a112 100644 --- a/app/Http/Livewire/Project/Database/Mysql/General.php +++ b/app/Livewire/Project/Database/Mysql/General.php @@ -1,6 +1,6 @@ database->destination->server->isLogDrainEnabled()) { $this->database->is_log_drain_enabled = false; - $this->emit('error', 'Log drain is not enabled on the server. Please enable it first.'); + $this->dispatch('error', 'Log drain is not enabled on the server. Please enable it first.'); return; } $this->database->save(); - $this->emit('success', 'Database updated successfully.'); - $this->emit('success', 'You need to restart the service for the changes to take effect.'); + $this->dispatch('success', 'Database updated successfully.'); + $this->dispatch('success', 'You need to restart the service for the changes to take effect.'); } catch (Exception $e) { return handleError($e, $this); } @@ -74,7 +74,7 @@ class General extends Component } $this->validate(); $this->database->save(); - $this->emit('success', 'Database updated successfully.'); + $this->dispatch('success', 'Database updated successfully.'); } catch (Exception $e) { return handleError($e, $this); } @@ -83,23 +83,23 @@ class General extends Component { try { if ($this->database->is_public && !$this->database->public_port) { - $this->emit('error', 'Public port is required.'); + $this->dispatch('error', 'Public port is required.'); $this->database->is_public = false; return; } if ($this->database->is_public) { if (!str($this->database->status)->startsWith('running')) { - $this->emit('error', 'Database must be started to be publicly accessible.'); + $this->dispatch('error', 'Database must be started to be publicly accessible.'); $this->database->is_public = false; return; } StartDatabaseProxy::run($this->database); $this->db_url_public = $this->database->getDbUrl(); - $this->emit('success', 'Database is now publicly accessible.'); + $this->dispatch('success', 'Database is now publicly accessible.'); } else { StopDatabaseProxy::run($this->database); $this->db_url_public = null; - $this->emit('success', 'Database is no longer publicly accessible.'); + $this->dispatch('success', 'Database is no longer publicly accessible.'); } $this->database->save(); } catch (\Throwable $e) { diff --git a/app/Http/Livewire/Project/Database/Postgresql/General.php b/app/Livewire/Project/Database/Postgresql/General.php similarity index 84% rename from app/Http/Livewire/Project/Database/Postgresql/General.php rename to app/Livewire/Project/Database/Postgresql/General.php index 1804953ee..6fa5df97c 100644 --- a/app/Http/Livewire/Project/Database/Postgresql/General.php +++ b/app/Livewire/Project/Database/Postgresql/General.php @@ -1,6 +1,6 @@ database->destination->server->isLogDrainEnabled()) { $this->database->is_log_drain_enabled = false; - $this->emit('error', 'Log drain is not enabled on the server. Please enable it first.'); + $this->dispatch('error', 'Log drain is not enabled on the server. Please enable it first.'); return; } $this->database->save(); - $this->emit('success', 'Database updated successfully.'); - $this->emit('success', 'You need to restart the service for the changes to take effect.'); + $this->dispatch('success', 'Database updated successfully.'); + $this->dispatch('success', 'You need to restart the service for the changes to take effect.'); } catch (Exception $e) { return handleError($e, $this); } @@ -76,23 +76,23 @@ class General extends Component { try { if ($this->database->is_public && !$this->database->public_port) { - $this->emit('error', 'Public port is required.'); + $this->dispatch('error', 'Public port is required.'); $this->database->is_public = false; return; } if ($this->database->is_public) { if (!str($this->database->status)->startsWith('running')) { - $this->emit('error', 'Database must be started to be publicly accessible.'); + $this->dispatch('error', 'Database must be started to be publicly accessible.'); $this->database->is_public = false; return; } StartDatabaseProxy::run($this->database); $this->db_url_public = $this->database->getDbUrl(); - $this->emit('success', 'Database is now publicly accessible.'); + $this->dispatch('success', 'Database is now publicly accessible.'); } else { StopDatabaseProxy::run($this->database); $this->db_url_public = null; - $this->emit('success', 'Database is no longer publicly accessible.'); + $this->dispatch('success', 'Database is no longer publicly accessible.'); } $this->database->save(); } catch (\Throwable $e) { @@ -105,7 +105,7 @@ class General extends Component $this->database->init_scripts = filter($this->database->init_scripts, fn ($s) => $s['filename'] !== $script['filename']); $this->database->init_scripts = array_merge($this->database->init_scripts, [$script]); $this->database->save(); - $this->emit('success', 'Init script saved successfully.'); + $this->dispatch('success', 'Init script saved successfully.'); } public function delete_init_script($script) @@ -116,7 +116,7 @@ class General extends Component $this->database->init_scripts = $collection->filter(fn ($s) => $s['filename'] !== $script['filename'])->toArray(); $this->database->save(); $this->refresh(); - $this->emit('success', 'Init script deleted successfully.'); + $this->dispatch('success', 'Init script deleted successfully.'); return; } } @@ -134,7 +134,7 @@ class General extends Component ]); $found = collect($this->database->init_scripts)->firstWhere('filename', $this->new_filename); if ($found) { - $this->emit('error', 'Filename already exists.'); + $this->dispatch('error', 'Filename already exists.'); return; } if (!isset($this->database->init_scripts)) { @@ -148,7 +148,7 @@ class General extends Component ] ]); $this->database->save(); - $this->emit('success', 'Init script added successfully.'); + $this->dispatch('success', 'Init script added successfully.'); $this->new_content = ''; $this->new_filename = ''; } @@ -161,7 +161,7 @@ class General extends Component } $this->validate(); $this->database->save(); - $this->emit('success', 'Database updated successfully.'); + $this->dispatch('success', 'Database updated successfully.'); } catch (Exception $e) { return handleError($e, $this); } diff --git a/app/Http/Livewire/Project/Database/Redis/General.php b/app/Livewire/Project/Database/Redis/General.php similarity index 81% rename from app/Http/Livewire/Project/Database/Redis/General.php rename to app/Livewire/Project/Database/Redis/General.php index c2a28eef8..c328a6195 100644 --- a/app/Http/Livewire/Project/Database/Redis/General.php +++ b/app/Livewire/Project/Database/Redis/General.php @@ -1,6 +1,6 @@ database->destination->server->isLogDrainEnabled()) { $this->database->is_log_drain_enabled = false; - $this->emit('error', 'Log drain is not enabled on the server. Please enable it first.'); + $this->dispatch('error', 'Log drain is not enabled on the server. Please enable it first.'); return; } $this->database->save(); - $this->emit('success', 'Database updated successfully.'); - $this->emit('success', 'You need to restart the service for the changes to take effect.'); + $this->dispatch('success', 'Database updated successfully.'); + $this->dispatch('success', 'You need to restart the service for the changes to take effect.'); } catch (Exception $e) { return handleError($e, $this); } @@ -66,7 +66,7 @@ class General extends Component $this->database->redis_conf = null; } $this->database->save(); - $this->emit('success', 'Database updated successfully.'); + $this->dispatch('success', 'Database updated successfully.'); } catch (Exception $e) { return handleError($e, $this); } @@ -75,23 +75,23 @@ class General extends Component { try { if ($this->database->is_public && !$this->database->public_port) { - $this->emit('error', 'Public port is required.'); + $this->dispatch('error', 'Public port is required.'); $this->database->is_public = false; return; } if ($this->database->is_public) { if (!str($this->database->status)->startsWith('running')) { - $this->emit('error', 'Database must be started to be publicly accessible.'); + $this->dispatch('error', 'Database must be started to be publicly accessible.'); $this->database->is_public = false; return; } StartDatabaseProxy::run($this->database); $this->db_url_public = $this->database->getDbUrl(); - $this->emit('success', 'Database is now publicly accessible.'); + $this->dispatch('success', 'Database is now publicly accessible.'); } else { StopDatabaseProxy::run($this->database); $this->db_url_public = null; - $this->emit('success', 'Database is no longer publicly accessible.'); + $this->dispatch('success', 'Database is no longer publicly accessible.'); } $this->database->save(); } catch (\Throwable $e) { diff --git a/app/Http/Livewire/Project/Database/ScheduledBackups.php b/app/Livewire/Project/Database/ScheduledBackups.php similarity index 92% rename from app/Http/Livewire/Project/Database/ScheduledBackups.php rename to app/Livewire/Project/Database/ScheduledBackups.php index ec20b1adb..2fc4d069e 100644 --- a/app/Http/Livewire/Project/Database/ScheduledBackups.php +++ b/app/Livewire/Project/Database/ScheduledBackups.php @@ -1,6 +1,6 @@ database->scheduledBackups->find($scheduled_backup_id)->delete(); - $this->emit('success', 'Scheduled backup deleted successfully.'); + $this->dispatch('success', 'Scheduled backup deleted successfully.'); $this->refreshScheduledBackups(); } diff --git a/app/Http/Livewire/Project/DeleteEnvironment.php b/app/Livewire/Project/DeleteEnvironment.php similarity index 82% rename from app/Http/Livewire/Project/DeleteEnvironment.php rename to app/Livewire/Project/DeleteEnvironment.php index 0b6254b3b..0f2b59c93 100644 --- a/app/Http/Livewire/Project/DeleteEnvironment.php +++ b/app/Livewire/Project/DeleteEnvironment.php @@ -1,6 +1,6 @@ delete(); return redirect()->route('project.show', ['project_uuid' => $this->parameters['project_uuid']]); } - return $this->emit('error', 'Environment has defined resources, please delete them first.'); + return $this->dispatch('error', 'Environment has defined resources, please delete them first.'); } } diff --git a/app/Http/Livewire/Project/DeleteProject.php b/app/Livewire/Project/DeleteProject.php similarity index 80% rename from app/Http/Livewire/Project/DeleteProject.php rename to app/Livewire/Project/DeleteProject.php index 5bbfea17a..23ca8eb79 100644 --- a/app/Http/Livewire/Project/DeleteProject.php +++ b/app/Livewire/Project/DeleteProject.php @@ -1,6 +1,6 @@ project_id); if ($project->applications->count() > 0) { - return $this->emit('error', 'Project has resources defined, please delete them first.'); + return $this->dispatch('error', 'Project has resources defined, please delete them first.'); } $project->delete(); return redirect()->route('projects'); diff --git a/app/Http/Livewire/Project/Edit.php b/app/Livewire/Project/Edit.php similarity index 86% rename from app/Http/Livewire/Project/Edit.php rename to app/Livewire/Project/Edit.php index 94b6979ae..d08aa3e59 100644 --- a/app/Http/Livewire/Project/Edit.php +++ b/app/Livewire/Project/Edit.php @@ -1,6 +1,6 @@ validate(); try { $this->project->save(); - $this->emit('saved'); + $this->dispatch('saved'); } catch (\Throwable $e) { return handleError($e, $this); } diff --git a/app/Http/Livewire/Project/New/DockerCompose.php b/app/Livewire/Project/New/DockerCompose.php similarity index 98% rename from app/Http/Livewire/Project/New/DockerCompose.php rename to app/Livewire/Project/New/DockerCompose.php index 280167bb1..088a53c48 100644 --- a/app/Http/Livewire/Project/New/DockerCompose.php +++ b/app/Livewire/Project/New/DockerCompose.php @@ -1,6 +1,6 @@ token)->get("{$this->github_app->api_url}/installation/repositories?per_page=100&page={$this->page}"); $json = $response->json(); if ($response->status() !== 200) { - return $this->emit('error', $json['message']); + return $this->dispatch('error', $json['message']); } if ($json['total_count'] === 0) { @@ -104,7 +104,7 @@ class GithubPrivateRepository extends Component $response = Http::withToken($this->token)->get("{$this->github_app->api_url}/repos/{$this->selected_repository_owner}/{$this->selected_repository_repo}/branches?per_page=100&page={$this->page}"); $json = $response->json(); if ($response->status() !== 200) { - return $this->emit('error', $json['message']); + return $this->dispatch('error', $json['message']); } $this->total_branches_count = count($json); @@ -170,6 +170,6 @@ class GithubPrivateRepository extends Component $this->port = 3000; $this->publish_directory = null; } - $this->emit('success', 'Application settings updated!'); + $this->dispatch('success', 'Application settings updated!'); } } diff --git a/app/Http/Livewire/Project/New/GithubPrivateRepositoryDeployKey.php b/app/Livewire/Project/New/GithubPrivateRepositoryDeployKey.php similarity index 99% rename from app/Http/Livewire/Project/New/GithubPrivateRepositoryDeployKey.php rename to app/Livewire/Project/New/GithubPrivateRepositoryDeployKey.php index e8974436a..a843d3a52 100644 --- a/app/Http/Livewire/Project/New/GithubPrivateRepositoryDeployKey.php +++ b/app/Livewire/Project/New/GithubPrivateRepositoryDeployKey.php @@ -1,6 +1,6 @@ port = 3000; $this->publish_directory = null; } - $this->emit('success', 'Application settings updated!'); + $this->dispatch('success', 'Application settings updated!'); } public function load_any_git() { diff --git a/app/Http/Livewire/Project/New/Select.php b/app/Livewire/Project/New/Select.php similarity index 96% rename from app/Http/Livewire/Project/New/Select.php rename to app/Livewire/Project/New/Select.php index 13fbb8886..da25e9c8c 100644 --- a/app/Http/Livewire/Project/New/Select.php +++ b/app/Livewire/Project/New/Select.php @@ -1,6 +1,6 @@ existingPostgresqlUrl} -c 'SELECT 1'"); - // $this->emit('success', 'Successfully connected to the database.'); + // $this->dispatch('success', 'Successfully connected to the database.'); // } catch (\Throwable $e) { // return handleError($e, $this); // } @@ -89,7 +89,7 @@ class Select extends Component $this->services = $this->allServices->filter(function ($service, $key) { return str_contains(strtolower($key), strtolower($this->search)); });; - $this->emit('success', 'Successfully loaded services.'); + $this->dispatch('success', 'Successfully loaded services.'); } } catch (\Throwable $e) { return handleError($e, $this); diff --git a/app/Http/Livewire/Project/New/SimpleDockerfile.php b/app/Livewire/Project/New/SimpleDockerfile.php similarity index 98% rename from app/Http/Livewire/Project/New/SimpleDockerfile.php rename to app/Livewire/Project/New/SimpleDockerfile.php index 07a9ec88a..b478c77d4 100644 --- a/app/Http/Livewire/Project/New/SimpleDockerfile.php +++ b/app/Livewire/Project/New/SimpleDockerfile.php @@ -1,6 +1,6 @@ application->service->destination->server->isLogDrainEnabled()) { $this->application->is_log_drain_enabled = false; - $this->emit('error', 'Log drain is not enabled on the server. Please enable it first.'); + $this->dispatch('error', 'Log drain is not enabled on the server. Please enable it first.'); return; } $this->application->save(); - $this->emit('success', 'You need to restart the service for the changes to take effect.'); + $this->dispatch('success', 'You need to restart the service for the changes to take effect.'); } public function delete() { try { $this->application->delete(); - $this->emit('success', 'Application deleted successfully.'); + $this->dispatch('success', 'Application deleted successfully.'); return redirect()->route('project.service.configuration', $this->parameters); } catch (\Throwable $e) { return handleError($e, $this); @@ -56,11 +56,11 @@ class Application extends Component $this->validate(); $this->application->save(); updateCompose($this->application); - $this->emit('success', 'Application saved successfully.'); + $this->dispatch('success', 'Application saved successfully.'); } catch (\Throwable $e) { return handleError($e, $this); } finally { - $this->emit('generateDockerCompose'); + $this->dispatch('generateDockerCompose'); } } } diff --git a/app/Http/Livewire/Project/Service/Database.php b/app/Livewire/Project/Service/Database.php similarity index 77% rename from app/Http/Livewire/Project/Service/Database.php rename to app/Livewire/Project/Service/Database.php index 6bf6098ad..e7be1ff2e 100644 --- a/app/Http/Livewire/Project/Service/Database.php +++ b/app/Livewire/Project/Service/Database.php @@ -1,6 +1,6 @@ database->service->destination->server->isLogDrainEnabled()) { $this->database->is_log_drain_enabled = false; - $this->emit('error', 'Log drain is not enabled on the server. Please enable it first.'); + $this->dispatch('error', 'Log drain is not enabled on the server. Please enable it first.'); return; } $this->submit(); - $this->emit('success', 'You need to restart the service for the changes to take effect.'); + $this->dispatch('success', 'You need to restart the service for the changes to take effect.'); } public function instantSave() { if ($this->database->is_public && !$this->database->public_port) { - $this->emit('error', 'Public port is required.'); + $this->dispatch('error', 'Public port is required.'); $this->database->is_public = false; return; } if ($this->database->is_public) { if (!str($this->database->status)->startsWith('running')) { - $this->emit('error', 'Database must be started to be publicly accessible.'); + $this->dispatch('error', 'Database must be started to be publicly accessible.'); $this->database->is_public = false; return; } StartDatabaseProxy::run($this->database); $this->db_url_public = $this->database->getServiceDatabaseUrl(); - $this->emit('success', 'Database is now publicly accessible.'); + $this->dispatch('success', 'Database is now publicly accessible.'); } else { StopDatabaseProxy::run($this->database); $this->db_url_public = null; - $this->emit('success', 'Database is no longer publicly accessible.'); + $this->dispatch('success', 'Database is no longer publicly accessible.'); } $this->submit(); } @@ -77,11 +77,11 @@ class Database extends Component $this->validate(); $this->database->save(); updateCompose($this->database); - $this->emit('success', 'Database saved successfully.'); + $this->dispatch('success', 'Database saved successfully.'); } catch (\Throwable $e) { ray($e); } finally { - $this->emit('generateDockerCompose'); + $this->dispatch('generateDockerCompose'); } } } diff --git a/app/Http/Livewire/Project/Service/FileStorage.php b/app/Livewire/Project/Service/FileStorage.php similarity index 94% rename from app/Http/Livewire/Project/Service/FileStorage.php rename to app/Livewire/Project/Service/FileStorage.php index 91ab8e659..ab7736c97 100644 --- a/app/Http/Livewire/Project/Service/FileStorage.php +++ b/app/Livewire/Project/Service/FileStorage.php @@ -1,6 +1,6 @@ fileStorage->save(); $this->fileStorage->saveStorageOnServer($this->service); - $this->emit('success', 'File updated successfully.'); + $this->dispatch('success', 'File updated successfully.'); } catch (\Throwable $e) { $this->fileStorage->setRawAttributes($original); $this->fileStorage->save(); diff --git a/app/Http/Livewire/Project/Service/Index.php b/app/Livewire/Project/Service/Index.php similarity index 96% rename from app/Http/Livewire/Project/Service/Index.php rename to app/Livewire/Project/Service/Index.php index af88fac87..a798ca734 100644 --- a/app/Http/Livewire/Project/Service/Index.php +++ b/app/Livewire/Project/Service/Index.php @@ -1,6 +1,6 @@ emit('checkStatus'); + $this->dispatch('checkStatus'); } public function render() { diff --git a/app/Http/Livewire/Project/Service/Navbar.php b/app/Livewire/Project/Service/Navbar.php similarity index 73% rename from app/Http/Livewire/Project/Service/Navbar.php rename to app/Livewire/Project/Service/Navbar.php index 1953605e6..2457ecaa8 100644 --- a/app/Http/Livewire/Project/Service/Navbar.php +++ b/app/Livewire/Project/Service/Navbar.php @@ -1,6 +1,6 @@ service->parse(); $activity = StartService::run($this->service); - $this->emit('newMonitorActivity', $activity->id); + $this->dispatch('newMonitorActivity', $activity->id); } public function stop(bool $forceCleanup = false) { StopService::run($this->service); $this->service->refresh(); if ($forceCleanup) { - $this->emit('success', 'Force cleanup service successfully.'); + $this->dispatch('success', 'Force cleanup service successfully.'); } else { - $this->emit('success', 'Service stopped successfully.'); + $this->dispatch('success', 'Service stopped successfully.'); } - $this->emit('checkStatus'); + $this->dispatch('checkStatus'); } } diff --git a/app/Http/Livewire/Project/Service/Show.php b/app/Livewire/Project/Service/Show.php similarity index 97% rename from app/Http/Livewire/Project/Service/Show.php rename to app/Livewire/Project/Service/Show.php index 53f5033f4..272e0a399 100644 --- a/app/Http/Livewire/Project/Service/Show.php +++ b/app/Livewire/Project/Service/Show.php @@ -1,6 +1,6 @@ service->parse(); $this->service->refresh(); $this->service->saveComposeConfigs(); - $this->emit('refreshStacks'); - $this->emit('refreshEnvs'); - $this->emit('success', 'Service saved successfully.'); + $this->dispatch('refreshStacks'); + $this->dispatch('refreshEnvs'); + $this->dispatch('success', 'Service saved successfully.'); } catch (\Throwable $e) { return handleError($e, $this); } diff --git a/app/Http/Livewire/Project/Service/Storage.php b/app/Livewire/Project/Service/Storage.php similarity index 79% rename from app/Http/Livewire/Project/Service/Storage.php rename to app/Livewire/Project/Service/Storage.php index 2e3ef8f58..0accde787 100644 --- a/app/Http/Livewire/Project/Service/Storage.php +++ b/app/Livewire/Project/Service/Storage.php @@ -1,6 +1,6 @@ $this->resource->getMorphClass(), ]); $this->resource->refresh(); - $this->emit('success', 'Storage added successfully'); - $this->emit('clearAddStorage'); - $this->emit('refreshStorages'); + $this->dispatch('success', 'Storage added successfully'); + $this->dispatch('clearAddStorage'); + $this->dispatch('refreshStorages'); } catch (\Throwable $e) { return handleError($e, $this); } diff --git a/app/Http/Livewire/Project/Shared/Danger.php b/app/Livewire/Project/Shared/Danger.php similarity index 94% rename from app/Http/Livewire/Project/Shared/Danger.php rename to app/Livewire/Project/Shared/Danger.php index f2bef04d4..58742feab 100644 --- a/app/Http/Livewire/Project/Shared/Danger.php +++ b/app/Livewire/Project/Shared/Danger.php @@ -1,6 +1,6 @@ validate(); ray($this->key, $this->value, $this->is_build_time); - $this->emitUp('submit', [ + $this->dispatch('saveKey', [ 'key' => $this->key, 'value' => $this->value, 'is_build_time' => $this->is_build_time, diff --git a/app/Http/Livewire/Project/Shared/EnvironmentVariable/All.php b/app/Livewire/Project/Shared/EnvironmentVariable/All.php similarity index 91% rename from app/Http/Livewire/Project/Shared/EnvironmentVariable/All.php rename to app/Livewire/Project/Shared/EnvironmentVariable/All.php index 3f8b73f7b..7002fb989 100644 --- a/app/Http/Livewire/Project/Shared/EnvironmentVariable/All.php +++ b/app/Livewire/Project/Shared/EnvironmentVariable/All.php @@ -1,6 +1,6 @@ 'submit']; public function mount() { @@ -106,9 +106,9 @@ class All extends Component } } if ($isPreview) { - $this->emit('success', 'Preview environment variables updated successfully.'); + $this->dispatch('success', 'Preview environment variables updated successfully.'); } else { - $this->emit('success', 'Environment variables updated successfully.'); + $this->dispatch('success', 'Environment variables updated successfully.'); } $this->refreshEnvs(); } @@ -123,7 +123,7 @@ class All extends Component try { $found = $this->resource->environment_variables()->where('key', $data['key'])->first(); if ($found) { - $this->emit('error', 'Environment variable already exists.'); + $this->dispatch('error', 'Environment variable already exists.'); return; } $environment = new EnvironmentVariable(); @@ -145,7 +145,7 @@ class All extends Component } $environment->save(); $this->refreshEnvs(); - $this->emit('success', 'Environment variable added successfully.'); + $this->dispatch('success', 'Environment variable added successfully.'); } catch (\Throwable $e) { return handleError($e, $this); } diff --git a/app/Http/Livewire/Project/Shared/EnvironmentVariable/Show.php b/app/Livewire/Project/Shared/EnvironmentVariable/Show.php similarity index 86% rename from app/Http/Livewire/Project/Shared/EnvironmentVariable/Show.php rename to app/Livewire/Project/Shared/EnvironmentVariable/Show.php index eed0f7052..865ba9bcf 100644 --- a/app/Http/Livewire/Project/Shared/EnvironmentVariable/Show.php +++ b/app/Livewire/Project/Shared/EnvironmentVariable/Show.php @@ -1,6 +1,6 @@ env->is_shown_once = true; $this->env->save(); $this->checkEnvs(); - $this->emit('refreshEnvs'); + $this->dispatch('refreshEnvs'); } public function instantSave() { @@ -59,13 +59,13 @@ class Show extends Component { $this->validate(); $this->env->save(); - $this->emit('success', 'Environment variable updated successfully.'); - $this->emit('refreshEnvs'); + $this->dispatch('success', 'Environment variable updated successfully.'); + $this->dispatch('refreshEnvs'); } public function delete() { $this->env->delete(); - $this->emit('refreshEnvs'); + $this->dispatch('refreshEnvs'); } } diff --git a/app/Http/Livewire/Project/Shared/ExecuteContainerCommand.php b/app/Livewire/Project/Shared/ExecuteContainerCommand.php similarity index 97% rename from app/Http/Livewire/Project/Shared/ExecuteContainerCommand.php rename to app/Livewire/Project/Shared/ExecuteContainerCommand.php index 3c73a7f52..c0a373c38 100644 --- a/app/Http/Livewire/Project/Shared/ExecuteContainerCommand.php +++ b/app/Livewire/Project/Shared/ExecuteContainerCommand.php @@ -1,6 +1,6 @@ container} {$this->command}"; } $activity = remote_process([$exec], $this->server, ignore_errors: true); - $this->emit('newMonitorActivity', $activity->id); + $this->dispatch('newMonitorActivity', $activity->id); } catch (\Throwable $e) { return handleError($e, $this); } diff --git a/app/Http/Livewire/Project/Shared/GetLogs.php b/app/Livewire/Project/Shared/GetLogs.php similarity index 98% rename from app/Http/Livewire/Project/Shared/GetLogs.php rename to app/Livewire/Project/Shared/GetLogs.php index 933938f56..8d66c6f67 100644 --- a/app/Http/Livewire/Project/Shared/GetLogs.php +++ b/app/Livewire/Project/Shared/GetLogs.php @@ -1,6 +1,6 @@ resource->save(); - $this->emit('success', 'Health check updated.'); + $this->dispatch('success', 'Health check updated.'); } @@ -35,7 +35,7 @@ class HealthChecks extends Component try { $this->validate(); $this->resource->save(); - $this->emit('success', 'Health check updated.'); + $this->dispatch('success', 'Health check updated.'); } catch (\Throwable $e) { return handleError($e, $this); } diff --git a/app/Http/Livewire/Project/Shared/Logs.php b/app/Livewire/Project/Shared/Logs.php similarity index 98% rename from app/Http/Livewire/Project/Shared/Logs.php rename to app/Livewire/Project/Shared/Logs.php index 18b632ab4..a927ba9ef 100644 --- a/app/Http/Livewire/Project/Shared/Logs.php +++ b/app/Livewire/Project/Shared/Logs.php @@ -1,6 +1,6 @@ validate(); $this->resource->save(); - $this->emit('success', 'Resource limits updated successfully.'); + $this->dispatch('success', 'Resource limits updated successfully.'); } catch (\Throwable $e) { return handleError($e, $this); } diff --git a/app/Http/Livewire/Project/Shared/Storages/Add.php b/app/Livewire/Project/Shared/Storages/Add.php similarity index 91% rename from app/Http/Livewire/Project/Shared/Storages/Add.php rename to app/Livewire/Project/Shared/Storages/Add.php index 7278eda7a..b1f467b34 100644 --- a/app/Http/Livewire/Project/Shared/Storages/Add.php +++ b/app/Livewire/Project/Shared/Storages/Add.php @@ -1,6 +1,6 @@ validate(); $name = $this->uuid . '-' . $this->name; - $this->emit('addNewVolume', [ + $this->dispatch('addNewVolume', [ 'name' => $name, 'mount_path' => $this->mount_path, 'host_path' => $this->host_path, diff --git a/app/Http/Livewire/Project/Shared/Storages/All.php b/app/Livewire/Project/Shared/Storages/All.php similarity index 83% rename from app/Http/Livewire/Project/Shared/Storages/All.php rename to app/Livewire/Project/Shared/Storages/All.php index 457071711..598bc63d5 100644 --- a/app/Http/Livewire/Project/Shared/Storages/All.php +++ b/app/Livewire/Project/Shared/Storages/All.php @@ -1,6 +1,6 @@ validate(); $this->storage->save(); - $this->emit('success', 'Storage updated successfully'); + $this->dispatch('success', 'Storage updated successfully'); } public function delete() { $this->storage->delete(); - $this->emit('refreshStorages'); + $this->dispatch('refreshStorages'); } } diff --git a/app/Http/Livewire/Project/Shared/Webhooks.php b/app/Livewire/Project/Shared/Webhooks.php similarity index 91% rename from app/Http/Livewire/Project/Shared/Webhooks.php rename to app/Livewire/Project/Shared/Webhooks.php index d425b51df..c54a1c38f 100644 --- a/app/Http/Livewire/Project/Shared/Webhooks.php +++ b/app/Livewire/Project/Shared/Webhooks.php @@ -1,6 +1,6 @@ validate(); $this->resource->save(); - $this->emit('success','Secret Saved.'); + $this->dispatch('success','Secret Saved.'); } catch (\Exception $e) { return handleError($e, $this); } diff --git a/app/Http/Livewire/RunCommand.php b/app/Livewire/RunCommand.php old mode 100755 new mode 100644 similarity index 89% rename from app/Http/Livewire/RunCommand.php rename to app/Livewire/RunCommand.php index b8f4c6af8..309283403 --- a/app/Http/Livewire/RunCommand.php +++ b/app/Livewire/RunCommand.php @@ -1,6 +1,6 @@ validate(); try { $activity = remote_process([$this->command], Server::where('uuid', $this->server)->first(), ignore_errors: true); - $this->emit('newMonitorActivity', $activity->id); + $this->dispatch('newMonitorActivity', $activity->id); } catch (\Throwable $e) { return handleError($e, $this); } diff --git a/app/Http/Livewire/Security/ApiTokens.php b/app/Livewire/Security/ApiTokens.php similarity index 96% rename from app/Http/Livewire/Security/ApiTokens.php rename to app/Livewire/Security/ApiTokens.php index f00b30930..f0ffff133 100644 --- a/app/Http/Livewire/Security/ApiTokens.php +++ b/app/Livewire/Security/ApiTokens.php @@ -1,6 +1,6 @@ authorize('delete', $this->server); if ($this->server->hasDefinedResources()) { - $this->emit('error', 'Server has defined resources. Please delete them first.'); + $this->dispatch('error', 'Server has defined resources. Please delete them first.'); return; } $this->server->delete(); diff --git a/app/Http/Livewire/Server/Destination/Show.php b/app/Livewire/Server/Destination/Show.php similarity index 93% rename from app/Http/Livewire/Server/Destination/Show.php rename to app/Livewire/Server/Destination/Show.php index e021f9605..059dde4fb 100644 --- a/app/Http/Livewire/Server/Destination/Show.php +++ b/app/Livewire/Server/Destination/Show.php @@ -1,6 +1,6 @@ server->privateKey); $this->validateServer(false); $this->server->settings->save(); - $this->emit('success', 'Server updated successfully.'); + $this->dispatch('success', 'Server updated successfully.'); } catch (\Throwable $e) { return handleError($e, $this); } } public function installDocker() { - $this->emit('installDocker'); + $this->dispatch('installDocker'); $this->dockerInstallationStarted = true; $activity = InstallDocker::run($this->server); - $this->emit('newMonitorActivity', $activity->id); + $this->dispatch('newMonitorActivity', $activity->id); } public function checkLocalhostConnection() { $uptime = $this->server->validateConnection(); if ($uptime) { - $this->emit('success', 'Server is reachable.'); + $this->dispatch('success', 'Server is reachable.'); $this->server->settings->is_reachable = true; $this->server->settings->is_usable = true; $this->server->settings->save(); } else { - $this->emit('error', 'Server is not reachable. Please check your connection and configuration.'); + $this->dispatch('error', 'Server is not reachable. Please check your connection and configuration.'); return; } } @@ -86,24 +86,24 @@ class Form extends Component try { $uptime = $this->server->validateConnection(); if (!$uptime) { - $install && $this->emit('error', 'Server is not reachable. Please check your connection and configuration.'); + $install && $this->dispatch('error', 'Server is not reachable. Please check your connection and configuration.'); return; } $supported_os_type = $this->server->validateOS(); if (!$supported_os_type) { - $install && $this->emit('error', 'Server OS type is not supported for automated installation. Please install Docker manually before continuing: documentation.'); + $install && $this->dispatch('error', 'Server OS type is not supported for automated installation. Please install Docker manually before continuing: documentation.'); return; } $dockerInstalled = $this->server->validateDockerEngine(); if ($dockerInstalled) { - $install && $this->emit('success', 'Docker Engine is installed.
Checking version.'); + $install && $this->dispatch('success', 'Docker Engine is installed.
Checking version.'); } else { $install && $this->installDocker(); return; } $dockerVersion = $this->server->validateDockerEngineVersion(); if ($dockerVersion) { - $install && $this->emit('success', 'Docker Engine version is 22+.'); + $install && $this->dispatch('success', 'Docker Engine version is 22+.'); } else { $install && $this->installDocker(); return; @@ -111,13 +111,13 @@ class Form extends Component if ($this->server->isSwarm()) { $swarmInstalled = $this->server->validateDockerSwarm(); if ($swarmInstalled) { - $install && $this->emit('success', 'Docker Swarm is initiated.'); + $install && $this->dispatch('success', 'Docker Swarm is initiated.'); } } } catch (\Throwable $e) { return handleError($e, $this); } finally { - $this->emit('proxyStatusUpdated'); + $this->dispatch('proxyStatusUpdated'); } } @@ -135,7 +135,7 @@ class Form extends Component return $server->id === $this->server->id; })->pluck('ip')->toArray(); if (in_array($this->server->ip, $uniqueIPs)) { - $this->emit('error', 'IP address is already in use by another team.'); + $this->dispatch('error', 'IP address is already in use by another team.'); return; } refresh_server_connection($this->server->privateKey); @@ -143,6 +143,6 @@ class Form extends Component $this->server->settings->cleanup_after_percentage = $this->cleanup_after_percentage; $this->server->settings->save(); $this->server->save(); - $this->emit('success', 'Server updated successfully.'); + $this->dispatch('success', 'Server updated successfully.'); } } diff --git a/app/Http/Livewire/Server/LogDrains.php b/app/Livewire/Server/LogDrains.php similarity index 94% rename from app/Http/Livewire/Server/LogDrains.php rename to app/Livewire/Server/LogDrains.php index 5afe540ca..c93f49222 100644 --- a/app/Http/Livewire/Server/LogDrains.php +++ b/app/Livewire/Server/LogDrains.php @@ -1,6 +1,6 @@ server); if (!$this->server->isLogDrainEnabled()) { - $this->emit('serverRefresh'); - $this->emit('success', 'Log drain service stopped.'); + $this->dispatch('serverRefresh'); + $this->dispatch('success', 'Log drain service stopped.'); return; } - $this->emit('serverRefresh'); - $this->emit('success', 'Log drain service started successfully.'); + $this->dispatch('serverRefresh'); + $this->dispatch('success', 'Log drain service started successfully.'); } catch (\Throwable $e) { return handleError($e, $this); } @@ -126,7 +126,7 @@ class LogDrains extends Component ]); } $this->server->settings->save(); - $this->emit('success', 'Settings saved successfully.'); + $this->dispatch('success', 'Settings saved successfully.'); return true; } catch (\Throwable $e) { if ($type === 'newrelic') { diff --git a/app/Http/Livewire/Server/New/ByIp.php b/app/Livewire/Server/New/ByIp.php similarity index 92% rename from app/Http/Livewire/Server/New/ByIp.php rename to app/Livewire/Server/New/ByIp.php index 858f4ffa1..657d65c88 100644 --- a/app/Http/Livewire/Server/New/ByIp.php +++ b/app/Livewire/Server/New/ByIp.php @@ -1,6 +1,6 @@ emit('success', 'Application settings updated!'); + $this->dispatch('success', 'Application settings updated!'); } public function submit() @@ -61,7 +61,7 @@ class ByIp extends Component $this->validate(); try { if (is_null($this->private_key_id)) { - return $this->emit('error', 'You must select a private key'); + return $this->dispatch('error', 'You must select a private key'); } $server = Server::create([ 'name' => $this->name, diff --git a/app/Http/Livewire/Server/PrivateKey/Show.php b/app/Livewire/Server/PrivateKey/Show.php similarity index 94% rename from app/Http/Livewire/Server/PrivateKey/Show.php rename to app/Livewire/Server/PrivateKey/Show.php index 22c52218a..9fa0acb75 100644 --- a/app/Http/Livewire/Server/PrivateKey/Show.php +++ b/app/Livewire/Server/PrivateKey/Show.php @@ -1,6 +1,6 @@ server->proxy = null; $this->server->save(); - $this->emit('proxyStatusUpdated'); + $this->dispatch('proxyStatusUpdated'); } public function select_proxy($proxy_type) @@ -42,7 +42,7 @@ class Proxy extends Component $this->server->proxy->set('type', $proxy_type); $this->server->save(); $this->selectedProxy = $this->server->proxy->type; - $this->emit('proxyStatusUpdated'); + $this->dispatch('proxyStatusUpdated'); } public function submit() @@ -53,7 +53,7 @@ class Proxy extends Component $this->server->save(); setup_default_redirect_404(redirect_url: $this->server->proxy->redirect_url, server: $this->server); - $this->emit('success', 'Proxy configuration saved.'); + $this->dispatch('success', 'Proxy configuration saved.'); } catch (\Throwable $e) { return handleError($e, $this); } @@ -73,9 +73,9 @@ class Proxy extends Component try { $this->proxy_settings = CheckConfiguration::run($this->server); if (Str::of($this->proxy_settings)->contains('--api.dashboard=true') && Str::of($this->proxy_settings)->contains('--api.insecure=true')) { - $this->emit('traefikDashboardAvailable', true); + $this->dispatch('traefikDashboardAvailable', true); } else { - $this->emit('traefikDashboardAvailable', false); + $this->dispatch('traefikDashboardAvailable', false); } } catch (\Throwable $e) { diff --git a/app/Http/Livewire/Server/Proxy/Deploy.php b/app/Livewire/Server/Proxy/Deploy.php similarity index 86% rename from app/Http/Livewire/Server/Proxy/Deploy.php rename to app/Livewire/Server/Proxy/Deploy.php index 9612eccc7..4c748b7fa 100644 --- a/app/Http/Livewire/Server/Proxy/Deploy.php +++ b/app/Livewire/Server/Proxy/Deploy.php @@ -1,6 +1,6 @@ server, true); - $this->emit('startProxyPolling'); - $this->emit('proxyChecked'); + $this->dispatch('startProxyPolling'); + $this->dispatch('proxyChecked'); } catch (\Throwable $e) { return handleError($e, $this); } @@ -50,7 +50,7 @@ class Deploy extends Component { try { $activity = StartProxy::run($this->server); - $this->emit('newMonitorActivity', $activity->id); + $this->dispatch('newMonitorActivity', $activity->id); } catch (\Throwable $e) { return handleError($e, $this); } @@ -65,14 +65,14 @@ class Deploy extends Component ], $this->server); $this->server->proxy->status = 'exited'; $this->server->save(); - $this->emit('proxyStatusUpdated'); + $this->dispatch('proxyStatusUpdated'); } else { instant_remote_process([ "docker rm -f coolify-proxy", ], $this->server); $this->server->proxy->status = 'exited'; $this->server->save(); - $this->emit('proxyStatusUpdated'); + $this->dispatch('proxyStatusUpdated'); } } catch (\Throwable $e) { return handleError($e, $this); diff --git a/app/Http/Livewire/Server/Proxy/Logs.php b/app/Livewire/Server/Proxy/Logs.php similarity index 94% rename from app/Http/Livewire/Server/Proxy/Logs.php rename to app/Livewire/Server/Proxy/Logs.php index cb8c245a6..559de376a 100644 --- a/app/Http/Livewire/Server/Proxy/Logs.php +++ b/app/Livewire/Server/Proxy/Logs.php @@ -1,6 +1,6 @@ emit('proxyStatusUpdated'); + $this->dispatch('proxyStatusUpdated'); } } diff --git a/app/Http/Livewire/Server/Proxy/Show.php b/app/Livewire/Server/Proxy/Show.php similarity index 95% rename from app/Http/Livewire/Server/Proxy/Show.php rename to app/Livewire/Server/Proxy/Show.php index 26ea54e49..dcfcc1015 100644 --- a/app/Http/Livewire/Server/Proxy/Show.php +++ b/app/Livewire/Server/Proxy/Show.php @@ -1,6 +1,6 @@ numberOfPolls >= 10) { $this->polling = false; $this->numberOfPolls = 0; - $notification && $this->emit('error', 'Proxy is not running.'); + $notification && $this->dispatch('error', 'Proxy is not running.'); return; } $this->numberOfPolls++; } CheckProxy::run($this->server, true); - $this->emit('proxyStatusUpdated'); + $this->dispatch('proxyStatusUpdated'); if ($this->server->proxy->status === 'running') { $this->polling = false; - $notification && $this->emit('success', 'Proxy is running.'); + $notification && $this->dispatch('success', 'Proxy is running.'); } else { - $notification && $this->emit('error', 'Proxy is not running.'); + $notification && $this->dispatch('error', 'Proxy is not running.'); } } catch (\Throwable $e) { return handleError($e, $this); @@ -53,7 +53,7 @@ class Status extends Component { try { dispatch_sync(new ContainerStatusJob($this->server)); - $this->emit('proxyStatusUpdated'); + $this->dispatch('proxyStatusUpdated'); } catch (\Throwable $e) { return handleError($e, $this); } diff --git a/app/Http/Livewire/Server/Show.php b/app/Livewire/Server/Show.php similarity index 91% rename from app/Http/Livewire/Server/Show.php rename to app/Livewire/Server/Show.php index a72abdf94..f7e475e11 100644 --- a/app/Http/Livewire/Server/Show.php +++ b/app/Livewire/Server/Show.php @@ -1,6 +1,6 @@ emit('serverRefresh',false); + $this->dispatch('serverRefresh',false); } public function render() { diff --git a/app/Http/Livewire/Server/ShowPrivateKey.php b/app/Livewire/Server/ShowPrivateKey.php similarity index 85% rename from app/Http/Livewire/Server/ShowPrivateKey.php rename to app/Livewire/Server/ShowPrivateKey.php index 98035fa7c..8478094ad 100644 --- a/app/Http/Livewire/Server/ShowPrivateKey.php +++ b/app/Livewire/Server/ShowPrivateKey.php @@ -1,6 +1,6 @@ server->validateConnection(); if ($uptime) { - $this->emit('success', 'Server is reachable.'); + $this->dispatch('success', 'Server is reachable.'); } else { - $this->emit('error', 'Server is not reachable. Please check your connection and private key configuration.'); + $this->dispatch('error', 'Server is not reachable. Please check your connection and private key configuration.'); return; } } catch (\Throwable $e) { diff --git a/app/Http/Livewire/Settings/Backup.php b/app/Livewire/Settings/Backup.php similarity index 93% rename from app/Http/Livewire/Settings/Backup.php rename to app/Livewire/Settings/Backup.php index 7a5e2f0ed..519fe1bd8 100644 --- a/app/Http/Livewire/Settings/Backup.php +++ b/app/Livewire/Settings/Backup.php @@ -1,6 +1,6 @@ backup )); - $this->emit('success', 'Backup queued. It will be available in a few minutes.'); + $this->dispatch('success', 'Backup queued. It will be available in a few minutes.'); } public function submit() { - $this->emit('success', 'Backup updated successfully.'); + $this->dispatch('success', 'Backup updated successfully.'); } } diff --git a/app/Http/Livewire/Settings/Configuration.php b/app/Livewire/Settings/Configuration.php similarity index 96% rename from app/Http/Livewire/Settings/Configuration.php rename to app/Livewire/Settings/Configuration.php index 668c3d5c4..62ade961b 100644 --- a/app/Http/Livewire/Settings/Configuration.php +++ b/app/Livewire/Settings/Configuration.php @@ -1,6 +1,6 @@ settings->next_channel = $this->next_channel; } $this->settings->save(); - $this->emit('success', 'Settings updated!'); + $this->dispatch('success', 'Settings updated!'); } public function submit() @@ -66,7 +66,7 @@ class Configuration extends Component $this->settings->save(); $this->server = Server::findOrFail(0); $this->setup_instance_fqdn(); - $this->emit('success', 'Instance settings updated successfully!'); + $this->dispatch('success', 'Instance settings updated successfully!'); } private function setup_instance_fqdn() diff --git a/app/Http/Livewire/Settings/Email.php b/app/Livewire/Settings/Email.php similarity index 91% rename from app/Http/Livewire/Settings/Email.php rename to app/Livewire/Settings/Email.php index 85a4dc04d..d005462a8 100644 --- a/app/Http/Livewire/Settings/Email.php +++ b/app/Livewire/Settings/Email.php @@ -1,6 +1,6 @@ 'required', ]); $this->settings->save(); - $this->emit('success', 'Settings saved successfully.'); + $this->dispatch('success', 'Settings saved successfully.'); } catch (\Throwable $e) { return handleError($e, $this); } @@ -61,7 +61,7 @@ class Email extends Component 'settings.resend_api_key' => 'required' ]); $this->settings->save(); - $this->emit('success', 'Settings saved successfully.'); + $this->dispatch('success', 'Settings saved successfully.'); } catch (\Throwable $e) { $this->settings->resend_enabled = false; return handleError($e, $this); @@ -98,7 +98,7 @@ class Email extends Component 'settings.smtp_timeout' => 'nullable', ]); $this->settings->save(); - $this->emit('success', 'Settings saved successfully.'); + $this->dispatch('success', 'Settings saved successfully.'); } catch (\Throwable $e) { return handleError($e, $this); } @@ -107,6 +107,6 @@ class Email extends Component public function sendTestNotification() { $this->settings->notify(new Test($this->emails)); - $this->emit('success', 'Test email sent.'); + $this->dispatch('success', 'Test email sent.'); } } diff --git a/app/Http/Livewire/Source/Github/Change.php b/app/Livewire/Source/Github/Change.php similarity index 97% rename from app/Http/Livewire/Source/Github/Change.php rename to app/Livewire/Source/Github/Change.php index c9ef89c02..489d54b8a 100644 --- a/app/Http/Livewire/Source/Github/Change.php +++ b/app/Livewire/Source/Github/Change.php @@ -1,6 +1,6 @@ github_app->makeVisible('client_secret')->makeVisible('webhook_secret'); $this->validate(); $this->github_app->save(); - $this->emit('success', 'Github App updated successfully.'); + $this->dispatch('success', 'Github App updated successfully.'); } catch (\Throwable $e) { return handleError($e, $this); } diff --git a/app/Http/Livewire/Source/Github/Create.php b/app/Livewire/Source/Github/Create.php similarity index 97% rename from app/Http/Livewire/Source/Github/Create.php rename to app/Livewire/Source/Github/Create.php index 75951d946..5af6616cf 100644 --- a/app/Http/Livewire/Source/Github/Create.php +++ b/app/Livewire/Source/Github/Create.php @@ -1,6 +1,6 @@ emit('success', 'Realtime events configured!'); + $this->dispatch('success', 'Realtime events configured!'); } public function disable() { diff --git a/app/Http/Livewire/Subscription/Actions.php b/app/Livewire/Subscription/Actions.php similarity index 88% rename from app/Http/Livewire/Subscription/Actions.php rename to app/Livewire/Subscription/Actions.php index 2f97e899d..bd4dbd69a 100644 --- a/app/Http/Livewire/Subscription/Actions.php +++ b/app/Livewire/Subscription/Actions.php @@ -1,6 +1,6 @@ emit('success', 'Subscription cancelled successfully. Reloading in 5s.'); - $this->emit('reloadWindow', 5000); + $this->dispatch('success', 'Subscription cancelled successfully. Reloading in 5s.'); + $this->dispatch('reloadWindow', 5000); } } catch (\Throwable $e) { return handleError($e, $this); @@ -62,8 +62,8 @@ class Actions extends Component } throw new \Exception(data_get($json, 'errors.0.title', 'Something went wrong. Please try again later.')); } else { - $this->emit('success', 'Subscription resumed successfully. Reloading in 5s.'); - $this->emit('reloadWindow', 5000); + $this->dispatch('success', 'Subscription resumed successfully. Reloading in 5s.'); + $this->dispatch('reloadWindow', 5000); } } catch (\Throwable $e) { return handleError($e, $this); diff --git a/app/Http/Livewire/Subscription/PricingPlans.php b/app/Livewire/Subscription/PricingPlans.php similarity index 96% rename from app/Http/Livewire/Subscription/PricingPlans.php rename to app/Livewire/Subscription/PricingPlans.php index 07ee7c792..a3afcaabc 100644 --- a/app/Http/Livewire/Subscription/PricingPlans.php +++ b/app/Livewire/Subscription/PricingPlans.php @@ -1,6 +1,6 @@ emit('error', 'Price ID not found! Please contact the administrator.'); + $this->dispatch('error', 'Price ID not found! Please contact the administrator.'); return; } $payload = [ diff --git a/app/Http/Livewire/Subscription/Show.php b/app/Livewire/Subscription/Show.php similarity index 94% rename from app/Http/Livewire/Subscription/Show.php rename to app/Livewire/Subscription/Show.php index ff028f68f..cde2f0455 100644 --- a/app/Http/Livewire/Subscription/Show.php +++ b/app/Livewire/Subscription/Show.php @@ -1,6 +1,6 @@ delete(); $this->refreshInvitations(); - $this->emit('success', 'Invitation revoked.'); + $this->dispatch('success', 'Invitation revoked.'); } public function refreshInvitations() diff --git a/app/Http/Livewire/Team/InviteLink.php b/app/Livewire/Team/InviteLink.php similarity index 91% rename from app/Http/Livewire/Team/InviteLink.php rename to app/Livewire/Team/InviteLink.php index 8fea3a6b8..5f9db3f84 100644 --- a/app/Http/Livewire/Team/InviteLink.php +++ b/app/Livewire/Team/InviteLink.php @@ -1,6 +1,6 @@ subject('You have been invited to ' . currentTeam()->name . ' on ' . config('app.name') . '.'); send_user_an_email($mail, $this->email); - $this->emit('success', 'Invitation sent via email successfully.'); - $this->emit('refreshInvitations'); + $this->dispatch('success', 'Invitation sent via email successfully.'); + $this->dispatch('refreshInvitations'); return; } else { - $this->emit('success', 'Invitation link generated.'); - $this->emit('refreshInvitations'); + $this->dispatch('success', 'Invitation link generated.'); + $this->dispatch('refreshInvitations'); } } catch (\Throwable $e) { $error_message = $e->getMessage(); diff --git a/app/Http/Livewire/Team/Member.php b/app/Livewire/Team/Member.php similarity index 82% rename from app/Http/Livewire/Team/Member.php rename to app/Livewire/Team/Member.php index 34b8e6bde..7d02dbf66 100644 --- a/app/Http/Livewire/Team/Member.php +++ b/app/Livewire/Team/Member.php @@ -1,6 +1,6 @@ member->teams()->updateExistingPivot(currentTeam()->id, ['role' => 'admin']); - $this->emit('reloadWindow'); + $this->dispatch('reloadWindow'); } public function makeReadonly() { $this->member->teams()->updateExistingPivot(currentTeam()->id, ['role' => 'member']); - $this->emit('reloadWindow'); + $this->dispatch('reloadWindow'); } public function remove() @@ -29,6 +29,6 @@ class Member extends Component Cache::remember('team:' . $this->member->id, 3600, function() { return $this->member->teams()->first(); }); - $this->emit('reloadWindow'); + $this->dispatch('reloadWindow'); } } diff --git a/app/Http/Livewire/Team/Storage/Create.php b/app/Livewire/Team/Storage/Create.php similarity index 98% rename from app/Http/Livewire/Team/Storage/Create.php rename to app/Livewire/Team/Storage/Create.php index 6d140d96c..cbbba398f 100644 --- a/app/Http/Livewire/Team/Storage/Create.php +++ b/app/Livewire/Team/Storage/Create.php @@ -1,6 +1,6 @@ storage->testConnection(shouldSave: true); - return $this->emit('success', 'Connection is working. Tested with "ListObjectsV2" action.'); + return $this->dispatch('success', 'Connection is working. Tested with "ListObjectsV2" action.'); } catch (\Throwable $e) { return handleError($e, $this); } diff --git a/app/Http/Livewire/Upgrade.php b/app/Livewire/Upgrade.php similarity index 91% rename from app/Http/Livewire/Upgrade.php rename to app/Livewire/Upgrade.php index fc930a997..0c6541d8f 100644 --- a/app/Http/Livewire/Upgrade.php +++ b/app/Livewire/Upgrade.php @@ -1,6 +1,6 @@ showProgress = true; UpdateCoolify::run(true); - $this->emit('success', "Upgrading to {$this->latestVersion} version..."); + $this->dispatch('success', "Upgrading to {$this->latestVersion} version..."); } catch (\Throwable $e) { return handleError($e, $this); } diff --git a/app/Http/Livewire/VerifyEmail.php b/app/Livewire/VerifyEmail.php similarity index 83% rename from app/Http/Livewire/VerifyEmail.php rename to app/Livewire/VerifyEmail.php index e485102cb..b1aec4353 100644 --- a/app/Http/Livewire/VerifyEmail.php +++ b/app/Livewire/VerifyEmail.php @@ -1,6 +1,6 @@ rateLimit(1, 300); auth()->user()->sendVerificationEmail(); - $this->emit('success', 'Email verification link sent!'); + $this->dispatch('success', 'Email verification link sent!'); } catch(\Exception $e) { ray($e); diff --git a/app/Http/Livewire/Waitlist/Index.php b/app/Livewire/Waitlist/Index.php similarity index 81% rename from app/Http/Livewire/Waitlist/Index.php rename to app/Livewire/Waitlist/Index.php index c1e6ad939..a3829dec7 100644 --- a/app/Http/Livewire/Waitlist/Index.php +++ b/app/Livewire/Waitlist/Index.php @@ -1,6 +1,6 @@ email)->first(); if ($found) { if (!$found->verified) { - $this->emit('error', 'You are already on the waitlist.
Please check your email to verify your email address.'); + $this->dispatch('error', 'You are already on the waitlist.
Please check your email to verify your email address.'); return; } - $this->emit('error', 'You are already on the waitlist.
You will be notified when your turn comes.
Thank you.'); + $this->dispatch('error', 'You are already on the waitlist.
You will be notified when your turn comes.
Thank you.'); return; } $waitlist = Waitlist::create([ @@ -54,7 +54,7 @@ class Index extends Component 'type' => 'registration', ]); - $this->emit('success', 'Check your email to verify your email address.'); + $this->dispatch('success', 'Check your email to verify your email address.'); dispatch(new SendConfirmationForWaitlistJob($this->email, $waitlist->uuid)); } catch (\Throwable $e) { return handleError($e, $this); diff --git a/bootstrap/helpers/shared.php b/bootstrap/helpers/shared.php index 3b4e2708d..03de7c09d 100644 --- a/bootstrap/helpers/shared.php +++ b/bootstrap/helpers/shared.php @@ -102,7 +102,7 @@ function handleError(?Throwable $error = null, ?Livewire\Component $livewire = n { if ($error instanceof TooManyRequestsException) { if (isset($livewire)) { - return $livewire->emit('error', "Too many requests. Please try again in {$error->secondsUntilAvailable} seconds."); + return $livewire->dispatch('error', "Too many requests. Please try again in {$error->secondsUntilAvailable} seconds."); } return "Too many requests. Please try again in {$error->secondsUntilAvailable} seconds."; } @@ -117,7 +117,7 @@ function handleError(?Throwable $error = null, ?Livewire\Component $livewire = n } if (isset($livewire)) { - return $livewire->emit('error', $message); + return $livewire->dispatch('error', $message); } throw new Exception($message); } diff --git a/composer.json b/composer.json index 349133ffa..5a7f39844 100644 --- a/composer.json +++ b/composer.json @@ -22,9 +22,9 @@ "lcobucci/jwt": "^5.0.0", "league/flysystem-aws-s3-v3": "^3.0", "league/flysystem-sftp-v3": "^3.0", - "livewire/livewire": "^v2.12.3", + "livewire/livewire": "^3.0", "lorisleiva/laravel-actions": "^2.7", - "masmerise/livewire-toaster": "^1.2", + "masmerise/livewire-toaster": "^2.0", "nubs/random-name-generator": "^2.2", "phpseclib/phpseclib": "~3.0", "poliander/cron": "^3.0", @@ -39,7 +39,7 @@ "stripe/stripe-php": "^12.0", "symfony/yaml": "^6.2", "visus/cuid2": "^2.0.0", - "wire-elements/modal": "^1.0", + "wire-elements/modal": "^2.0", "yosymfony/toml": "^1.0" }, "require-dev": { diff --git a/composer.lock b/composer.lock index bcf9b80ec..54b33b87a 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "c1fc9357fddf5e7b23bb5d500c54fe29", + "content-hash": "44337ff4ff1d9c435d9776fec01ebe9c", "packages": [ { "name": "aws/aws-crt-php", @@ -3132,33 +3132,34 @@ }, { "name": "livewire/livewire", - "version": "v2.12.6", + "version": "v3.2.6", "source": { "type": "git", "url": "https://github.com/livewire/livewire.git", - "reference": "7d3a57b3193299cf1a0639a3935c696f4da2cf92" + "reference": "ecded08cdc4b36bbb4b26bcc7f7a171ea2e4368c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/livewire/livewire/zipball/7d3a57b3193299cf1a0639a3935c696f4da2cf92", - "reference": "7d3a57b3193299cf1a0639a3935c696f4da2cf92", + "url": "https://api.github.com/repos/livewire/livewire/zipball/ecded08cdc4b36bbb4b26bcc7f7a171ea2e4368c", + "reference": "ecded08cdc4b36bbb4b26bcc7f7a171ea2e4368c", "shasum": "" }, "require": { - "illuminate/database": "^7.0|^8.0|^9.0|^10.0", - "illuminate/support": "^7.0|^8.0|^9.0|^10.0", - "illuminate/validation": "^7.0|^8.0|^9.0|^10.0", + "illuminate/database": "^10.0", + "illuminate/support": "^10.0", + "illuminate/validation": "^10.0", "league/mime-type-detection": "^1.9", - "php": "^7.2.5|^8.0", - "symfony/http-kernel": "^5.0|^6.0" + "php": "^8.1", + "symfony/http-kernel": "^6.2" }, "require-dev": { "calebporzio/sushi": "^2.1", - "laravel/framework": "^7.0|^8.0|^9.0|^10.0", + "laravel/framework": "^10.0", + "laravel/prompts": "^0.1.6", "mockery/mockery": "^1.3.1", - "orchestra/testbench": "^5.0|^6.0|^7.0|^8.0", - "orchestra/testbench-dusk": "^5.2|^6.0|^7.0|^8.0", - "phpunit/phpunit": "^8.4|^9.0", + "orchestra/testbench": "^8.0", + "orchestra/testbench-dusk": "^8.0", + "phpunit/phpunit": "^9.0", "psy/psysh": "@stable" }, "type": "library", @@ -3193,7 +3194,7 @@ "description": "A front-end framework for Laravel.", "support": { "issues": "https://github.com/livewire/livewire/issues", - "source": "https://github.com/livewire/livewire/tree/v2.12.6" + "source": "https://github.com/livewire/livewire/tree/v3.2.6" }, "funding": [ { @@ -3201,7 +3202,7 @@ "type": "github" } ], - "time": "2023-08-11T04:02:34+00:00" + "time": "2023-12-04T21:20:19+00:00" }, { "name": "lorisleiva/laravel-actions", @@ -3352,25 +3353,28 @@ }, { "name": "masmerise/livewire-toaster", - "version": "1.3.0", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/masmerise/livewire-toaster.git", - "reference": "da21267abd9684c590a131a40173fb3c42eab722" + "reference": "89aa127df5d17b915b0818761bdf83e8915036c2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/masmerise/livewire-toaster/zipball/da21267abd9684c590a131a40173fb3c42eab722", - "reference": "da21267abd9684c590a131a40173fb3c42eab722", + "url": "https://api.github.com/repos/masmerise/livewire-toaster/zipball/89aa127df5d17b915b0818761bdf83e8915036c2", + "reference": "89aa127df5d17b915b0818761bdf83e8915036c2", "shasum": "" }, "require": { "laravel/framework": "^10.0", - "livewire/livewire": "^2.0", + "livewire/livewire": "^3.0", "php": "~8.2" }, + "conflict": { + "stevebauman/unfinalize": "*" + }, "require-dev": { - "dive-be/php-crowbar": "^1.1", + "dive-be/php-crowbar": "^1.0", "laravel/pint": "^1.0", "nunomaduro/larastan": "^2.0", "orchestra/testbench": "^8.0", @@ -3414,9 +3418,9 @@ ], "support": { "issues": "https://github.com/masmerise/livewire-toaster/issues", - "source": "https://github.com/masmerise/livewire-toaster/tree/1.3.0" + "source": "https://github.com/masmerise/livewire-toaster/tree/2.0.3" }, - "time": "2023-08-05T18:22:07+00:00" + "time": "2023-09-28T12:07:49+00:00" }, { "name": "monolog/monolog", @@ -10224,25 +10228,25 @@ }, { "name": "wire-elements/modal", - "version": "1.0.8", + "version": "2.0.8", "source": { "type": "git", "url": "https://github.com/wire-elements/modal.git", - "reference": "1019f423485afb6df0d1531d978e93d4ad0975fb" + "reference": "d6dac3a6ef6527a734504d8a84de49ec0a72282b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wire-elements/modal/zipball/1019f423485afb6df0d1531d978e93d4ad0975fb", - "reference": "1019f423485afb6df0d1531d978e93d4ad0975fb", + "url": "https://api.github.com/repos/wire-elements/modal/zipball/d6dac3a6ef6527a734504d8a84de49ec0a72282b", + "reference": "d6dac3a6ef6527a734504d8a84de49ec0a72282b", "shasum": "" }, "require": { - "livewire/livewire": "^2.0", - "php": "^7.4|^8.0", + "livewire/livewire": "^3.0", + "php": "^8.1", "spatie/laravel-package-tools": "^1.9" }, "require-dev": { - "orchestra/testbench": "^6.15", + "orchestra/testbench": "^8.5", "phpunit/phpunit": "^9.5" }, "type": "library", @@ -10276,9 +10280,9 @@ ], "support": { "issues": "https://github.com/wire-elements/modal/issues", - "source": "https://github.com/wire-elements/modal/tree/1.0.8" + "source": "https://github.com/wire-elements/modal/tree/2.0.8" }, - "time": "2023-04-07T12:35:15+00:00" + "time": "2023-11-12T14:57:13+00:00" }, { "name": "yosymfony/parser-utils", diff --git a/config/livewire.php b/config/livewire.php index 59f8d5c4d..8addb0069 100644 --- a/config/livewire.php +++ b/config/livewire.php @@ -3,156 +3,144 @@ return [ /* - |-------------------------------------------------------------------------- + |--------------------------------------------------------------------------- | Class Namespace - |-------------------------------------------------------------------------- + |--------------------------------------------------------------------------- | - | This value sets the root namespace for Livewire component classes in - | your application. This value affects component auto-discovery and - | any Livewire file helper commands, like `artisan make:livewire`. - | - | After changing this item, run: `php artisan livewire:discover`. + | This value sets the root class namespace for Livewire component classes in + | your application. This value will change where component auto-discovery + | finds components. It's also referenced by the file creation commands. | */ - 'class_namespace' => 'App\\Http\\Livewire', + 'class_namespace' => 'App\\Livewire', /* - |-------------------------------------------------------------------------- + |--------------------------------------------------------------------------- | View Path - |-------------------------------------------------------------------------- + |--------------------------------------------------------------------------- | - | This value sets the path for Livewire component views. This affects - | file manipulation helper commands like `artisan make:livewire`. + | This value is used to specify where Livewire component Blade templates are + | stored when running file creation commands like `artisan make:livewire`. + | It is also used if you choose to omit a component's render() method. | */ 'view_path' => resource_path('views/livewire'), /* - |-------------------------------------------------------------------------- + |--------------------------------------------------------------------------- | Layout - |-------------------------------------------------------------------------- - | The default layout view that will be used when rendering a component via - | Route::get('/some-endpoint', SomeComponent::class);. In this case the - | the view returned by SomeComponent will be wrapped in "layouts.app" + |--------------------------------------------------------------------------- + | The view that will be used as the layout when rendering a single component + | as an entire page via `Route::get('/post/create', CreatePost::class);`. + | In this case, the view returned by CreatePost will render into $slot. | */ - 'layout' => 'layouts.app', + 'layout' => 'components.layout', /* - |-------------------------------------------------------------------------- - | Livewire Assets URL - |-------------------------------------------------------------------------- - | - | This value sets the path to Livewire JavaScript assets, for cases where - | your app's domain root is not the correct path. By default, Livewire - | will load its JavaScript assets from the app's "relative root". - | - | Examples: "/assets", "myurl.com/app". - | - */ - - 'asset_url' => null, - - /* - |-------------------------------------------------------------------------- - | Livewire App URL - |-------------------------------------------------------------------------- - | - | This value should be used if livewire assets are served from CDN. - | Livewire will communicate with an app through this url. - | - | Examples: "https://my-app.com", "myurl.com/app". - | - */ - - 'app_url' => null, - - /* - |-------------------------------------------------------------------------- - | Livewire Endpoint Middleware Group - |-------------------------------------------------------------------------- - | - | This value sets the middleware group that will be applied to the main - | Livewire "message" endpoint (the endpoint that gets hit everytime - | a Livewire component updates). It is set to "web" by default. - | - */ - - 'middleware_group' => 'web', - - /* - |-------------------------------------------------------------------------- - | Livewire Temporary File Uploads Endpoint Configuration - |-------------------------------------------------------------------------- + |--------------------------------------------------------------------------- + | Temporary File Uploads + |--------------------------------------------------------------------------- | | Livewire handles file uploads by storing uploads in a temporary directory - | before the file is validated and stored permanently. All file uploads - | are directed to a global endpoint for temporary storage. The config - | items below are used for customizing the way the endpoint works. + | before the file is stored permanently. All file uploads are directed to + | a global endpoint for temporary storage. You may configure this below: | */ 'temporary_file_upload' => [ - 'disk' => null, // Example: 'local', 's3' Default: 'default' - 'rules' => null, // Example: ['file', 'mimes:png,jpg'] Default: ['required', 'file', 'max:12288'] (12MB) - 'directory' => null, // Example: 'tmp' Default 'livewire-tmp' - 'middleware' => null, // Example: 'throttle:5,1' Default: 'throttle:60,1' - 'preview_mimes' => [ // Supported file types for temporary pre-signed file URLs. + 'disk' => null, // Example: 'local', 's3' | Default: 'default' + 'rules' => null, // Example: ['file', 'mimes:png,jpg'] | Default: ['required', 'file', 'max:12288'] (12MB) + 'directory' => null, // Example: 'tmp' | Default: 'livewire-tmp' + 'middleware' => null, // Example: 'throttle:5,1' | Default: 'throttle:60,1' + 'preview_mimes' => [ // Supported file types for temporary pre-signed file URLs... 'png', 'gif', 'bmp', 'svg', 'wav', 'mp4', 'mov', 'avi', 'wmv', 'mp3', 'm4a', 'jpg', 'jpeg', 'mpga', 'webp', 'wma', ], - 'max_upload_time' => 5, // Max duration (in minutes) before an upload gets invalidated. + 'max_upload_time' => 5, // Max duration (in minutes) before an upload is invalidated... ], /* - |-------------------------------------------------------------------------- - | Manifest File Path - |-------------------------------------------------------------------------- - | - | This value sets the path to the Livewire manifest file. - | The default should work for most cases (which is - | "/bootstrap/cache/livewire-components.php"), but for specific - | cases like when hosting on Laravel Vapor, it could be set to a different value. - | - | Example: for Laravel Vapor, it would be "/tmp/storage/bootstrap/cache/livewire-components.php". - | - */ - - 'manifest_path' => null, - - /* - |-------------------------------------------------------------------------- - | Back Button Cache - |-------------------------------------------------------------------------- - | - | This value determines whether the back button cache will be used on pages - | that contain Livewire. By disabling back button cache, it ensures that - | the back button shows the correct state of components, instead of - | potentially stale, cached data. - | - | Setting it to "false" (default) will disable back button cache. - | - */ - - 'back_button_cache' => false, - - /* - |-------------------------------------------------------------------------- + |--------------------------------------------------------------------------- | Render On Redirect - |-------------------------------------------------------------------------- + |--------------------------------------------------------------------------- | - | This value determines whether Livewire will render before it's redirected - | or not. Setting it to "false" (default) will mean the render method is - | skipped when redirecting. And "true" will mean the render method is - | run before redirecting. Browsers bfcache can store a potentially - | stale view if render is skipped on redirect. + | This value determines if Livewire will run a component's `render()` method + | after a redirect has been triggered using something like `redirect(...)` + | Setting this to true will render the view once more before redirecting | */ 'render_on_redirect' => false, + /* + |--------------------------------------------------------------------------- + | Eloquent Model Binding + |--------------------------------------------------------------------------- + | + | Previous versions of Livewire supported binding directly to eloquent model + | properties using wire:model by default. However, this behavior has been + | deemed too "magical" and has therefore been put under a feature flag. + | + */ + + 'legacy_model_binding' => true, + + /* + |--------------------------------------------------------------------------- + | Auto-inject Frontend Assets + |--------------------------------------------------------------------------- + | + | By default, Livewire automatically injects its JavaScript and CSS into the + | and of pages containing Livewire components. By disabling + | this behavior, you need to use @livewireStyles and @livewireScripts. + | + */ + + 'inject_assets' => true, + + /* + |--------------------------------------------------------------------------- + | Navigate (SPA mode) + |--------------------------------------------------------------------------- + | + | By adding `` to links in your Livewire application, Livewire + | will prevent the default link handling and instead request those pages + | via AJAX, creating an SPA-like effect. Configure this behavior here. + | + */ + + 'navigate' => [ + 'show_progress_bar' => true, + ], + + /* + |--------------------------------------------------------------------------- + | HTML Morph Markers + |--------------------------------------------------------------------------- + | + | Livewire intelligently "morphs" existing HTML into the newly rendered HTML + | after each update. To make this process more reliable, Livewire injects + | "markers" into the rendered Blade surrounding @if, @class & @foreach. + | + */ + + 'inject_morph_markers' => true, + + /* + |--------------------------------------------------------------------------- + | Pagination Theme + |--------------------------------------------------------------------------- + | + | When enabling Livewire's pagination feature by using the `WithPagination` + | trait, Livewire will use Tailwind templates to render pagination views + | on the page. If you want Bootstrap CSS, you can specify: "bootstrap" + | + */ + + 'pagination_theme' => 'tailwind', ]; diff --git a/config/sentry.php b/config/sentry.php index f0f05d242..f86b5d19d 100644 --- a/config/sentry.php +++ b/config/sentry.php @@ -7,7 +7,7 @@ return [ // The release version of your application // Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD')) - 'release' => '4.0.0-beta.154', + 'release' => '4.0.0-beta.155', // When left empty or `null` the Laravel environment will be used 'environment' => config('app.env'), diff --git a/config/version.php b/config/version.php index b101b03d8..aac53d846 100644 --- a/config/version.php +++ b/config/version.php @@ -1,3 +1,3 @@
@csrf - @env('local') + @env('local') diff --git a/resources/views/auth/verify-email.blade.php b/resources/views/auth/verify-email.blade.php index dca6a4c6a..7db8da43b 100644 --- a/resources/views/auth/verify-email.blade.php +++ b/resources/views/auth/verify-email.blade.php @@ -3,7 +3,7 @@

Verification Email Sent

-
To activate your account, please open the email and follow the +
To activate your account, please open the email and follow the instructions.
diff --git a/resources/views/components/applications/links.blade.php b/resources/views/components/applications/links.blade.php index c5bdc4a48..d1bb5c774 100644 --- a/resources/views/components/applications/links.blade.php +++ b/resources/views/components/applications/links.blade.php @@ -1,6 +1,6 @@
@if (data_get($application, 'fqdn') || - collect(json_decode($this->application->docker_compose_domains))->count() > 0 || + collect(json_decode($this->application->docker_compose_domains))->count() > 0 || data_get($application, 'previews', collect([]))->count() > 0 || data_get($application, 'ports_mappings_array'))
@else merge(['class' => $defaultClass]) }} @required($required) @readonly($readonly) - wire:model.defer={{ $id }} wire:dirty.class.remove='text-white' wire:dirty.class="input-warning" + wire:model={{ $id }} wire:dirty.class.remove='text-white' wire:dirty.class="input-warning" wire:loading.attr="disabled" type="{{ $type }}" @disabled($disabled) id="{{ $id }}" name="{{ $name }}" placeholder="{{ $attributes->get('placeholder') }}"> @endif diff --git a/resources/views/components/forms/select.blade.php b/resources/views/components/forms/select.blade.php index 10dc57928..5f621179e 100644 --- a/resources/views/components/forms/select.blade.php +++ b/resources/views/components/forms/select.blade.php @@ -11,7 +11,7 @@ @endif @error($id) diff --git a/resources/views/components/forms/textarea.blade.php b/resources/views/components/forms/textarea.blade.php index 7ac7d7fd9..4ef36c310 100644 --- a/resources/views/components/forms/textarea.blade.php +++ b/resources/views/components/forms/textarea.blade.php @@ -12,7 +12,7 @@ diff --git a/resources/views/components/highlighted.blade.php b/resources/views/components/highlighted.blade.php index 2ca73724c..a088d8617 100644 --- a/resources/views/components/highlighted.blade.php +++ b/resources/views/components/highlighted.blade.php @@ -1 +1 @@ -{{$text}} +{{ $text }} diff --git a/resources/views/components/limit-reached.blade.php b/resources/views/components/limit-reached.blade.php index 6b0f6f2ad..f5477cff2 100644 --- a/resources/views/components/limit-reached.blade.php +++ b/resources/views/components/limit-reached.blade.php @@ -1,6 +1,6 @@
You have reached the limit of {{ $name }} you can create. Please upgrade your - subscription to create more - {{ $name }}. + subscription to create more + {{ $name }}.
diff --git a/resources/views/components/modal.blade.php b/resources/views/components/modal.blade.php index d457b2651..b0cb4d3d0 100644 --- a/resources/views/components/modal.blade.php +++ b/resources/views/components/modal.blade.php @@ -1,6 +1,6 @@ @if ($yesOrNo) - +
@else

{{ $modalTitle }}

@endisset diff --git a/resources/views/components/navbar.blade.php b/resources/views/components/navbar.blade.php index 62d7b1b52..db1a5d8b1 100644 --- a/resources/views/components/navbar.blade.php +++ b/resources/views/components/navbar.blade.php @@ -4,7 +4,7 @@ class="transition rounded w-11 h-11" src="{{ asset('coolify-transparent.png') }}">
diff --git a/resources/views/emails/application-deployment-failed.blade.php b/resources/views/emails/application-deployment-failed.blade.php index defe52e4f..c1ae3ebb6 100644 --- a/resources/views/emails/application-deployment-failed.blade.php +++ b/resources/views/emails/application-deployment-failed.blade.php @@ -6,6 +6,6 @@ [{{ $fqdn }}]({{ $fqdn }}). @endif -[View Deployment Logs]({{ $deployment_url }}) + [View Deployment Logs]({{ $deployment_url }}) diff --git a/resources/views/emails/application-deployment-success.blade.php b/resources/views/emails/application-deployment-success.blade.php index d8426e33c..227089a4b 100644 --- a/resources/views/emails/application-deployment-success.blade.php +++ b/resources/views/emails/application-deployment-success.blade.php @@ -2,9 +2,10 @@ @if ($pull_request_id === 0) A new version of {{ $name }} is available at [{{ $fqdn }}]({{ $fqdn }}) . @else - Pull request #{{ $pull_request_id }} of {{ $name }} deployed successfully [{{ $fqdn }}]({{ $fqdn }}). + Pull request #{{ $pull_request_id }} of {{ $name }} deployed successfully + [{{ $fqdn }}]({{ $fqdn }}). @endif -[View Deployment Logs]({{ $deployment_url }}) + [View Deployment Logs]({{ $deployment_url }}) diff --git a/resources/views/emails/application-status-changes.blade.php b/resources/views/emails/application-status-changes.blade.php index 918a4aa55..0aba5cd26 100644 --- a/resources/views/emails/application-status-changes.blade.php +++ b/resources/views/emails/application-status-changes.blade.php @@ -1,9 +1,9 @@ -{{ $name }} has been stopped. + {{ $name }} has been stopped. -If it was your intention to stop this application, you can ignore this email. + If it was your intention to stop this application, you can ignore this email. -If not, [check what is going on]({{ $application_url }}). + If not, [check what is going on]({{ $application_url }}). diff --git a/resources/views/emails/backup-failed.blade.php b/resources/views/emails/backup-failed.blade.php index 712777ef5..1ddc9b397 100644 --- a/resources/views/emails/backup-failed.blade.php +++ b/resources/views/emails/backup-failed.blade.php @@ -1,8 +1,8 @@ -Database backup for {{ $name }} with frequency of {{ $frequency }} was FAILED. + Database backup for {{ $name }} with frequency of {{ $frequency }} was FAILED. -### Reason + ### Reason -{{ $output }} + {{ $output }} diff --git a/resources/views/emails/backup-success.blade.php b/resources/views/emails/backup-success.blade.php index 0d54a254c..0628f7ec9 100644 --- a/resources/views/emails/backup-success.blade.php +++ b/resources/views/emails/backup-success.blade.php @@ -1,3 +1,3 @@ -Database backup for {{ $name }} with frequency of {{ $frequency }} was successful. + Database backup for {{ $name }} with frequency of {{ $frequency }} was successful. diff --git a/resources/views/emails/before-trial-conversion.blade.php b/resources/views/emails/before-trial-conversion.blade.php index c9531ff2b..08a220c34 100644 --- a/resources/views/emails/before-trial-conversion.blade.php +++ b/resources/views/emails/before-trial-conversion.blade.php @@ -1,8 +1,9 @@ -We would like to inform you that a {{config('constants.limits.trial_period')}} days of trial has been added to all subscription plans. + We would like to inform you that a {{ config('constants.limits.trial_period') }} days of trial has been added to all + subscription plans. -You can try out Coolify, without payment information for free. If you like it, you can upgrade to a paid plan at any time. + You can try out Coolify, without payment information for free. If you like it, you can upgrade to a paid plan at any + time. -[Click here](https://app.coolify.io/subscription) to start your trial. + [Click here](https://app.coolify.io/subscription) to start your trial. - diff --git a/resources/views/emails/container-restarted.blade.php b/resources/views/emails/container-restarted.blade.php index 085aafa53..f93b5dcba 100644 --- a/resources/views/emails/container-restarted.blade.php +++ b/resources/views/emails/container-restarted.blade.php @@ -1,11 +1,13 @@ -A service ({{ $containerName }}) has been restarted automatically on {{$serverName}}, because it was stopped unexpectedly. + A service ({{ $containerName }}) has been restarted automatically on {{ $serverName }}, because it was stopped + unexpectedly. -@if ($containerName === 'coolify-proxy') -Coolify Proxy should run on your server as you have FQDNs set up in one of your resources. + @if ($containerName === 'coolify-proxy') + Coolify Proxy should run on your server as you have FQDNs set up in one of your resources. -If you don't want to use Coolify Proxy, please remove FQDN from your resources or set Proxy type to Custom(None). -@endif + If you don't want to use Coolify Proxy, please remove FQDN from your resources or set Proxy type to + Custom(None). + @endif diff --git a/resources/views/emails/container-stopped.blade.php b/resources/views/emails/container-stopped.blade.php index bf7cc086a..b16c0b90b 100644 --- a/resources/views/emails/container-stopped.blade.php +++ b/resources/views/emails/container-stopped.blade.php @@ -1,9 +1,9 @@ -A service ({{ $containerName }}) has been stopped unexpectedly on {{$serverName}}. + A service ({{ $containerName }}) has been stopped unexpectedly on {{ $serverName }}. -@if ($url) -Please check what is going on [here]({{ $url }}). -@endif + @if ($url) + Please check what is going on [here]({{ $url }}). + @endif diff --git a/resources/views/emails/high-disk-usage.blade.php b/resources/views/emails/high-disk-usage.blade.php index 0a4baa300..8e9579436 100644 --- a/resources/views/emails/high-disk-usage.blade.php +++ b/resources/views/emails/high-disk-usage.blade.php @@ -1,9 +1,10 @@ -Your server ({{ $name }}) has high disk usage ({{ $disk_usage }}% used). Threshold is {{ $threshold }}%. + Your server ({{ $name }}) has high disk usage ({{ $disk_usage }}% used). Threshold is + {{ $threshold }}%. -Please cleanup your disk to prevent data-loss. Here are some [tips](https://coolify.io/docs/automated-cleanup). + Please cleanup your disk to prevent data-loss. Here are some [tips](https://coolify.io/docs/automated-cleanup). -(You can change the threshold in the Server Settings menu.) + (You can change the threshold in the Server Settings menu.) diff --git a/resources/views/emails/invitation-link.blade.php b/resources/views/emails/invitation-link.blade.php index ae72745ba..afced0abc 100644 --- a/resources/views/emails/invitation-link.blade.php +++ b/resources/views/emails/invitation-link.blade.php @@ -1,10 +1,10 @@ -You have been invited to "{{ $team }}" on "{{ config('app.name') }}". + You have been invited to "{{ $team }}" on "{{ config('app.name') }}". -Please [click here]({{ $invitation_link }}) to accept the invitation. + Please [click here]({{ $invitation_link }}) to accept the invitation. -If you have any questions, please contact the team owner.

+ If you have any questions, please contact the team owner.

-If it was not you who requested this invitation, please ignore this email. + If it was not you who requested this invitation, please ignore this email.
diff --git a/resources/views/emails/reset-password.blade.php b/resources/views/emails/reset-password.blade.php index 02488175d..49b0ee74b 100644 --- a/resources/views/emails/reset-password.blade.php +++ b/resources/views/emails/reset-password.blade.php @@ -1,7 +1,7 @@ -A password reset has been requested for this email address. + A password reset has been requested for this email address. -Click [here]({{ $url }}) to reset your password. + Click [here]({{ $url }}) to reset your password. -This link will expire in {{ $count }} minutes. + This link will expire in {{ $count }} minutes. diff --git a/resources/views/emails/server-lost-connection.blade.php b/resources/views/emails/server-lost-connection.blade.php index 6e3f28fd4..7d89e02aa 100644 --- a/resources/views/emails/server-lost-connection.blade.php +++ b/resources/views/emails/server-lost-connection.blade.php @@ -1,12 +1,12 @@ -Coolify cannot connect to your server ({{$name}}). Please check your server and make sure it is running. + Coolify cannot connect to your server ({{ $name }}). Please check your server and make sure it is running. -All automations & integrations are turned off! + All automations & integrations are turned off! -IMPORTANT: We automatically try to revive your server. If your server is back online, we will automatically turn on all automations & integrations. + IMPORTANT: We automatically try to revive your server. If your server is back online, we will automatically turn on + all automations & integrations. -If you have any questions, please contact us. + If you have any questions, please contact us. - diff --git a/resources/views/emails/server-revived.blade.php b/resources/views/emails/server-revived.blade.php index 8d16fd2c8..45d855d73 100644 --- a/resources/views/emails/server-revived.blade.php +++ b/resources/views/emails/server-revived.blade.php @@ -1,6 +1,6 @@ -Your server ({{$name}}) was offline for a while, but it is back online now. All automations & integrations are turned on again. + Your server ({{ $name }}) was offline for a while, but it is back online now. All automations & integrations + are turned on again. - diff --git a/resources/views/emails/subscription-invoice-failed.blade.php b/resources/views/emails/subscription-invoice-failed.blade.php index 93103dc67..d4a38fb6a 100644 --- a/resources/views/emails/subscription-invoice-failed.blade.php +++ b/resources/views/emails/subscription-invoice-failed.blade.php @@ -1,6 +1,6 @@ -Your last invoice has failed to be paid for Coolify Cloud. + Your last invoice has failed to be paid for Coolify Cloud. -Please update payment details [here]({{$stripeCustomerPortal}}). + Please update payment details [here]({{ $stripeCustomerPortal }}). diff --git a/resources/views/emails/test.blade.php b/resources/views/emails/test.blade.php index a845efee5..a94ac5b37 100644 --- a/resources/views/emails/test.blade.php +++ b/resources/views/emails/test.blade.php @@ -1,3 +1,3 @@ -If you are seeing this, it means that your Email settings are correct. + If you are seeing this, it means that your Email settings are correct. diff --git a/resources/views/emails/trial-ended.blade.php b/resources/views/emails/trial-ended.blade.php index aeb00fa92..77d72f455 100644 --- a/resources/views/emails/trial-ended.blade.php +++ b/resources/views/emails/trial-ended.blade.php @@ -1,7 +1,8 @@ -Your trial ended. All automations and integrations are disabled for all of your servers. + Your trial ended. All automations and integrations are disabled for all of your servers. -Please update payment details [here]({{$stripeCustomerPortal}}) or in [Coolify Cloud](https://app.coolify.io) to continue using our services. + Please update payment details [here]({{ $stripeCustomerPortal }}) or in [Coolify Cloud](https://app.coolify.io) to + continue using our services. diff --git a/resources/views/emails/trial-ends-soon.blade.php b/resources/views/emails/trial-ends-soon.blade.php index 2e6909016..6248c6190 100644 --- a/resources/views/emails/trial-ends-soon.blade.php +++ b/resources/views/emails/trial-ends-soon.blade.php @@ -1,7 +1,8 @@ -Your trial ends soon. Please update payment details [here]({{$stripeCustomerPortal}}), + Your trial ends soon. Please update payment details [here]({{ $stripeCustomerPortal }}), -Your servers & deployed resources will be untouched, but you won't be able to deploy new resources and lost all automations and integrations. + Your servers & deployed resources will be untouched, but you won't be able to deploy new resources and lost all + automations and integrations. diff --git a/resources/views/emails/updates.blade.php b/resources/views/emails/updates.blade.php index e038b5cbc..eb6a18026 100644 --- a/resources/views/emails/updates.blade.php +++ b/resources/views/emails/updates.blade.php @@ -1,5 +1,5 @@ -

-If you do not like to receive these emails, you can unsubscribe [here]({{$unsubscribeUrl}}). +

+ If you do not like to receive these emails, you can unsubscribe [here]({{ $unsubscribeUrl }}).
diff --git a/resources/views/emails/waitlist-confirmation.blade.php b/resources/views/emails/waitlist-confirmation.blade.php index 363f0b82f..9e22cb9f6 100644 --- a/resources/views/emails/waitlist-confirmation.blade.php +++ b/resources/views/emails/waitlist-confirmation.blade.php @@ -1,9 +1,10 @@ -Someone added this email to the Coolify Cloud's waitlist. [Click here]({{ $confirmation_url }}) to confirm! + Someone added this email to the Coolify Cloud's waitlist. [Click here]({{ $confirmation_url }}) to confirm! -The link will expire in {{config('constants.waitlist.expiration')}} minutes. + The link will expire in {{ config('constants.waitlist.expiration') }} minutes. -You have no idea what [Coolify Cloud](https://coolify.io) is or this waitlist? [Click here]({{ $cancel_url }}) to remove you from the waitlist. + You have no idea what [Coolify Cloud](https://coolify.io) is or this waitlist? [Click here]({{ $cancel_url }}) to + remove you from the waitlist. diff --git a/resources/views/emails/waitlist-invitation.blade.php b/resources/views/emails/waitlist-invitation.blade.php index bae5e329a..201659e0b 100644 --- a/resources/views/emails/waitlist-invitation.blade.php +++ b/resources/views/emails/waitlist-invitation.blade.php @@ -1,4 +1,3 @@ -You have been invited to join the Coolify Cloud: [Get Started]({{$loginLink}}) + You have been invited to join the Coolify Cloud: [Get Started]({{ $loginLink }}) - diff --git a/resources/views/errors/429.blade.php b/resources/views/errors/429.blade.php index 14a740f29..baf9b901b 100644 --- a/resources/views/errors/429.blade.php +++ b/resources/views/errors/429.blade.php @@ -4,7 +4,8 @@

429

Woah, slow down there!

-

You're making too many requests. Please wait a few seconds before trying again. +

You're making too many requests. Please wait a few + seconds before trying again.

diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index babaa105a..ca5d427c5 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -2,9 +2,11 @@ @section('body') @parent -
- -
+ @persist('magic-bar') +
+ +
+ @endpersist
{{ $slot }} diff --git a/resources/views/layouts/base.blade.php b/resources/views/layouts/base.blade.php index 043c5c6a8..c6a5d6edc 100644 --- a/resources/views/layouts/base.blade.php +++ b/resources/views/layouts/base.blade.php @@ -20,7 +20,6 @@ display: none !important; } - @livewireStyles @if (config('app.name') == 'Coolify Cloud') @endif @@ -36,8 +35,7 @@ @section('body') - @livewireScripts - @livewire('livewire-ui-modal') + @livewire('wire-elements-modal') @@ -47,7 +45,7 @@ - @show diff --git a/resources/views/layouts/subscription.blade.php b/resources/views/layouts/subscription.blade.php index 5fb6e930b..9b6415457 100644 --- a/resources/views/layouts/subscription.blade.php +++ b/resources/views/layouts/subscription.blade.php @@ -2,9 +2,11 @@ @section('body') @parent @if (isSubscriptionOnGracePeriod()) -
- -
+ @persist('magic-bar') +
+ +
+ @endpersist @else diff --git a/resources/views/livewire/boarding/index.blade.php b/resources/views/livewire/boarding/index.blade.php index ea14faae1..5a52d3a17 100644 --- a/resources/views/livewire/boarding/index.blade.php +++ b/resources/views/livewire/boarding/index.blade.php @@ -88,7 +88,7 @@ wire:click="setPrivateKey('create')">No (create one for me) @if (count($privateKeys) > 0) - + @foreach ($privateKeys as $privateKey)
- + @foreach ($servers as $server)
@@ -291,8 +291,7 @@ one!
@if (count($projects) > 0) - + @foreach ($projects as $project) diff --git a/resources/views/livewire/check-license.blade.php b/resources/views/livewire/check-license.blade.php index 093e637fd..706b1f5e7 100644 --- a/resources/views/livewire/check-license.blade.php +++ b/resources/views/livewire/check-license.blade.php @@ -1,4 +1,4 @@ - +
@if ($settings->is_resale_license_active)
License is active
diff --git a/resources/views/livewire/dashboard.blade.php b/resources/views/livewire/dashboard.blade.php index cd4f8a458..70f25b8fb 100644 --- a/resources/views/livewire/dashboard.blade.php +++ b/resources/views/livewire/dashboard.blade.php @@ -27,17 +27,16 @@
@endif @foreach ($projects as $project) -
+
@if (data_get($project, 'environments.0.name')) -
{{ $project->name }}
{{ $project->description }}
@else -
{{ $project->name }}
@@ -45,11 +44,11 @@ @endif
- + New Resource - @endif @foreach ($servers as $server) - $server->settings->is_reachable, - 'border-red-500' => !$server->settings->is_reachable, - ])> + $server->settings->is_reachable, + 'border-red-500' => !$server->settings->is_reachable, + ])>
{{ $server->name }} diff --git a/resources/views/livewire/destination/new/standalone-docker.blade.php b/resources/views/livewire/destination/new/standalone-docker.blade.php index 08a136085..90335e51a 100644 --- a/resources/views/livewire/destination/new/standalone-docker.blade.php +++ b/resources/views/livewire/destination/new/standalone-docker.blade.php @@ -1,7 +1,7 @@

Create a new Destination

Destinations are used to segregate resources by network.
- +
@else
Server is not validated. Validate first.
diff --git a/resources/views/livewire/dev/s3-test.blade.php b/resources/views/livewire/dev/s3-test.blade.php index ff6afa5f1..5244f07fd 100644 --- a/resources/views/livewire/dev/s3-test.blade.php +++ b/resources/views/livewire/dev/s3-test.blade.php @@ -1,6 +1,6 @@

S3 Test

- + @error('file') {{ $message }} diff --git a/resources/views/livewire/force-password-reset.blade.php b/resources/views/livewire/force-password-reset.blade.php index 28a6f797a..42f1576a4 100644 --- a/resources/views/livewire/force-password-reset.blade.php +++ b/resources/views/livewire/force-password-reset.blade.php @@ -8,10 +8,11 @@

Set your initial password

- + - + Reset Password
diff --git a/resources/views/livewire/help.blade.php b/resources/views/livewire/help.blade.php index 63f6eaaa8..84a4f99bd 100644 --- a/resources/views/livewire/help.blade.php +++ b/resources/views/livewire/help.blade.php @@ -1,7 +1,7 @@