mirror of
https://github.com/immense/Remotely.git
synced 2025-10-26 11:27:15 +00:00
Add unauthorized message event.
This commit is contained in:
parent
20ad3bd0b3
commit
135ad17fbf
@ -217,6 +217,10 @@ namespace Remotely.Server.Services
|
||||
{
|
||||
return RCDeviceHub.Clients.Client(screenCasterID).SendAsync("GetScreenCast", Context.ConnectionId, requesterName);
|
||||
}
|
||||
else
|
||||
{
|
||||
return Clients.Caller.SendAsync("Unauthorized");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -158,6 +158,12 @@ export class RCBrowserSockets {
|
||||
UI.ShowMessage("Connection failed. Please reconnect.");
|
||||
this.Connection.stop();
|
||||
});
|
||||
hubConnection.on("Unauthorized", () => {
|
||||
UI.ConnectButton.removeAttribute("disabled");
|
||||
UI.StatusMessage.innerHTML = "Authorization failed.";
|
||||
UI.ShowMessage("Authorization failed.");
|
||||
this.Connection.stop();
|
||||
});
|
||||
hubConnection.on("ViewerRemoved", () => {
|
||||
UI.ConnectButton.removeAttribute("disabled");
|
||||
UI.StatusMessage.innerHTML = "The session was stopped by your partner.";
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -176,6 +176,12 @@ export class RCBrowserSockets {
|
||||
UI.ShowMessage("Connection failed. Please reconnect.");
|
||||
this.Connection.stop();
|
||||
});
|
||||
hubConnection.on("Unauthorized", () => {
|
||||
UI.ConnectButton.removeAttribute("disabled");
|
||||
UI.StatusMessage.innerHTML = "Authorization failed.";
|
||||
UI.ShowMessage("Authorization failed.");
|
||||
this.Connection.stop();
|
||||
});
|
||||
hubConnection.on("ViewerRemoved", () => {
|
||||
UI.ConnectButton.removeAttribute("disabled");
|
||||
UI.StatusMessage.innerHTML = "The session was stopped by your partner.";
|
||||
|
||||
@ -432,6 +432,7 @@ export function UpdateCursor(imageBytes, hotSpotX, hotSpotY, cssOverride) {
|
||||
var base64 = ConvertUInt8ArrayToBase64(imageBytes);
|
||||
ScreenViewer.style.cursor = `url('data:image/png;base64,${base64}') ${hotSpotX} ${hotSpotY}, default`;
|
||||
}
|
||||
console.log("Cursor updated: " + ScreenViewer.style.cursor);
|
||||
}
|
||||
export function UpdateDisplays(selectedDisplay, displayNames) {
|
||||
ScreenSelectBar.innerHTML = "";
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -478,6 +478,7 @@ export function UpdateCursor(imageBytes: Uint8Array, hotSpotX: number, hotSpotY:
|
||||
var base64 = ConvertUInt8ArrayToBase64(imageBytes);
|
||||
ScreenViewer.style.cursor = `url('data:image/png;base64,${base64}') ${hotSpotX} ${hotSpotY}, default`;
|
||||
}
|
||||
console.log("Cursor updated: " + ScreenViewer.style.cursor);
|
||||
}
|
||||
|
||||
export function UpdateDisplays(selectedDisplay: string, displayNames: string[]) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user