mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-11-18 11:36:17 +00:00
Update virtual-machines.tsx
This commit is contained in:
@@ -179,11 +179,11 @@ const getModalProgressColor = (percent: number): string => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const getOSIcon = (osInfo: VMDetails["os_info"] | undefined, vmType: string): React.ReactNode => {
|
const getOSIcon = (osInfo: VMDetails["os_info"] | undefined, vmType: string): React.ReactNode => {
|
||||||
if (vmType !== "lxc") {
|
if (vmType !== "lxc" || !osInfo?.id) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
const osId = osInfo?.id?.toLowerCase()
|
const osId = osInfo.id.toLowerCase()
|
||||||
|
|
||||||
switch (osId) {
|
switch (osId) {
|
||||||
case "debian":
|
case "debian":
|
||||||
@@ -195,7 +195,7 @@ const getOSIcon = (osInfo: VMDetails["os_info"] | undefined, vmType: string): Re
|
|||||||
case "arch":
|
case "arch":
|
||||||
return <img src="/icons/arch.svg" alt="Arch" className="h-16 w-16" />
|
return <img src="/icons/arch.svg" alt="Arch" className="h-16 w-16" />
|
||||||
default:
|
default:
|
||||||
return <Container className="h-16 w-16 text-cyan-500" />
|
return null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -283,7 +283,7 @@ export function VirtualMachines() {
|
|||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
},
|
},
|
||||||
body: JSON.stringify({ action }),
|
body: JSON.JSON.stringify({ action }),
|
||||||
})
|
})
|
||||||
|
|
||||||
if (response.ok) {
|
if (response.ok) {
|
||||||
|
|||||||
Reference in New Issue
Block a user