fixx meshcentral url
This commit is contained in:
parent
bd21d18c21
commit
2cdeed2165
|
|
@ -8,7 +8,6 @@ import { useGetClientFolderStatusForDevice } from "@/hooks/queries";
|
||||||
import type { ClientFolderStatus } from "@/types/folder";
|
import type { ClientFolderStatus } from "@/types/folder";
|
||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import { getRemoteDesktopUrl } from "@/services/remote-control.service";
|
import { getRemoteDesktopUrl } from "@/services/remote-control.service";
|
||||||
import { buildMeshProxyUrl } from "@/config/api";
|
|
||||||
import { toast } from "sonner";
|
import { toast } from "sonner";
|
||||||
export function ComputerCard({
|
export function ComputerCard({
|
||||||
device,
|
device,
|
||||||
|
|
@ -58,11 +57,7 @@ export function ComputerCard({
|
||||||
try {
|
try {
|
||||||
setIsConnecting(true);
|
setIsConnecting(true);
|
||||||
const response = await getRemoteDesktopUrl(device.id);
|
const response = await getRemoteDesktopUrl(device.id);
|
||||||
const originalUrl = new URL(response.url);
|
setProxyUrl(response.url);
|
||||||
const pathAndQuery = originalUrl.pathname + originalUrl.search;
|
|
||||||
const proxyUrlFull = buildMeshProxyUrl(pathAndQuery);
|
|
||||||
|
|
||||||
setProxyUrl(proxyUrlFull);
|
|
||||||
setShowRemote(true);
|
setShowRemote(true);
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
toast.error(
|
toast.error(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user