diff --git a/app/Livewire/Destination/Show.php b/app/Livewire/Destination/Show.php index 05b295b88b..1aa03d854c 100644 --- a/app/Livewire/Destination/Show.php +++ b/app/Livewire/Destination/Show.php @@ -51,6 +51,7 @@ class Show extends Component $this->destination->name = $this->name; $changedFields = auditChangedFields($this->destination); $this->destination->save(); + $this->dispatch('name-changed', uuid: $this->destination->uuid, name: $this->destination->name); if ($changedFields !== []) { auditLog('ui.destination.updated', $this->auditContext([ 'changed_fields' => $changedFields, diff --git a/app/Livewire/Project/Application/General.php b/app/Livewire/Project/Application/General.php index a58d87f307..2112c36c14 100644 --- a/app/Livewire/Project/Application/General.php +++ b/app/Livewire/Project/Application/General.php @@ -973,6 +973,7 @@ class General extends Component $this->application->custom_labels = base64_encode($this->customLabels); $this->application->save(); $this->application->refresh(); + $this->dispatch('name-changed', uuid: $this->application->uuid, name: $this->application->name); $dnsCleanup->queueReleaseOfRemovedHostnames($this->application, $previousDnsHostnames, $this->application->team()->id); $this->syncData(); if ($oldPortsExposes !== $this->application->ports_exposes || $oldCustomNetworkAliases !== $this->application->custom_network_aliases) { diff --git a/app/Livewire/Project/Database/Clickhouse/General.php b/app/Livewire/Project/Database/Clickhouse/General.php index 68452e78af..c8badb3cf7 100644 --- a/app/Livewire/Project/Database/Clickhouse/General.php +++ b/app/Livewire/Project/Database/Clickhouse/General.php @@ -135,6 +135,7 @@ class General extends Component $this->database->custom_docker_run_options = $this->customDockerRunOptions; $this->database->is_log_drain_enabled = $this->isLogDrainEnabled; $this->database->save(); + $this->dispatch('name-changed', uuid: $this->database->uuid, name: $this->database->name); } else { $this->name = $this->database->name; $this->description = $this->database->description; diff --git a/app/Livewire/Project/Database/Dragonfly/General.php b/app/Livewire/Project/Database/Dragonfly/General.php index 3c6b27e306..0e35530841 100644 --- a/app/Livewire/Project/Database/Dragonfly/General.php +++ b/app/Livewire/Project/Database/Dragonfly/General.php @@ -122,6 +122,7 @@ class General extends Component $this->database->custom_docker_run_options = $this->customDockerRunOptions; $this->database->is_log_drain_enabled = $this->isLogDrainEnabled; $this->database->save(); + $this->dispatch('name-changed', uuid: $this->database->uuid, name: $this->database->name); } else { $this->name = $this->database->name; $this->description = $this->database->description; diff --git a/app/Livewire/Project/Database/Keydb/General.php b/app/Livewire/Project/Database/Keydb/General.php index 1e159d2f9b..abd9e5d025 100644 --- a/app/Livewire/Project/Database/Keydb/General.php +++ b/app/Livewire/Project/Database/Keydb/General.php @@ -126,6 +126,7 @@ class General extends Component $this->database->custom_docker_run_options = $this->customDockerRunOptions; $this->database->is_log_drain_enabled = $this->isLogDrainEnabled; $this->database->save(); + $this->dispatch('name-changed', uuid: $this->database->uuid, name: $this->database->name); } else { $this->name = $this->database->name; $this->description = $this->database->description; diff --git a/app/Livewire/Project/Database/Mariadb/General.php b/app/Livewire/Project/Database/Mariadb/General.php index d65136e9f0..9e951db774 100644 --- a/app/Livewire/Project/Database/Mariadb/General.php +++ b/app/Livewire/Project/Database/Mariadb/General.php @@ -151,6 +151,7 @@ class General extends Component $this->database->is_log_drain_enabled = $this->isLogDrainEnabled; $this->database->custom_docker_run_options = $this->customDockerRunOptions; $this->database->save(); + $this->dispatch('name-changed', uuid: $this->database->uuid, name: $this->database->name); } else { $this->name = $this->database->name; $this->description = $this->database->description; diff --git a/app/Livewire/Project/Database/Mongodb/General.php b/app/Livewire/Project/Database/Mongodb/General.php index 02357a5581..3943512636 100644 --- a/app/Livewire/Project/Database/Mongodb/General.php +++ b/app/Livewire/Project/Database/Mongodb/General.php @@ -143,6 +143,7 @@ class General extends Component $this->database->is_log_drain_enabled = $this->isLogDrainEnabled; $this->database->custom_docker_run_options = $this->customDockerRunOptions; $this->database->save(); + $this->dispatch('name-changed', uuid: $this->database->uuid, name: $this->database->name); } else { $this->name = $this->database->name; $this->description = $this->database->description; diff --git a/app/Livewire/Project/Database/Mysql/General.php b/app/Livewire/Project/Database/Mysql/General.php index fd3abfc218..f05f9b8410 100644 --- a/app/Livewire/Project/Database/Mysql/General.php +++ b/app/Livewire/Project/Database/Mysql/General.php @@ -151,6 +151,7 @@ class General extends Component $this->database->is_log_drain_enabled = $this->isLogDrainEnabled; $this->database->custom_docker_run_options = $this->customDockerRunOptions; $this->database->save(); + $this->dispatch('name-changed', uuid: $this->database->uuid, name: $this->database->name); } else { $this->name = $this->database->name; $this->description = $this->database->description; diff --git a/app/Livewire/Project/Database/Postgresql/General.php b/app/Livewire/Project/Database/Postgresql/General.php index 30e03d7630..f5844d93d1 100644 --- a/app/Livewire/Project/Database/Postgresql/General.php +++ b/app/Livewire/Project/Database/Postgresql/General.php @@ -167,6 +167,7 @@ class General extends Component $this->database->is_log_drain_enabled = $this->isLogDrainEnabled; $this->database->custom_docker_run_options = $this->customDockerRunOptions; $this->database->save(); + $this->dispatch('name-changed', uuid: $this->database->uuid, name: $this->database->name); } else { $this->name = $this->database->name; $this->description = $this->database->description; diff --git a/app/Livewire/Project/Database/Redis/General.php b/app/Livewire/Project/Database/Redis/General.php index 5c96bef77a..f744f8eed6 100644 --- a/app/Livewire/Project/Database/Redis/General.php +++ b/app/Livewire/Project/Database/Redis/General.php @@ -144,6 +144,7 @@ class General extends Component $this->database->is_log_drain_enabled = $this->isLogDrainEnabled; $this->database->custom_docker_run_options = $this->customDockerRunOptions; $this->database->save(); + $this->dispatch('name-changed', uuid: $this->database->uuid, name: $this->database->name); } else { $this->name = $this->database->name; $this->description = $this->database->description; diff --git a/app/Livewire/Project/Database/Sqlite/General.php b/app/Livewire/Project/Database/Sqlite/General.php index 59e05363d3..cd1d578554 100644 --- a/app/Livewire/Project/Database/Sqlite/General.php +++ b/app/Livewire/Project/Database/Sqlite/General.php @@ -81,6 +81,7 @@ class General extends Component $this->database->custom_docker_run_options = $this->customDockerRunOptions; $this->database->is_log_drain_enabled = $this->isLogDrainEnabled; $this->database->save(); + $this->dispatch('name-changed', uuid: $this->database->uuid, name: $this->database->name); } else { $this->name = $this->database->name; $this->description = $this->database->description; diff --git a/app/Livewire/Project/Edit.php b/app/Livewire/Project/Edit.php index 0d42c71e94..a22d7d8115 100644 --- a/app/Livewire/Project/Edit.php +++ b/app/Livewire/Project/Edit.php @@ -85,6 +85,7 @@ class Edit extends Component 'name' => $this->name, 'description' => $this->description, ]); + $this->dispatch('name-changed', uuid: $this->project->uuid, name: $this->project->name); } else { $this->name = $this->project->name; $this->description = $this->project->description; diff --git a/app/Livewire/Project/Service/StackForm.php b/app/Livewire/Project/Service/StackForm.php index 9247049d6d..cc6a994b36 100644 --- a/app/Livewire/Project/Service/StackForm.php +++ b/app/Livewire/Project/Service/StackForm.php @@ -199,6 +199,7 @@ class StackForm extends Component // Refresh and write files after a successful commit $this->service->refresh(); $this->service->saveComposeConfigs(); + $this->dispatch('name-changed', uuid: $this->service->uuid, name: $this->service->name); $this->dispatch('refreshEnvs')->to(EditCompose::class); $this->dispatch('refreshEnvs')->to(All::class); diff --git a/app/Livewire/Source/Gitea/Change.php b/app/Livewire/Source/Gitea/Change.php index 5980ed3fbf..6db104020e 100644 --- a/app/Livewire/Source/Gitea/Change.php +++ b/app/Livewire/Source/Gitea/Change.php @@ -282,6 +282,7 @@ class Change extends Component $this->syncData(true); $this->gitea_app->save(); $this->dispatch('success', 'Gitea App updated.'); + $this->dispatch('name-changed', uuid: $this->gitea_app->uuid, name: $this->gitea_app->name); } catch (\Throwable $e) { return handleError($e, $this); } diff --git a/app/Livewire/Source/Github/Change.php b/app/Livewire/Source/Github/Change.php index 5ec577f2e4..60d65804e2 100644 --- a/app/Livewire/Source/Github/Change.php +++ b/app/Livewire/Source/Github/Change.php @@ -431,6 +431,7 @@ class Change extends Component $this->syncData(true); $this->github_app->save(); $this->isConnected = $this->github_app->isConnected(); + $this->dispatch('name-changed', uuid: $this->github_app->uuid, name: $this->github_app->name); $this->dispatch('success', 'Github App updated.'); } catch (ValidationException $e) { throw $e; diff --git a/app/Livewire/Source/Gitlab/Change.php b/app/Livewire/Source/Gitlab/Change.php index a7ff5b47e8..d599c40257 100644 --- a/app/Livewire/Source/Gitlab/Change.php +++ b/app/Livewire/Source/Gitlab/Change.php @@ -282,6 +282,7 @@ class Change extends Component $this->syncData(true); $this->gitlab_app->save(); $this->dispatch('success', 'GitLab App updated.'); + $this->dispatch('name-changed', uuid: $this->gitlab_app->uuid, name: $this->gitlab_app->name); } catch (\Throwable $e) { return handleError($e, $this); } diff --git a/app/Livewire/Storage/Form.php b/app/Livewire/Storage/Form.php index 6cd161306e..3a80c4348f 100644 --- a/app/Livewire/Storage/Form.php +++ b/app/Livewire/Storage/Form.php @@ -195,6 +195,7 @@ class Form extends Component // Update local property to reflect success $this->isUsable = true; }); + $this->dispatch('name-changed', uuid: $this->storage->uuid, name: $this->storage->name); $this->dispatch('success', 'Storage settings updated and connection verified.'); } catch (\Throwable $e) { diff --git a/app/Livewire/SwitchTeam.php b/app/Livewire/SwitchTeam.php index 11d7141537..8e41db6f5c 100644 --- a/app/Livewire/SwitchTeam.php +++ b/app/Livewire/SwitchTeam.php @@ -9,7 +9,10 @@ class SwitchTeam extends Component { public string $selectedTeamId = 'default'; - protected $listeners = ['team-avatar-updated' => '$refresh']; + protected $listeners = [ + 'team-avatar-updated' => '$refresh', + 'team-updated' => '$refresh', + ]; public function mount() { diff --git a/app/Livewire/Team/Index.php b/app/Livewire/Team/Index.php index 62c03d57ed..e5b0e3e6fe 100644 --- a/app/Livewire/Team/Index.php +++ b/app/Livewire/Team/Index.php @@ -147,6 +147,7 @@ class Index extends Component $this->syncData(true); $this->team->save(); refreshSession(); + $this->dispatch('team-updated'); $this->dispatch('success', 'Team updated.'); } catch (\Throwable $e) { return handleError($e, $this); diff --git a/resources/views/components/breadcrumb-switcher.blade.php b/resources/views/components/breadcrumb-switcher.blade.php index 73c9bd8a1a..3f739544c0 100644 --- a/resources/views/components/breadcrumb-switcher.blade.php +++ b/resources/views/components/breadcrumb-switcher.blade.php @@ -1,4 +1,4 @@ -@props(['label', 'items', 'title']) +@props(['label', 'items', 'title', 'uuid' => null]) /
- {{ $label }} + {{ $label }} @@ -33,9 +34,10 @@
@foreach ($items as $item) - {{ $item['label'] }} + {{ $item['label'] }} @endforeach diff --git a/resources/views/components/top-breadcrumb.blade.php b/resources/views/components/top-breadcrumb.blade.php index 64bebc9381..2c5f66287c 100644 --- a/resources/views/components/top-breadcrumb.blade.php +++ b/resources/views/components/top-breadcrumb.blade.php @@ -39,6 +39,7 @@ ->sortBy(fn ($item) => strtolower($item['resource']->name)) ->map(fn ($item) => [ 'label' => $item['resource']->name, + 'uuid' => $item['resource']->uuid, 'href' => match ($item['type']) { 'application' => route('project.application.configuration', [ 'project_uuid' => $currentProject->uuid, @@ -107,6 +108,10 @@
+ x-init="syncTitle()" x-on:livewire:navigated.window="$nextTick(() => syncTitle())" + x-on:name-changed.window="renamed[$event.detail.uuid] = $event.detail.name"> {{-- Team --}}
@@ -129,8 +135,9 @@ @endif @if ($currentStorage) - @@ -151,8 +158,9 @@ ? filled($currentSource->installation_id) : filled($currentSource->access_token); @endphp - @@ -210,7 +219,8 @@
@@ -257,7 +267,7 @@ @endif @if ($currentResource) - + {{-- Below xl, the page heading shows the status. --}}