mirror of
https://github.com/fosrl/pangolin.git
synced 2026-05-26 18:52:41 +00:00
Clean up types
This commit is contained in:
@@ -14,6 +14,7 @@ import type {
|
|||||||
RdpFileTransferProvider,
|
RdpFileTransferProvider,
|
||||||
FileInfo
|
FileInfo
|
||||||
} from "@devolutions/iron-remote-desktop-rdp/dist";
|
} from "@devolutions/iron-remote-desktop-rdp/dist";
|
||||||
|
import { GetBrowserTargetResponse } from "@server/routers/resource";
|
||||||
|
|
||||||
declare module "react" {
|
declare module "react" {
|
||||||
namespace JSX {
|
namespace JSX {
|
||||||
@@ -31,12 +32,6 @@ declare module "react" {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
type Target = {
|
|
||||||
ip: string;
|
|
||||||
port: number;
|
|
||||||
authToken: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
type FormState = {
|
type FormState = {
|
||||||
username: string;
|
username: string;
|
||||||
password: string;
|
password: string;
|
||||||
@@ -59,7 +54,7 @@ export default function RdpClient({
|
|||||||
target,
|
target,
|
||||||
error
|
error
|
||||||
}: {
|
}: {
|
||||||
target: Target | null;
|
target: GetBrowserTargetResponse | null;
|
||||||
error: string | null;
|
error: string | null;
|
||||||
}) {
|
}) {
|
||||||
const STORAGE_KEY = "pangolin_rdp_credentials";
|
const STORAGE_KEY = "pangolin_rdp_credentials";
|
||||||
|
|||||||
@@ -5,12 +5,7 @@ import { Button } from "@/components/ui/button";
|
|||||||
import { Input } from "@/components/ui/input";
|
import { Input } from "@/components/ui/input";
|
||||||
import { Label } from "@/components/ui/label";
|
import { Label } from "@/components/ui/label";
|
||||||
import { toast } from "@app/hooks/useToast";
|
import { toast } from "@app/hooks/useToast";
|
||||||
|
import { GetBrowserTargetResponse } from "@server/routers/resource";
|
||||||
type Target = {
|
|
||||||
ip: string;
|
|
||||||
port: number;
|
|
||||||
authToken: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
type FormState = {
|
type FormState = {
|
||||||
password: string;
|
password: string;
|
||||||
@@ -20,7 +15,7 @@ export default function VncClient({
|
|||||||
target,
|
target,
|
||||||
error
|
error
|
||||||
}: {
|
}: {
|
||||||
target: Target | null;
|
target: GetBrowserTargetResponse | null;
|
||||||
error: string | null;
|
error: string | null;
|
||||||
}) {
|
}) {
|
||||||
const STORAGE_KEY = "pangolin_vnc_credentials";
|
const STORAGE_KEY = "pangolin_vnc_credentials";
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ export default async function VncPage() {
|
|||||||
const host = headersList.get("host") || "";
|
const host = headersList.get("host") || "";
|
||||||
const hostname = host.split(":")[0];
|
const hostname = host.split(":")[0];
|
||||||
|
|
||||||
let target: { ip: string; port: number; authToken: string } | null = null;
|
let target: GetBrowserTargetResponse | null = null;
|
||||||
let error: string | null = null;
|
let error: string | null = null;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user