1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-21 07:01:19 -04:00

moved novnc types to external repo

https://github.com/jakejarvis/novnc-types
This commit is contained in:
2022-06-14 16:48:04 -04:00
parent 3ad57d4f34
commit 6847abdbe0
5 changed files with 22 additions and 344 deletions

View File

@@ -1,12 +1,9 @@
import { useRef, useEffect, useState, memo } from "react";
import { useRouter } from "next/router";
import RFB from "@novnc/novnc/core/rfb.js";
import RFB from "@novnc/novnc/core/rfb";
import Terminal from "../Terminal";
import { styled } from "../../lib/styles/stitches.config";
// types for @novnc/novnc are defined manually in ../../types/rfb.d.ts:
import type NoVncClient from "@novnc/novnc/core/rfb.js";
const Display = styled(
"div",
{
@@ -57,7 +54,7 @@ const VNC = ({ server }: VNCProps) => {
const [message, setMessage] = useState({ message: "", anyKey: false });
// the actual connection and virtual screen (injected by noVNC when it's ready)
const rfbRef = useRef<NoVncClient>();
const rfbRef = useRef<RFB>();
const screenRef = useRef<HTMLDivElement>(null);
// ends the session forcefully