diff --git a/@xen-orchestra/lite/src/components/RemoteConsole.vue b/@xen-orchestra/lite/src/components/RemoteConsole.vue deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/@xen-orchestra/lite/src/views/host/HostConsoleView.vue b/@xen-orchestra/lite/src/views/host/HostConsoleView.vue index ecc9a45c273..5aa12e111d8 100644 --- a/@xen-orchestra/lite/src/views/host/HostConsoleView.vue +++ b/@xen-orchestra/lite/src/views/host/HostConsoleView.vue @@ -5,10 +5,7 @@ - + - + ) const consoleElement = ref() -const focused = ref(false) const sendCtrlAltDel = () => consoleElement.value?.sendCtrlAltDel() diff --git a/@xen-orchestra/web-core/lib/components/console/VtsRemoteConsole.vue b/@xen-orchestra/web-core/lib/components/console/VtsRemoteConsole.vue index 69795b45fc1..11ac7501990 100644 --- a/@xen-orchestra/web-core/lib/components/console/VtsRemoteConsole.vue +++ b/@xen-orchestra/web-core/lib/components/console/VtsRemoteConsole.vue @@ -85,7 +85,7 @@ async function createVncConnection() { vncClient.addEventListener('disconnect', handleDisconnectionEvent) vncClient.addEventListener('connect', handleConnectionEvent) const canvas = consoleContainer.value?.querySelector('canvas') as HTMLCanvasElement | null - if (canvas) { + if (canvas !== null) { canvas.addEventListener('focus', () => { canvas.classList.add('focused') }) diff --git a/@xen-orchestra/web/src/pages/host/[id]/console.vue b/@xen-orchestra/web/src/pages/host/[id]/console.vue index f43b21e3c9c..e9019092dec 100644 --- a/@xen-orchestra/web/src/pages/host/[id]/console.vue +++ b/@xen-orchestra/web/src/pages/host/[id]/console.vue @@ -1,7 +1,7 @@ {{ $t('power-on-host-for-console') }} - - + + @@ -18,7 +18,7 @@ import VtsClipboardConsole from '@core/components/console/VtsClipboardConsole.vu import VtsLayoutConsole from '@core/components/console/VtsLayoutConsole.vue' import VtsRemoteConsole from '@core/components/console/VtsRemoteConsole.vue' import VtsDivider from '@core/components/divider/VtsDivider.vue' -import { computed, ref } from 'vue' +import { computed } from 'vue' const props = defineProps<{ host: XoHost @@ -28,8 +28,6 @@ const { isHostOperationPending } = useHostStore().subscribe() const STOP_OPERATIONS = [HOST_OPERATION.SHUTDOWN, HOST_OPERATION.REBOOT] -const focused = ref(false) - const url = computed( () => new URL(`/api/consoles/${props.host.controlDomain}`, window.location.origin.replace(/^http/, 'ws')) ) diff --git a/@xen-orchestra/web/src/pages/vm/[id]/console.vue b/@xen-orchestra/web/src/pages/vm/[id]/console.vue index 6c604b304b4..f68d9707b91 100644 --- a/@xen-orchestra/web/src/pages/vm/[id]/console.vue +++ b/@xen-orchestra/web/src/pages/vm/[id]/console.vue @@ -1,7 +1,7 @@ {{ $t('power-on-vm-for-console') }} - - + + @@ -19,7 +19,7 @@ import VtsClipboardConsole from '@core/components/console/VtsClipboardConsole.vu import VtsLayoutConsole from '@core/components/console/VtsLayoutConsole.vue' import VtsRemoteConsole from '@core/components/console/VtsRemoteConsole.vue' import VtsDivider from '@core/components/divider/VtsDivider.vue' -import { computed, ref } from 'vue' +import { computed } from 'vue' const props = defineProps<{ vm: XoVm @@ -37,8 +37,6 @@ const STOP_OPERATIONS = [ VM_OPERATION.SUSPEND, ] -const focused = ref(false) - const url = computed(() => new URL(`/api/consoles/${props.vm.id}`, window.location.origin.replace(/^http/, 'ws'))) const isVmConsoleRunning = computed(() => props.vm.power_state === 'Running' && props.vm.other.disable_pv_vnc !== '1')
{{ $t('power-on-host-for-console') }}
{{ $t('power-on-vm-for-console') }}