mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-30 07:05:24 +00:00
fix: remote desktop tabs reconnecting on every tab switch
This commit is contained in:
1 parent
e4ffebb69c
commit
7dbdf36557
2 files changed
+4
-3
No files matched your search
@@ -320,6 +320,7 @@ export interface TabHandle {
|
|||||||
isConnected?: () => boolean;
|
isConnected?: () => boolean;
|
||||||
sendInput?: (data: string) => void;
|
sendInput?: (data: string) => void;
|
||||||
paste?: (text: string) => void;
|
paste?: (text: string) => void;
|
||||||
|
/** Repaint only. The shell calls it every time the tab becomes active. */
|
||||||
refresh?: () => void;
|
refresh?: () => void;
|
||||||
notifyResize?: () => void;
|
notifyResize?: () => void;
|
||||||
[key: string]: unknown;
|
[key: string]: unknown;
|
||||||
|
|||||||
@@ -108,8 +108,8 @@ function savedHostConfig(
|
|||||||
export interface GuacamoleAppHandle {
|
export interface GuacamoleAppHandle {
|
||||||
disconnect: () => void;
|
disconnect: () => void;
|
||||||
isConnected: () => boolean;
|
isConnected: () => boolean;
|
||||||
/** Reconnects, from the tab bar's refresh. */
|
/** The tab bar's refresh. The shell calls `refresh` on every tab switch. */
|
||||||
refresh: () => void;
|
reconnect: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
const GuacamoleApp = React.forwardRef<GuacamoleAppHandle, GuacamoleAppProps>(
|
const GuacamoleApp = React.forwardRef<GuacamoleAppHandle, GuacamoleAppProps>(
|
||||||
@@ -290,7 +290,7 @@ const GuacamoleAppInner = React.forwardRef<
|
|||||||
useImperativeHandle(ref, () => ({
|
useImperativeHandle(ref, () => ({
|
||||||
disconnect: () => displayRef.current?.disconnect(),
|
disconnect: () => displayRef.current?.disconnect(),
|
||||||
isConnected: () => displayRef.current?.isConnected() === true,
|
isConnected: () => displayRef.current?.isConnected() === true,
|
||||||
refresh: () => reconnectRef.current(),
|
reconnect: () => reconnectRef.current(),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const fetchToken = useCallback(async (): Promise<void> => {
|
const fetchToken = useCallback(async (): Promise<void> => {
|
||||||
|
|||||||
Reference in new issue
Block a user