fix(server): implement refreshServer method and update navbar event listener for improved server state management
This commit is contained in:
@@ -32,7 +32,7 @@ class Navbar extends Component
|
|||||||
$teamId = auth()->user()->currentTeam()->id;
|
$teamId = auth()->user()->currentTeam()->id;
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'refreshServerShow' => '$refresh',
|
'refreshServerShow' => 'refreshServer',
|
||||||
"echo-private:team.{$teamId},ProxyStatusChangedUI" => 'showNotification',
|
"echo-private:team.{$teamId},ProxyStatusChangedUI" => 'showNotification',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@@ -134,6 +134,12 @@ class Navbar extends Component
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function refreshServer()
|
||||||
|
{
|
||||||
|
$this->server->refresh();
|
||||||
|
$this->server->load('settings');
|
||||||
|
}
|
||||||
|
|
||||||
public function render()
|
public function render()
|
||||||
{
|
{
|
||||||
return view('livewire.server.navbar');
|
return view('livewire.server.navbar');
|
||||||
|
@@ -310,6 +310,8 @@ class Show extends Component
|
|||||||
$this->dispatch('info', 'Sentinel has been disabled as build servers cannot run Sentinel.');
|
$this->dispatch('info', 'Sentinel has been disabled as build servers cannot run Sentinel.');
|
||||||
}
|
}
|
||||||
$this->submit();
|
$this->submit();
|
||||||
|
// Dispatch event to refresh the navbar
|
||||||
|
$this->dispatch('refreshServerShow');
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
return handleError($e, $this);
|
return handleError($e, $this);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user