mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-13 22:15:35 +00:00
fix(livewire): stop broadcast handlers from wiping in-progress form input
This commit is contained in:
1 parent
65c0c92c02
commit
b9f773c1d9
18 files changed
+470
-247
No files matched your search
@@ -74,13 +74,24 @@ class General extends Component
|
||||
$teamId = Auth::user()->currentTeam()->id;
|
||||
|
||||
return [
|
||||
"echo-private:user.{$userId},DatabaseStatusChanged" => 'refresh',
|
||||
"echo-private:team.{$teamId},ServiceChecked" => 'refresh',
|
||||
// Broadcasts go to refreshStatus, which only writes display-only properties.
|
||||
// Never wire status broadcasts to a handler that touches text-input properties —
|
||||
// it clobbers in-progress typing every 10s. See coolify#6062 / #6354 / #9695.
|
||||
"echo-private:user.{$userId},DatabaseStatusChanged" => 'refreshStatus',
|
||||
"echo-private:team.{$teamId},ServiceChecked" => 'refreshStatus',
|
||||
'save_init_script',
|
||||
'delete_init_script',
|
||||
];
|
||||
}
|
||||
|
||||
public function refreshStatus(): void
|
||||
{
|
||||
$this->database->refresh();
|
||||
$this->db_url = $this->database->internal_db_url;
|
||||
$this->db_url_public = $this->database->external_db_url;
|
||||
$this->certificateValidUntil = $this->database->sslCertificates()->first()?->valid_until;
|
||||
}
|
||||
|
||||
protected function rules(): array
|
||||
{
|
||||
return [
|
||||
|
||||
Reference in new issue
Block a user