From f0b9bd2cf2d540778b9d7f7daf0b7a9b01822461 Mon Sep 17 00:00:00 2001 From: ayntk-ai <122374094+ayntk-ai@users.noreply.github.com> Date: Thu, 15 Aug 2024 00:31:23 +0200 Subject: [PATCH] set default time zone and remove success message --- app/Livewire/Server/Form.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/Livewire/Server/Form.php b/app/Livewire/Server/Form.php index c5ffcf974..54cdf7a14 100644 --- a/app/Livewire/Server/Form.php +++ b/app/Livewire/Server/Form.php @@ -78,6 +78,11 @@ class Form extends Component $this->timezones = collect(timezone_identifiers_list())->sort()->values()->toArray(); $this->wildcard_domain = $this->server->settings->wildcard_domain; $this->cleanup_after_percentage = $this->server->settings->cleanup_after_percentage; + + if ($this->server->settings->server_timezone === '') { + $defaultTimezone = config('app.timezone'); + $this->updateServerTimezone($defaultTimezone); + } } public function serverInstalled() @@ -267,11 +272,10 @@ class Form extends Component $this->server->settings->server_timezone = $value; $this->server->settings->save(); - $this->dispatch('success', "Timezone successfully changed to {$value}."); return true; } catch (\Exception $e) { $this->dispatch('error', $e->getMessage()); return false; } } -} \ No newline at end of file +}