fix: add viewport

This commit is contained in:
hamster1963 2024-09-19 11:42:38 +08:00
parent 28cf159596
commit ead656bc1e
6 changed files with 50 additions and 46 deletions

View File

@ -14,7 +14,7 @@ export default function Footer() {
</p> </p>
<section className="mt-1 flex items-center gap-2 text-[13px] font-light tracking-tight text-neutral-600/50 dark:text-neutral-300/50"> <section className="mt-1 flex items-center gap-2 text-[13px] font-light tracking-tight text-neutral-600/50 dark:text-neutral-300/50">
© 2020-{new Date().getFullYear()}{" "} © 2020-{new Date().getFullYear()}{" "}
<a href={"https://github.com/hamster1963"}>@Hamster1963</a> <a href={"https://buycoffee.top"}>@Hamster1963</a>
</section> </section>
</section> </section>
</footer> </footer>

View File

@ -4,7 +4,7 @@ import type { Metadata } from "next";
import { Inter as FontSans } from "next/font/google"; import { Inter as FontSans } from "next/font/google";
import { ThemeProvider } from "next-themes"; import { ThemeProvider } from "next-themes";
import React from "react"; import React from "react";
import { Viewport } from "next";
import { cn } from "@/lib/utils"; import { cn } from "@/lib/utils";
const fontSans = FontSans({ const fontSans = FontSans({
@ -23,6 +23,13 @@ export const metadata: Metadata = {
}, },
}; };
export const viewport: Viewport = {
width: "device-width",
initialScale: 1,
maximumScale: 1,
userScalable: false,
};
interface RootLayoutProps { interface RootLayoutProps {
children: React.ReactNode; children: React.ReactNode;
} }

BIN
bun.lockb

Binary file not shown.

View File

@ -56,38 +56,35 @@ export default function ServerCard({
<section className={"grid grid-cols-5 items-center gap-3"}> <section className={"grid grid-cols-5 items-center gap-3"}>
<div className={"flex flex-col"}> <div className={"flex flex-col"}>
<p className="text-xs text-muted-foreground">CPU</p> <p className="text-xs text-muted-foreground">CPU</p>
<div className="text-xs font-semibold flex items-center"> <div className="flex items-center text-xs font-semibold">
{cpu.toFixed(2)} {cpu.toFixed(2)}%
%
</div> </div>
<ServerUsageBar value={cpu} /> <ServerUsageBar value={cpu} />
</div> </div>
<div className={"flex flex-col"}> <div className={"flex flex-col"}>
<p className="text-xs text-muted-foreground">Mem</p> <p className="text-xs text-muted-foreground">Mem</p>
<div className="text-xs font-semibold flex items-center"> <div className="flex items-center text-xs font-semibold">
{mem.toFixed(2)} {mem.toFixed(2)}%
%
</div> </div>
<ServerUsageBar value={mem} /> <ServerUsageBar value={mem} />
</div> </div>
<div className={"flex flex-col"}> <div className={"flex flex-col"}>
<p className="text-xs text-muted-foreground">STG</p> <p className="text-xs text-muted-foreground">STG</p>
<div className="text-xs font-semibold flex items-center"> <div className="flex items-center text-xs font-semibold">
{stg.toFixed(2)} {stg.toFixed(2)}%
%
</div> </div>
<ServerUsageBar value={stg} /> <ServerUsageBar value={stg} />
</div> </div>
<div className={"flex flex-col"}> <div className={"flex flex-col"}>
<p className="text-xs text-muted-foreground">Upload</p> <p className="text-xs text-muted-foreground">Upload</p>
<div className="text-xs font-semibold flex items-center"> <div className="flex items-center text-xs font-semibold">
{up.toFixed(2)} {up.toFixed(2)}
Mb/s Mb/s
</div> </div>
</div> </div>
<div className={"flex flex-col"}> <div className={"flex flex-col"}>
<p className="text-xs text-muted-foreground">Download</p> <p className="text-xs text-muted-foreground">Download</p>
<div className="text-xs font-semibold flex items-center"> <div className="flex items-center text-xs font-semibold">
{down.toFixed(2)} {down.toFixed(2)}
Mb/s Mb/s
</div> </div>

View File

@ -9,49 +9,49 @@
"build": "next build && cp -r .next/static .next/standalone/.next/ && cp -r public .next/standalone/" "build": "next build && cp -r .next/static .next/standalone/.next/ && cp -r public .next/standalone/"
}, },
"dependencies": { "dependencies": {
"@ducanh2912/next-pwa": "^10.2.6", "@ducanh2912/next-pwa": "^10.2.9",
"@radix-ui/react-dialog": "^1.0.5", "@radix-ui/react-dialog": "^1.1.1",
"@radix-ui/react-dropdown-menu": "^2.0.6", "@radix-ui/react-dropdown-menu": "^2.1.1",
"@radix-ui/react-navigation-menu": "^1.1.4", "@radix-ui/react-navigation-menu": "^1.2.0",
"@radix-ui/react-popover": "^1.1.1", "@radix-ui/react-popover": "^1.1.1",
"@radix-ui/react-progress": "^1.0.3", "@radix-ui/react-progress": "^1.1.0",
"@radix-ui/react-separator": "^1.1.0", "@radix-ui/react-separator": "^1.1.0",
"@radix-ui/react-slot": "^1.0.2", "@radix-ui/react-slot": "^1.1.0",
"@radix-ui/react-tooltip": "^1.0.7", "@radix-ui/react-tooltip": "^1.1.2",
"@types/luxon": "^3.4.2", "@types/luxon": "^3.4.2",
"@typescript-eslint/eslint-plugin": "^7.5.0", "@typescript-eslint/eslint-plugin": "^7.18.0",
"class-variance-authority": "^0.7.0", "class-variance-authority": "^0.7.0",
"clsx": "^2.1.0", "clsx": "^2.1.1",
"country-flag-icons": "^1.5.13", "country-flag-icons": "^1.5.13",
"eslint-plugin-simple-import-sort": "^12.0.0", "eslint-plugin-simple-import-sort": "^12.1.1",
"lucide-react": "^0.414.0", "lucide-react": "^0.414.0",
"luxon": "^3.4.4", "luxon": "^3.5.0",
"next": "^14.2.3", "next": "^14.2.12",
"next-themes": "^0.3.0", "next-themes": "^0.3.0",
"react": "^18.2.0", "react": "^18.3.1",
"react-device-detect": "^2.2.3", "react-device-detect": "^2.2.3",
"react-dom": "^18.2.0", "react-dom": "^18.3.1",
"react-intersection-observer": "^9.8.2", "react-intersection-observer": "^9.13.1",
"react-wrap-balancer": "^1.1.0", "react-wrap-balancer": "^1.1.1",
"sharp": "^0.33.3", "sharp": "^0.33.5",
"swr": "^2.2.6-beta.4", "swr": "^2.2.6-beta.4",
"tailwind-merge": "^2.2.2", "tailwind-merge": "^2.5.2",
"tailwindcss-animate": "^1.0.7" "tailwindcss-animate": "^1.0.7"
}, },
"devDependencies": { "devDependencies": {
"eslint-plugin-turbo": "^2.0.3", "eslint-plugin-turbo": "^2.1.2",
"eslint-plugin-unused-imports": "^4.0.0", "eslint-plugin-unused-imports": "^4.1.4",
"@next/bundle-analyzer": "^14.1.4", "@next/bundle-analyzer": "^14.2.12",
"@types/node": "^22.0.0", "@types/node": "^22.5.5",
"@types/react": "^18.2.74", "@types/react": "^18.3.7",
"@types/react-dom": "^18.2.24", "@types/react-dom": "^18.3.0",
"autoprefixer": "^10.4.19", "autoprefixer": "^10.4.20",
"eslint": "^9.4.0", "eslint": "^9.10.0",
"eslint-config-next": "^14.1.4", "eslint-config-next": "^14.2.12",
"postcss": "^8.4.38", "postcss": "^8.4.47",
"prettier": "^3.2.5", "prettier": "^3.3.3",
"prettier-plugin-tailwindcss": "^0.6.3", "prettier-plugin-tailwindcss": "^0.6.6",
"tailwindcss": "^3.4.3", "tailwindcss": "^3.4.12",
"typescript": "^5.4.3" "typescript": "^5.6.2"
} }
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB