[fix] building errors
This commit is contained in:
@@ -1,21 +1,16 @@
|
|||||||
"use client"
|
"use client"
|
||||||
import { Card, CardBody, CardHeader, CardIcon, CardTool } from "@/components/window/Card"
|
import {
|
||||||
|
Card,
|
||||||
|
CardBody,
|
||||||
|
CardHeader,
|
||||||
|
CardIcon,
|
||||||
|
CardTool,
|
||||||
|
} from "@/components/window/Card"
|
||||||
import { ToolButton } from "@/components/window/ToolButton"
|
import { ToolButton } from "@/components/window/ToolButton"
|
||||||
import { Chip } from "@heroui/react"
|
import { Chip } from "@heroui/react"
|
||||||
import { SettingConfig, Refresh, UploadOne, HardDisk } from "@icon-park/react"
|
import { Refresh, SettingConfig } from "@icon-park/react"
|
||||||
import { useState, useEffect } from "react"
|
import { useEffect, useState } from "react"
|
||||||
import {
|
import { type AllSystemInfo, allSysInfo } from "tauri-plugin-system-info-api"
|
||||||
allSysInfo,
|
|
||||||
memoryInfo,
|
|
||||||
cpuInfo,
|
|
||||||
AllSystemInfo,
|
|
||||||
StaticInfo,
|
|
||||||
MemoryInfo,
|
|
||||||
CpuInfo,
|
|
||||||
Batteries,
|
|
||||||
batteries,
|
|
||||||
staticInfo,
|
|
||||||
} from "tauri-plugin-system-info-api"
|
|
||||||
export default function Page() {
|
export default function Page() {
|
||||||
return (
|
return (
|
||||||
<Card className="h-full">
|
<Card className="h-full">
|
||||||
@@ -59,7 +54,7 @@ function HardwareInfo() {
|
|||||||
// console.log(await batteries())
|
// console.log(await batteries())
|
||||||
}
|
}
|
||||||
|
|
||||||
fetchData()
|
void fetchData()
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -70,8 +65,9 @@ function HardwareInfo() {
|
|||||||
系统: {allSysData?.name} {allSysData?.os_version}
|
系统: {allSysData?.name} {allSysData?.os_version}
|
||||||
</Chip>
|
</Chip>
|
||||||
<Chip>
|
<Chip>
|
||||||
内存:{allSysData?.total_memory &&
|
内存:
|
||||||
(allSysData?.total_memory / 1024 / 1024 / 1024).toFixed(0) + "GB"}
|
{allSysData?.total_memory &&
|
||||||
|
`${(allSysData.total_memory / 1024 / 1024 / 1024).toFixed(0)}GB`}
|
||||||
</Chip>
|
</Chip>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -21,7 +21,9 @@ const Card = ({ children }: CardProps) => {
|
|||||||
|
|
||||||
const CardHeader = ({ children }: CardProps) => {
|
const CardHeader = ({ children }: CardProps) => {
|
||||||
return (
|
return (
|
||||||
<div className="flex items-center gap-1.5 tracking-wide select-none">{children}</div>
|
<div className="flex items-center gap-1.5 tracking-wide select-none">
|
||||||
|
{children}
|
||||||
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user