diff --git a/app/Http/Livewire/Project/Application/EnvironmentVariable/All.php b/app/Http/Livewire/Project/Application/EnvironmentVariable/All.php index 401ec2ed0..1dcd605cd 100644 --- a/app/Http/Livewire/Project/Application/EnvironmentVariable/All.php +++ b/app/Http/Livewire/Project/Application/EnvironmentVariable/All.php @@ -25,6 +25,8 @@ class All extends Component 'application_id' => $this->application->id, ]); $this->application->refresh(); + + $this->emit('success', 'Environment variable added successfully.'); $this->emit('clearAddEnv'); } catch (\Exception $e) { return general_error_handler(err: $e, that: $this); diff --git a/app/Http/Livewire/Project/Application/EnvironmentVariable/Show.php b/app/Http/Livewire/Project/Application/EnvironmentVariable/Show.php index 7dd73e487..61ecaf3de 100644 --- a/app/Http/Livewire/Project/Application/EnvironmentVariable/Show.php +++ b/app/Http/Livewire/Project/Application/EnvironmentVariable/Show.php @@ -28,6 +28,7 @@ class Show extends Component { $this->validate(); $this->env->save(); + $this->emit('success', 'Environment variable updated successfully.'); } public function delete() { diff --git a/app/Http/Livewire/Project/Application/General.php b/app/Http/Livewire/Project/Application/General.php index f4d435ce9..8f4623861 100644 --- a/app/Http/Livewire/Project/Application/General.php +++ b/app/Http/Livewire/Project/Application/General.php @@ -127,6 +127,7 @@ class General extends Component $this->application->fqdn = $domains->implode(','); $this->application->save(); + $this->emit('success', 'Application settings updated!'); } catch (\Exception $e) { return general_error_handler(err: $e, that: $this); } diff --git a/app/Http/Livewire/Project/Application/Preview/Form.php b/app/Http/Livewire/Project/Application/Preview/Form.php index 2cb1aaa0a..e17312005 100644 --- a/app/Http/Livewire/Project/Application/Preview/Form.php +++ b/app/Http/Livewire/Project/Application/Preview/Form.php @@ -41,6 +41,7 @@ class Form extends Component $this->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->generate_real_url(); } } diff --git a/app/Http/Livewire/Project/Application/ResourceLimits.php b/app/Http/Livewire/Project/Application/ResourceLimits.php index 6da94054f..9db5626ac 100644 --- a/app/Http/Livewire/Project/Application/ResourceLimits.php +++ b/app/Http/Livewire/Project/Application/ResourceLimits.php @@ -52,6 +52,7 @@ class ResourceLimits extends Component } $this->validate(); $this->application->save(); + $this->emit('success', 'Resource limits updated successfully.'); } catch (\Exception $e) { return general_error_handler(err: $e, that: $this); } diff --git a/app/Http/Livewire/Project/Application/Storages/All.php b/app/Http/Livewire/Project/Application/Storages/All.php index d6691857e..59cf0e52e 100644 --- a/app/Http/Livewire/Project/Application/Storages/All.php +++ b/app/Http/Livewire/Project/Application/Storages/All.php @@ -25,6 +25,7 @@ class All extends Component 'resource_type' => Application::class, ]); $this->application->refresh(); + $this->emit('success', 'Storage added successfully'); $this->emit('clearAddStorage'); } catch (\Exception $e) { return general_error_handler(err: $e, that: $this); diff --git a/app/Http/Livewire/Project/Application/Storages/Show.php b/app/Http/Livewire/Project/Application/Storages/Show.php index da017d6fb..41c3c1fb8 100644 --- a/app/Http/Livewire/Project/Application/Storages/Show.php +++ b/app/Http/Livewire/Project/Application/Storages/Show.php @@ -21,6 +21,7 @@ class Show extends Component { $this->validate(); $this->storage->save(); + $this->emit('success', 'Storage updated successfully'); } public function delete() { diff --git a/app/Http/Livewire/Server/Form.php b/app/Http/Livewire/Server/Form.php index f1435ea28..2c4f2260f 100644 --- a/app/Http/Livewire/Server/Form.php +++ b/app/Http/Livewire/Server/Form.php @@ -82,5 +82,6 @@ class Form extends Component // return; // } $this->server->save(); + $this->emit('success', 'Server updated successfully.'); } } diff --git a/app/Http/Livewire/Server/Proxy.php b/app/Http/Livewire/Server/Proxy.php index 2403fab33..96268eb79 100644 --- a/app/Http/Livewire/Server/Proxy.php +++ b/app/Http/Livewire/Server/Proxy.php @@ -63,6 +63,7 @@ class Proxy extends Component instant_remote_process([ "echo '$docker_compose_yml_base64' | base64 -d > $proxy_path/docker-compose.yml", ], $server); + $this->emit('success', 'Proxy configuration saved.'); } catch (\Exception $e) { return general_error_handler(err: $e); } diff --git a/app/Http/Livewire/Settings/Configuration.php b/app/Http/Livewire/Settings/Configuration.php index e52b1b97f..7db42883a 100644 --- a/app/Http/Livewire/Settings/Configuration.php +++ b/app/Http/Livewire/Settings/Configuration.php @@ -207,5 +207,6 @@ class Configuration extends Component if ($this->settings->fqdn || $this->settings->default_redirect_404) { dispatch(new InstanceProxyCheckJob()); } + $this->emit('success', 'Instance settings updated successfully!'); } } diff --git a/app/Http/Livewire/Settings/Email.php b/app/Http/Livewire/Settings/Email.php index b82982a6a..6342ab4f5 100644 --- a/app/Http/Livewire/Settings/Email.php +++ b/app/Http/Livewire/Settings/Email.php @@ -42,6 +42,7 @@ class Email extends Component { try { $this->submit(); + $this->emit('success', 'Settings saved successfully.'); } catch (\Exception $e) { $this->settings->smtp->enabled = false; $this->validate(); @@ -73,6 +74,7 @@ class Email extends Component $this->settings->smtp->test_recipients = str_replace(' ', '', $this->settings->smtp->test_recipients); $this->settings->save(); + $this->emit('success', 'Transaction email settings updated successfully.'); $this->decrypt(); } } diff --git a/app/Models/Application.php b/app/Models/Application.php index 1648a7dbb..77bf0a5fb 100644 --- a/app/Models/Application.php +++ b/app/Models/Application.php @@ -6,6 +6,8 @@ use Illuminate\Contracts\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Casts\Attribute; use Spatie\Activitylog\Models\Activity; use Illuminate\Database\Eloquent\Relations\HasMany; +use Masmerise\Toaster\Toastable; +use Masmerise\Toaster\Toaster; use Spatie\SchemalessAttributes\Casts\SchemalessAttributes; class Application extends BaseModel diff --git a/resources/views/components/forms/checkbox.blade.php b/resources/views/components/forms/checkbox.blade.php index 0ab5c22ef..47c579b1a 100644 --- a/resources/views/components/forms/checkbox.blade.php +++ b/resources/views/components/forms/checkbox.blade.php @@ -8,7 +8,7 @@ 'noDirty' => $attributes->has('noDirty'), 'disabled' => null, ]) -