diff --git a/app/Livewire/Notifications/EmailSettings.php b/app/Livewire/Notifications/EmailSettings.php index cdbaef051..b6152907d 100644 --- a/app/Livewire/Notifications/EmailSettings.php +++ b/app/Livewire/Notifications/EmailSettings.php @@ -63,7 +63,7 @@ public function submitFromFields() ]); $this->team->save(); refreshSession(); - $this->dispatch('success', 'Settings saved successfully.'); + $this->dispatch('success', 'Settings saved.'); } catch (\Throwable $e) { return handleError($e, $this); } @@ -71,7 +71,7 @@ public function submitFromFields() public function sendTestNotification() { $this->team?->notify(new Test($this->emails)); - $this->dispatch('success', 'Test Email sent successfully.'); + $this->dispatch('success', 'Test Email sent.'); } public function instantSaveInstance() { @@ -83,7 +83,7 @@ public function instantSaveInstance() $this->team->resend_enabled = false; $this->team->save(); refreshSession(); - $this->dispatch('success', 'Settings saved successfully.'); + $this->dispatch('success', 'Settings saved.'); } catch (\Throwable $e) { return handleError($e, $this); } @@ -131,7 +131,7 @@ public function submit() ]); $this->team->save(); refreshSession(); - $this->dispatch('success', 'Settings saved successfully.'); + $this->dispatch('success', 'Settings saved.'); } catch (\Throwable $e) { $this->team->smtp_enabled = false; return handleError($e, $this); @@ -148,7 +148,7 @@ public function submitResend() ]); $this->team->save(); refreshSession(); - $this->dispatch('success', 'Settings saved successfully.'); + $this->dispatch('success', 'Settings saved.'); } catch (\Throwable $e) { $this->team->resend_enabled = false; return handleError($e, $this); diff --git a/app/Livewire/Profile/Index.php b/app/Livewire/Profile/Index.php index 0a2a34766..3499d4ff9 100644 --- a/app/Livewire/Profile/Index.php +++ b/app/Livewire/Profile/Index.php @@ -27,7 +27,7 @@ public function submit() 'name' => $this->name, ]); - $this->dispatch('success', 'Profile updated successfully.'); + $this->dispatch('success', 'Profile updated'); } catch (\Throwable $e) { return handleError($e, $this); } diff --git a/app/Livewire/Project/Application/Preview/Form.php b/app/Livewire/Project/Application/Preview/Form.php index 0da8b1d76..6826e154b 100644 --- a/app/Livewire/Project/Application/Preview/Form.php +++ b/app/Livewire/Project/Application/Preview/Form.php @@ -46,7 +46,7 @@ public function submit() $this->validate(); $this->application->preview_url_template = str_replace(' ', '', $this->application->preview_url_template); $this->application->save(); - $this->dispatch('success', 'Preview url template updated successfully.'); + $this->dispatch('success', 'Preview url template updated.'); $this->generate_real_url(); } } diff --git a/app/Livewire/Project/Database/BackupExecutions.php b/app/Livewire/Project/Database/BackupExecutions.php index f1918f990..c78a8cbee 100644 --- a/app/Livewire/Project/Database/BackupExecutions.php +++ b/app/Livewire/Project/Database/BackupExecutions.php @@ -33,7 +33,7 @@ public function deleteBackup($exeuctionId) delete_backup_locally($execution->filename, $execution->scheduledDatabaseBackup->database->destination->server); } $execution->delete(); - $this->dispatch('success', 'Backup deleted successfully.'); + $this->dispatch('success', 'Backup deleted.'); $this->dispatch('refreshBackupExecutions'); } public function download($exeuctionId) diff --git a/app/Livewire/Project/Database/Heading.php b/app/Livewire/Project/Database/Heading.php index ed31f8cae..303166227 100644 --- a/app/Livewire/Project/Database/Heading.php +++ b/app/Livewire/Project/Database/Heading.php @@ -38,7 +38,7 @@ public function check_status($showNotification = false) { dispatch_sync(new ContainerStatusJob($this->database->destination->server)); $this->database->refresh(); - if ($showNotification) $this->dispatch('success', 'Success', 'Database status updated.'); + if ($showNotification) $this->dispatch('success', 'Database status updated.'); } public function mount() diff --git a/app/Livewire/Project/Database/Mariadb/General.php b/app/Livewire/Project/Database/Mariadb/General.php index 305633cba..9b15c6c3c 100644 --- a/app/Livewire/Project/Database/Mariadb/General.php +++ b/app/Livewire/Project/Database/Mariadb/General.php @@ -59,7 +59,7 @@ public function instantSaveAdvanced() { return; } $this->database->save(); - $this->dispatch('success', 'Database updated successfully.'); + $this->dispatch('success', 'Database updated.'); $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 @@ public function submit() } $this->validate(); $this->database->save(); - $this->dispatch('success', 'Database updated successfully.'); + $this->dispatch('success', 'Database updated.'); } catch (Exception $e) { return handleError($e, $this); } diff --git a/app/Livewire/Project/Database/Mongodb/General.php b/app/Livewire/Project/Database/Mongodb/General.php index 70f54cc3f..cd3ea0630 100644 --- a/app/Livewire/Project/Database/Mongodb/General.php +++ b/app/Livewire/Project/Database/Mongodb/General.php @@ -58,7 +58,7 @@ public function instantSaveAdvanced() return; } $this->database->save(); - $this->dispatch('success', 'Database updated successfully.'); + $this->dispatch('success', 'Database updated.'); $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 @@ public function submit() } $this->validate(); $this->database->save(); - $this->dispatch('success', 'Database updated successfully.'); + $this->dispatch('success', 'Database updated.'); } catch (Exception $e) { return handleError($e, $this); } diff --git a/app/Livewire/Project/Database/Mysql/General.php b/app/Livewire/Project/Database/Mysql/General.php index 98b16a112..2470a934b 100644 --- a/app/Livewire/Project/Database/Mysql/General.php +++ b/app/Livewire/Project/Database/Mysql/General.php @@ -60,7 +60,7 @@ public function instantSaveAdvanced() return; } $this->database->save(); - $this->dispatch('success', 'Database updated successfully.'); + $this->dispatch('success', 'Database updated.'); $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 @@ public function submit() } $this->validate(); $this->database->save(); - $this->dispatch('success', 'Database updated successfully.'); + $this->dispatch('success', 'Database updated.'); } catch (Exception $e) { return handleError($e, $this); } diff --git a/app/Livewire/Project/Database/Postgresql/General.php b/app/Livewire/Project/Database/Postgresql/General.php index 6fa5df97c..43f559140 100644 --- a/app/Livewire/Project/Database/Postgresql/General.php +++ b/app/Livewire/Project/Database/Postgresql/General.php @@ -66,7 +66,7 @@ public function instantSaveAdvanced() { return; } $this->database->save(); - $this->dispatch('success', 'Database updated successfully.'); + $this->dispatch('success', 'Database updated.'); $this->dispatch('success', 'You need to restart the service for the changes to take effect.'); } catch (Exception $e) { return handleError($e, $this); @@ -105,7 +105,7 @@ public function save_init_script($script) $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->dispatch('success', 'Init script saved successfully.'); + $this->dispatch('success', 'Init script saved.'); } public function delete_init_script($script) @@ -116,7 +116,7 @@ public function delete_init_script($script) $this->database->init_scripts = $collection->filter(fn ($s) => $s['filename'] !== $script['filename'])->toArray(); $this->database->save(); $this->refresh(); - $this->dispatch('success', 'Init script deleted successfully.'); + $this->dispatch('success', 'Init script deleted.'); return; } } @@ -148,7 +148,7 @@ public function save_new_init_script() ] ]); $this->database->save(); - $this->dispatch('success', 'Init script added successfully.'); + $this->dispatch('success', 'Init script added.'); $this->new_content = ''; $this->new_filename = ''; } @@ -161,7 +161,7 @@ public function submit() } $this->validate(); $this->database->save(); - $this->dispatch('success', 'Database updated successfully.'); + $this->dispatch('success', 'Database updated.'); } catch (Exception $e) { return handleError($e, $this); } diff --git a/app/Livewire/Project/Database/Redis/General.php b/app/Livewire/Project/Database/Redis/General.php index c328a6195..07c161de5 100644 --- a/app/Livewire/Project/Database/Redis/General.php +++ b/app/Livewire/Project/Database/Redis/General.php @@ -52,7 +52,7 @@ public function instantSaveAdvanced() { return; } $this->database->save(); - $this->dispatch('success', 'Database updated successfully.'); + $this->dispatch('success', 'Database updated.'); $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 @@ public function submit() $this->database->redis_conf = null; } $this->database->save(); - $this->dispatch('success', 'Database updated successfully.'); + $this->dispatch('success', 'Database updated.'); } catch (Exception $e) { return handleError($e, $this); } diff --git a/app/Livewire/Project/Database/ScheduledBackups.php b/app/Livewire/Project/Database/ScheduledBackups.php index 2fc4d069e..399fddac4 100644 --- a/app/Livewire/Project/Database/ScheduledBackups.php +++ b/app/Livewire/Project/Database/ScheduledBackups.php @@ -38,7 +38,7 @@ public function setSelectedBackup($backupId) { public function delete($scheduled_backup_id): void { $this->database->scheduledBackups->find($scheduled_backup_id)->delete(); - $this->dispatch('success', 'Scheduled backup deleted successfully.'); + $this->dispatch('success', 'Scheduled backup deleted.'); $this->refreshScheduledBackups(); } diff --git a/app/Livewire/Project/Service/Database.php b/app/Livewire/Project/Service/Database.php index e7be1ff2e..8dec97852 100644 --- a/app/Livewire/Project/Service/Database.php +++ b/app/Livewire/Project/Service/Database.php @@ -77,7 +77,7 @@ public function submit() $this->validate(); $this->database->save(); updateCompose($this->database); - $this->dispatch('success', 'Database saved successfully.'); + $this->dispatch('success', 'Database saved.'); } catch (\Throwable $e) { ray($e); } finally { diff --git a/app/Livewire/Project/Service/FileStorage.php b/app/Livewire/Project/Service/FileStorage.php index da85a1a6e..2abfcdf5e 100644 --- a/app/Livewire/Project/Service/FileStorage.php +++ b/app/Livewire/Project/Service/FileStorage.php @@ -42,7 +42,7 @@ public function submit() } $this->fileStorage->save(); $this->fileStorage->saveStorageOnServer(); - $this->dispatch('success', 'File updated successfully.'); + $this->dispatch('success', 'File updated.'); } catch (\Throwable $e) { $this->fileStorage->setRawAttributes($original); $this->fileStorage->save(); diff --git a/app/Livewire/Project/Service/Navbar.php b/app/Livewire/Project/Service/Navbar.php index 2eb9f938c..fda86321b 100644 --- a/app/Livewire/Project/Service/Navbar.php +++ b/app/Livewire/Project/Service/Navbar.php @@ -64,9 +64,9 @@ public function stop(bool $forceCleanup = false) StopService::run($this->service); $this->service->refresh(); if ($forceCleanup) { - $this->dispatch('success', 'Force cleanup service successfully.'); + $this->dispatch('success', 'Force cleanup service.'); } else { - $this->dispatch('success', 'Service stopped successfully.'); + $this->dispatch('success', 'Service stopped.'); } ServiceStatusChanged::dispatch(); } diff --git a/app/Livewire/Project/Service/ServiceApplicationView.php b/app/Livewire/Project/Service/ServiceApplicationView.php index 53532a855..2bae41a80 100644 --- a/app/Livewire/Project/Service/ServiceApplicationView.php +++ b/app/Livewire/Project/Service/ServiceApplicationView.php @@ -41,7 +41,7 @@ public function delete() { try { $this->application->delete(); - $this->dispatch('success', 'Application deleted successfully.'); + $this->dispatch('success', 'Application deleted.'); return redirect()->route('project.service.configuration', $this->parameters); } catch (\Throwable $e) { return handleError($e, $this); @@ -58,7 +58,7 @@ public function submit() $this->validate(); $this->application->save(); updateCompose($this->application); - $this->dispatch('success', 'Application saved successfully.'); + $this->dispatch('success', 'Application saved.'); } catch (\Throwable $e) { return handleError($e, $this); } finally { diff --git a/app/Livewire/Project/Service/StackForm.php b/app/Livewire/Project/Service/StackForm.php index 44672fe64..1ec63a761 100644 --- a/app/Livewire/Project/Service/StackForm.php +++ b/app/Livewire/Project/Service/StackForm.php @@ -48,7 +48,7 @@ public function saveCompose($raw) public function instantSave() { $this->service->save(); - $this->dispatch('success', 'Service settings saved successfully.'); + $this->dispatch('success', 'Service settings saved.'); } public function submit() @@ -62,7 +62,7 @@ public function submit() $this->service->saveComposeConfigs(); $this->dispatch('refreshStacks'); $this->dispatch('refreshEnvs'); - $this->dispatch('success', 'Service saved successfully.'); + $this->dispatch('success', 'Service saved.'); } catch (\Throwable $e) { return handleError($e, $this); } diff --git a/app/Livewire/Project/Shared/EnvironmentVariable/All.php b/app/Livewire/Project/Shared/EnvironmentVariable/All.php index 28aac7ce3..3a304d3e9 100644 --- a/app/Livewire/Project/Shared/EnvironmentVariable/All.php +++ b/app/Livewire/Project/Shared/EnvironmentVariable/All.php @@ -120,9 +120,9 @@ public function saveVariables($isPreview) } } if ($isPreview) { - $this->dispatch('success', 'Preview environment variables updated successfully.'); + $this->dispatch('success', 'Preview environment variables updated.'); } else { - $this->dispatch('success', 'Environment variables updated successfully.'); + $this->dispatch('success', 'Environment variables updated.'); } $this->refreshEnvs(); } diff --git a/app/Livewire/Project/Shared/EnvironmentVariable/Show.php b/app/Livewire/Project/Shared/EnvironmentVariable/Show.php index 1494707e7..9252c44f8 100644 --- a/app/Livewire/Project/Shared/EnvironmentVariable/Show.php +++ b/app/Livewire/Project/Shared/EnvironmentVariable/Show.php @@ -90,7 +90,7 @@ public function submit() } $this->serialize(); $this->env->save(); - $this->dispatch('success', 'Environment variable updated successfully.'); + $this->dispatch('success', 'Environment variable updated.'); $this->dispatch('refreshEnvs'); } catch (\Exception $e) { return handleError($e); diff --git a/app/Livewire/Project/Shared/ResourceLimits.php b/app/Livewire/Project/Shared/ResourceLimits.php index 8b010530c..a326a9a0b 100644 --- a/app/Livewire/Project/Shared/ResourceLimits.php +++ b/app/Livewire/Project/Shared/ResourceLimits.php @@ -52,7 +52,7 @@ public function submit() } $this->validate(); $this->resource->save(); - $this->dispatch('success', 'Resource limits updated successfully.'); + $this->dispatch('success', 'Resource limits updated.'); } catch (\Throwable $e) { return handleError($e, $this); } diff --git a/app/Livewire/Project/Shared/ScheduledTask/All.php b/app/Livewire/Project/Shared/ScheduledTask/All.php index 4a876e72a..975d695fa 100644 --- a/app/Livewire/Project/Shared/ScheduledTask/All.php +++ b/app/Livewire/Project/Shared/ScheduledTask/All.php @@ -48,7 +48,7 @@ public function submit($data) } $task->save(); $this->refreshTasks(); - $this->dispatch('success', 'Scheduled task added successfully.'); + $this->dispatch('success', 'Scheduled task added.'); } catch (\Throwable $e) { return handleError($e, $this); } diff --git a/app/Livewire/Project/Shared/ScheduledTask/Show.php b/app/Livewire/Project/Shared/ScheduledTask/Show.php index 23cb0e41a..87b752509 100644 --- a/app/Livewire/Project/Shared/ScheduledTask/Show.php +++ b/app/Livewire/Project/Shared/ScheduledTask/Show.php @@ -49,7 +49,7 @@ public function submit() { $this->validate(); $this->task->save(); - $this->dispatch('success', 'Scheduled task updated successfully.'); + $this->dispatch('success', 'Scheduled task updated.'); $this->dispatch('refreshTasks'); } diff --git a/app/Livewire/Server/Form.php b/app/Livewire/Server/Form.php index 75e65c319..098a7c1ff 100644 --- a/app/Livewire/Server/Form.php +++ b/app/Livewire/Server/Form.php @@ -64,7 +64,7 @@ public function instantSave() refresh_server_connection($this->server->privateKey); $this->validateServer(false); $this->server->settings->save(); - $this->dispatch('success', 'Server updated successfully.'); + $this->dispatch('success', 'Server updated.'); } catch (\Throwable $e) { return handleError($e, $this); } @@ -113,6 +113,6 @@ public function submit() $this->server->settings->cleanup_after_percentage = $this->cleanup_after_percentage; $this->server->settings->save(); $this->server->save(); - $this->dispatch('success', 'Server updated successfully.'); + $this->dispatch('success', 'Server updated.'); } } diff --git a/app/Livewire/Server/LogDrains.php b/app/Livewire/Server/LogDrains.php index b922cc0c9..4eca682d4 100644 --- a/app/Livewire/Server/LogDrains.php +++ b/app/Livewire/Server/LogDrains.php @@ -60,7 +60,7 @@ public function configureLogDrain() return; } $this->dispatch('serverRefresh'); - $this->dispatch('success', 'Log drain service started successfully.'); + $this->dispatch('success', 'Log drain service started.'); } catch (\Throwable $e) { return handleError($e, $this); } @@ -126,7 +126,7 @@ public function submit(string $type) ]); } $this->server->settings->save(); - $this->dispatch('success', 'Settings saved successfully.'); + $this->dispatch('success', 'Settings saved.'); return true; } catch (\Throwable $e) { if ($type === 'newrelic') { diff --git a/app/Livewire/Server/Proxy/DynamicConfigurationNavbar.php b/app/Livewire/Server/Proxy/DynamicConfigurationNavbar.php index acff38ccb..ee46a3fff 100644 --- a/app/Livewire/Server/Proxy/DynamicConfigurationNavbar.php +++ b/app/Livewire/Server/Proxy/DynamicConfigurationNavbar.php @@ -17,7 +17,7 @@ public function delete(string $fileName) $proxy_path = get_proxy_path(); $file = str_replace('|', '.', $fileName); instant_remote_process(["rm -f {$proxy_path}/dynamic/{$file}"], $server); - $this->dispatch('success', 'Success', 'File deleted.'); + $this->dispatch('success', 'File deleted.'); $this->dispatch('loadDynamicConfigurations'); $this->dispatch('refresh'); } diff --git a/app/Livewire/Server/Proxy/NewDynamicConfiguration.php b/app/Livewire/Server/Proxy/NewDynamicConfiguration.php index 28b083ca8..c9ceb41ee 100644 --- a/app/Livewire/Server/Proxy/NewDynamicConfiguration.php +++ b/app/Livewire/Server/Proxy/NewDynamicConfiguration.php @@ -43,7 +43,7 @@ public function addDynamicConfiguration() $this->fileName = "{$this->fileName}.yaml"; } if ($this->fileName === 'coolify.yaml') { - $this->dispatch('error', 'Error', 'File name is reserved.'); + $this->dispatch('error', 'File name is reserved.'); return; } $proxy_path = get_proxy_path(); @@ -51,7 +51,7 @@ public function addDynamicConfiguration() if ($this->newFile) { $exists = instant_remote_process(["test -f $file && echo 1 || echo 0"], $this->server); if ($exists == 1) { - $this->dispatch('error', 'Error', 'File already exists'); + $this->dispatch('error', 'File already exists'); return; } } @@ -62,7 +62,7 @@ public function addDynamicConfiguration() instant_remote_process(["echo '{$base64_value}' | base64 -d > {$file}"], $this->server); $this->dispatch('loadDynamicConfigurations'); $this->dispatch('dynamic-configuration-added'); - $this->dispatch('success', 'Success', 'Dynamic configuration saved.'); + $this->dispatch('success', 'Dynamic configuration saved.'); } catch (\Throwable $e) { return handleError($e, $this); } diff --git a/app/Livewire/Server/ValidateAndInstall.php b/app/Livewire/Server/ValidateAndInstall.php index 4fa92644d..ff623e972 100644 --- a/app/Livewire/Server/ValidateAndInstall.php +++ b/app/Livewire/Server/ValidateAndInstall.php @@ -124,7 +124,7 @@ public function validateDockerVersion() $this->docker_version = $this->server->validateDockerEngineVersion(); if ($this->docker_version) { $this->dispatch('serverInstalled'); - $this->dispatch('success', 'Server validated successfully.'); + $this->dispatch('success', 'Server validated.'); } else { $this->error = 'Docker Engine version is not 22+. Please install Docker manually before continuing: documentation.'; return; diff --git a/app/Livewire/Settings/Backup.php b/app/Livewire/Settings/Backup.php index 519fe1bd8..67a457774 100644 --- a/app/Livewire/Settings/Backup.php +++ b/app/Livewire/Settings/Backup.php @@ -81,6 +81,6 @@ public function backup_now() } public function submit() { - $this->dispatch('success', 'Backup updated successfully.'); + $this->dispatch('success', 'Backup updated.'); } } diff --git a/app/Livewire/Settings/Email.php b/app/Livewire/Settings/Email.php index 471c18e9c..3563e2e64 100644 --- a/app/Livewire/Settings/Email.php +++ b/app/Livewire/Settings/Email.php @@ -49,7 +49,7 @@ public function submitFromFields() { 'settings.smtp_from_name' => 'required', ]); $this->settings->save(); - $this->dispatch('success', 'Settings saved successfully.'); + $this->dispatch('success', 'Settings saved.'); } catch (\Throwable $e) { return handleError($e, $this); } @@ -61,7 +61,7 @@ public function submitResend() { 'settings.resend_api_key' => 'required' ]); $this->settings->save(); - $this->dispatch('success', 'Settings saved successfully.'); + $this->dispatch('success', 'Settings saved.'); } catch (\Throwable $e) { $this->settings->resend_enabled = false; return handleError($e, $this); @@ -98,7 +98,7 @@ public function submit() 'settings.smtp_timeout' => 'nullable', ]); $this->settings->save(); - $this->dispatch('success', 'Settings saved successfully.'); + $this->dispatch('success', 'Settings saved.'); } catch (\Throwable $e) { return handleError($e, $this); } diff --git a/app/Livewire/Source/Github/Change.php b/app/Livewire/Source/Github/Change.php index d03f7c08f..61c4ffcda 100644 --- a/app/Livewire/Source/Github/Change.php +++ b/app/Livewire/Source/Github/Change.php @@ -47,7 +47,7 @@ public function checkPermissions() { GithubAppPermissionJob::dispatchSync($this->github_app); $this->github_app->refresh()->makeVisible('client_secret')->makeVisible('webhook_secret'); - $this->dispatch('success', 'Success', 'Github App permissions updated.'); + $this->dispatch('success', 'Github App permissions updated.'); } // public function check() // { @@ -150,7 +150,7 @@ public function submit() 'github_app.is_system_wide' => 'required|bool', ]); $this->github_app->save(); - $this->dispatch('success', 'Success', 'Github App updated.'); + $this->dispatch('success', 'Github App updated.'); } catch (\Throwable $e) { return handleError($e, $this); } @@ -161,7 +161,7 @@ public function instantSave() try { $this->github_app->makeVisible('client_secret')->makeVisible('webhook_secret'); $this->github_app->save(); - $this->dispatch('success', 'Success', 'Github App updated.'); + $this->dispatch('success', 'Github App updated.'); } catch (\Throwable $e) { return handleError($e, $this); } diff --git a/app/Livewire/Team/Index.php b/app/Livewire/Team/Index.php index b7482e671..1822620f8 100644 --- a/app/Livewire/Team/Index.php +++ b/app/Livewire/Team/Index.php @@ -37,7 +37,7 @@ public function submit() try { $this->team->save(); refreshSession(); - $this->dispatch('success', 'Team updated successfully.'); + $this->dispatch('success', 'Team updated.'); } catch (\Throwable $e) { return handleError($e, $this); } diff --git a/app/Livewire/Team/InviteLink.php b/app/Livewire/Team/InviteLink.php index 5f9db3f84..cc9054888 100644 --- a/app/Livewire/Team/InviteLink.php +++ b/app/Livewire/Team/InviteLink.php @@ -79,7 +79,7 @@ private function generate_invite_link(bool $sendEmail = false) ]); $mail->subject('You have been invited to ' . currentTeam()->name . ' on ' . config('app.name') . '.'); send_user_an_email($mail, $this->email); - $this->dispatch('success', 'Invitation sent via email successfully.'); + $this->dispatch('success', 'Invitation sent via email.'); $this->dispatch('refreshInvitations'); return; } else { diff --git a/resources/views/layouts/base.blade.php b/resources/views/layouts/base.blade.php index d12d30d86..675c0d0af 100644 --- a/resources/views/layouts/base.blade.php +++ b/resources/views/layouts/base.blade.php @@ -146,7 +146,12 @@ function copyToClipboard(text) { } }) window.Livewire.on('error', (message) => { - if (message.length > 0) { + if (message.length == 1) { + window.toast('Error', { + type: 'danger', + description: message[0], + }) + } else if (message.length == 2) { window.toast(message[0], { type: 'danger', description: message[1], @@ -162,7 +167,12 @@ function copyToClipboard(text) { } }) window.Livewire.on('success', (message) => { - if (message.length > 0) { + if (message.length == 1) { + window.toast('Success', { + type: 'success', + description: message[0], + }) + } else if (message.length == 2) { window.toast(message[0], { type: 'success', description: message[1],