diff --git a/app/Http/Livewire/Project/Application/General.php b/app/Http/Livewire/Project/Application/General.php index 8f4623861..eeef8020b 100644 --- a/app/Http/Livewire/Project/Application/General.php +++ b/app/Http/Livewire/Project/Application/General.php @@ -105,6 +105,7 @@ class General extends Component $scheme = $url->getScheme(); $this->application->fqdn = $scheme . '://' . $this->application->uuid . '.' . $host . $path; $this->application->save(); + $this->emit('success', 'Application settings updated!'); } public function generateProjectRandomDomain() { @@ -115,6 +116,7 @@ class General extends Component $scheme = $url->getScheme(); $this->application->fqdn = $scheme . '://' . $this->application->uuid . '.' . $host . $path; $this->application->save(); + $this->emit('success', 'Application settings updated!'); } public function submit() { diff --git a/app/Http/Livewire/Project/Edit.php b/app/Http/Livewire/Project/Edit.php index aa759e05e..79652607c 100644 --- a/app/Http/Livewire/Project/Edit.php +++ b/app/Http/Livewire/Project/Edit.php @@ -8,14 +8,22 @@ use Livewire\Component; class Edit extends Component { public Project $project; + public string|null $wildcard_domain = null; protected $rules = [ 'project.name' => 'required|min:3|max:255', 'project.description' => 'nullable|string|max:255', + 'wildcard_domain' => 'nullable|string|max:255', ]; + public function mount() + { + $this->wildcard_domain = $this->project->settings->wildcard_domain; + } public function submit() { $this->validate(); try { + $this->project->settings->wildcard_domain = $this->wildcard_domain; + $this->project->settings->save(); $this->project->save(); $this->emit('saved'); } catch (\Exception $e) { diff --git a/resources/views/livewire/project/application/general.blade.php b/resources/views/livewire/project/application/general.blade.php index 25f0a8f33..ec8ee781f 100644 --- a/resources/views/livewire/project/application/general.blade.php +++ b/resources/views/livewire/project/application/general.blade.php @@ -12,21 +12,19 @@ - + @if ($wildcard_domain) +
+ @if ($global_wildcard_domain) + Global Wildcard + + @endif + @if ($project_wildcard_domain) + Project Wildcard + + @endif +
+ @endif - @if ($wildcard_domain) -
-
Set Random Domain
- @if ($global_wildcard_domain) - Global Wildcard - - @endif - @if ($project_wildcard_domain) - Project Wildcard - - @endif -
- @endif diff --git a/resources/views/livewire/project/edit.blade.php b/resources/views/livewire/project/edit.blade.php index a7ff0f68f..ad58e3c59 100644 --- a/resources/views/livewire/project/edit.blade.php +++ b/resources/views/livewire/project/edit.blade.php @@ -1,9 +1,14 @@
-

{{ data_get($project, 'name') }}

-
Edit project details
-
- - - Save + +
+

Project: {{ data_get($project, 'name') }}

+ Save +
+
Edit project details here.
+
+ + + +