Some minor fixes
This commit is contained in:
parent
d0a71ec718
commit
df0ddbfa60
@ -2,8 +2,8 @@ import {AbstractExternalModalController} from "tc-shared/ui/react-elements/exter
|
|||||||
import {Popout2ControllerMessages, PopoutIPCMessage} from "tc-shared/ui/react-elements/external-modal/IPCMessage";
|
import {Popout2ControllerMessages, PopoutIPCMessage} from "tc-shared/ui/react-elements/external-modal/IPCMessage";
|
||||||
import {ExternalModal, kIPCChannelExternalModal} from "../shared/ipc/ExternalModal";
|
import {ExternalModal, kIPCChannelExternalModal} from "../shared/ipc/ExternalModal";
|
||||||
import {ObjectProxyClient} from "../shared/proxy/Client";
|
import {ObjectProxyClient} from "../shared/proxy/Client";
|
||||||
import * as ipc from "tc-shared/ipc/BrowserIPC";
|
|
||||||
import {ProxiedClass} from "../shared/proxy/Definitions";
|
import {ProxiedClass} from "../shared/proxy/Definitions";
|
||||||
|
import {getIpcInstance} from "tc-shared/ipc/BrowserIPC";
|
||||||
|
|
||||||
const modalClient = new ObjectProxyClient<ExternalModal>(kIPCChannelExternalModal);
|
const modalClient = new ObjectProxyClient<ExternalModal>(kIPCChannelExternalModal);
|
||||||
modalClient.initialize();
|
modalClient.initialize();
|
||||||
@ -25,7 +25,7 @@ export class ExternalModalController extends AbstractExternalModalController {
|
|||||||
"chunk": "modal-external",
|
"chunk": "modal-external",
|
||||||
"modal-target": this.modalType,
|
"modal-target": this.modalType,
|
||||||
"ipc-channel": this.ipcChannel.channelId,
|
"ipc-channel": this.ipcChannel.channelId,
|
||||||
"ipc-address": ipc.getInstance().getLocalAddress(),
|
"ipc-address": getIpcInstance().getLocalAddress(),
|
||||||
"loader-abort": 0,
|
"loader-abort": 0,
|
||||||
"animation-short": 1
|
"animation-short": 1
|
||||||
};
|
};
|
||||||
|
@ -7,7 +7,7 @@ const SETTINGS_DIR = path.join(APP_DATA, "settings");
|
|||||||
|
|
||||||
let _local_storage: {[key: string]: any} = {};
|
let _local_storage: {[key: string]: any} = {};
|
||||||
let _local_storage_save: {[key: string]: boolean} = {};
|
let _local_storage_save: {[key: string]: boolean} = {};
|
||||||
let _save_timer: NodeJS.Timer;
|
let _save_timer: number;
|
||||||
|
|
||||||
export async function initialize() {
|
export async function initialize() {
|
||||||
await fs.mkdirp(SETTINGS_DIR);
|
await fs.mkdirp(SETTINGS_DIR);
|
||||||
|
@ -141,7 +141,7 @@ function initializeConnection(connection: ConnectionHandler) {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
eventListener.push(connection.events().on("notify_connection_state_changed", event => {
|
eventListener.push(connection.events().on("notify_connection_state_changed", event => {
|
||||||
showClientStatus = event.new_state === ConnectionState.CONNECTED;
|
showClientStatus = event.newState === ConnectionState.CONNECTED;
|
||||||
updateTray();
|
updateTray();
|
||||||
updateContextMenu();
|
updateContextMenu();
|
||||||
}));
|
}));
|
||||||
|
@ -2,7 +2,7 @@ import {AbstractCommandHandler, AbstractCommandHandlerBoss} from "tc-shared/conn
|
|||||||
import {
|
import {
|
||||||
AbstractServerConnection,
|
AbstractServerConnection,
|
||||||
CommandOptionDefaults,
|
CommandOptionDefaults,
|
||||||
CommandOptions,
|
CommandOptions, ConnectionPing,
|
||||||
ConnectionStatistics,
|
ConnectionStatistics,
|
||||||
ServerCommand
|
ServerCommand
|
||||||
} from "tc-shared/connection/ConnectionBase";
|
} from "tc-shared/connection/ConnectionBase";
|
||||||
@ -360,9 +360,10 @@ export class ServerConnection extends AbstractServerConnection {
|
|||||||
return this.defaultCommandHandler.proxy_command_promise(promise, options);
|
return this.defaultCommandHandler.proxy_command_promise(promise, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
ping(): { native: number; javascript?: number } {
|
ping(): ConnectionPing {
|
||||||
return {
|
return {
|
||||||
native: this.nativeHandle ? (this.nativeHandle.current_ping() / 1000) : -2
|
native: this.nativeHandle ? (this.nativeHandle.current_ping() / 1000) : -2,
|
||||||
|
javascript: undefined
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,6 +57,8 @@ class NativeVideoDriver extends WebVideoDriver {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const name = this.currentScreenCaptureDevices.find(e => e.id === id)?.name || tr("Screen device");
|
const name = this.currentScreenCaptureDevices.find(e => e.id === id)?.name || tr("Screen device");
|
||||||
return new WebVideoSource(id, name, result);
|
const source = new WebVideoSource(id, name, result);
|
||||||
|
await source.applyDefaultResolution();
|
||||||
|
return source;
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user