Merge branch 'main' into cloudflare

This commit is contained in:
hamster1963 2024-12-10 00:43:02 +08:00
commit bf888e8b01
6 changed files with 11 additions and 9 deletions

View File

@ -64,10 +64,6 @@ export function InteractiveMap({
feature.properties.iso_a2_eh, feature.properties.iso_a2_eh,
); );
if (isHighlighted) {
console.log(feature.properties.iso_a2_eh);
}
const serverCount = serverCounts[feature.properties.iso_a2_eh] || 0; const serverCount = serverCounts[feature.properties.iso_a2_eh] || 0;
return ( return (

View File

@ -12,6 +12,10 @@ const MapTooltip = memo(function MapTooltip() {
if (!tooltipData) return null; if (!tooltipData) return null;
const sortedServers = tooltipData.servers.sort((a, b) => {
return a.status === b.status ? 0 : a.status ? 1 : -1;
});
return ( return (
<AnimatePresence mode="wait"> <AnimatePresence mode="wait">
<m.div <m.div
@ -46,7 +50,7 @@ const MapTooltip = memo(function MapTooltip() {
overflowY: "auto", overflowY: "auto",
}} }}
> >
{tooltipData.servers.map((server, index) => ( {sortedServers.map((server, index) => (
<div key={index} className="flex items-center gap-1.5 py-0.5"> <div key={index} className="flex items-center gap-1.5 py-0.5">
<span <span
className={`w-1.5 h-1.5 shrink-0 rounded-full ${ className={`w-1.5 h-1.5 shrink-0 rounded-full ${

View File

@ -34,7 +34,6 @@ export default function ServerListClient() {
useEffect(() => { useEffect(() => {
const inlineState = localStorage.getItem("inline"); const inlineState = localStorage.getItem("inline");
if (inlineState !== null) { if (inlineState !== null) {
console.log("inlineState", inlineState);
setInline(inlineState); setInline(inlineState);
} }
}, []); }, []);

BIN
bun.lockb

Binary file not shown.

View File

@ -22,6 +22,9 @@ const withPWA = withPWAInit({
/** @type {import('next').NextConfig} */ /** @type {import('next').NextConfig} */
const nextConfig = { const nextConfig = {
experimental: {
inlineCss: true,
},
output: "standalone", output: "standalone",
logging: { logging: {
fetches: { fetches: {

View File

@ -1,9 +1,9 @@
{ {
"name": "nezha-dash", "name": "nezha-dash",
"version": "1.7.4", "version": "1.7.5",
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "next dev -p 3040", "dev": "next dev --turbopack -p 3040",
"start": "node .next/standalone/server.js", "start": "node .next/standalone/server.js",
"lint": "next lint", "lint": "next lint",
"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/",
@ -39,7 +39,7 @@
"framer-motion": "^12.0.0-alpha.2", "framer-motion": "^12.0.0-alpha.2",
"lucide-react": "^0.454.0", "lucide-react": "^0.454.0",
"luxon": "^3.5.0", "luxon": "^3.5.0",
"next": "^15.0.4", "next": "15.0.4-canary.48",
"next-auth": "^5.0.0-beta.25", "next-auth": "^5.0.0-beta.25",
"next-intl": "^3.26.0", "next-intl": "^3.26.0",
"next-runtime-env": "^3.2.2", "next-runtime-env": "^3.2.2",