Skip to content

Commit 59d2c97

Browse files
committed
fix: make sure to reload window if app status changes
1 parent bd2e1ad commit 59d2c97

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

app/Livewire/Project/Shared/Terminal.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,20 @@
99

1010
class Terminal extends Component
1111
{
12+
public function getListeners()
13+
{
14+
$teamId = auth()->user()->currentTeam()->id;
15+
16+
return [
17+
"echo-private:team.{$teamId},ApplicationStatusChanged" => 'closeTerminal',
18+
];
19+
}
20+
21+
public function closeTerminal()
22+
{
23+
$this->dispatch('reloadWindow');
24+
}
25+
1226
#[On('send-terminal-command')]
1327
public function sendTerminalCommand($isContainer, $identifier, $serverUuid)
1428
{

0 commit comments

Comments
 (0)