GUACAMOLE-1402: Use new Client state enum in webapp.

This commit is contained in:
Virtually Nick
2021-12-27 09:27:07 -05:00
parent e35f3bbd63
commit 9fe64a77b8

View File

@@ -427,25 +427,25 @@ angular.module('client').factory('ManagedClient', ['$rootScope', '$injector',
switch (clientState) { switch (clientState) {
// Idle // Idle
case 0: case Guacamole.Client.State.IDLE:
ManagedClientState.setConnectionState(managedClient.clientState, ManagedClientState.setConnectionState(managedClient.clientState,
ManagedClientState.ConnectionState.IDLE); ManagedClientState.ConnectionState.IDLE);
break; break;
// Connecting // Connecting
case 1: case Guacamole.Client.State.CONNECTING:
ManagedClientState.setConnectionState(managedClient.clientState, ManagedClientState.setConnectionState(managedClient.clientState,
ManagedClientState.ConnectionState.CONNECTING); ManagedClientState.ConnectionState.CONNECTING);
break; break;
// Connected + waiting // Connected + waiting
case 2: case Guacamole.Client.State.WAITING:
ManagedClientState.setConnectionState(managedClient.clientState, ManagedClientState.setConnectionState(managedClient.clientState,
ManagedClientState.ConnectionState.WAITING); ManagedClientState.ConnectionState.WAITING);
break; break;
// Connected // Connected
case 3: case Guacamole.Client.State.CONNECTED:
ManagedClientState.setConnectionState(managedClient.clientState, ManagedClientState.setConnectionState(managedClient.clientState,
ManagedClientState.ConnectionState.CONNECTED); ManagedClientState.ConnectionState.CONNECTED);
@@ -461,9 +461,9 @@ angular.module('client').factory('ManagedClient', ['$rootScope', '$injector',
ManagedClient.updateThumbnail(managedClient); ManagedClient.updateThumbnail(managedClient);
break; break;
// Update history when disconnecting // Update history during disconnect phases
case 4: // Disconnecting case Guacamole.Client.State.DISCONNECTING:
case 5: // Disconnected case Guacamole.Client.State.DISCONNECTED:
ManagedClient.updateThumbnail(managedClient); ManagedClient.updateThumbnail(managedClient);
break; break;