mirror of
https://github.com/hamster1963/nezha-dash.git
synced 2025-04-24 21:10:45 +08:00
Compare commits
No commits in common. "c771162e0b448dfe4c9faf2807a2cd8259830b7e" and "848cf32b73b1a0774710c23442ce14564e6636dc" have entirely different histories.
c771162e0b
...
848cf32b73
22
.github/workflows/Deploy.yml
vendored
22
.github/workflows/Deploy.yml
vendored
@ -17,8 +17,6 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
@ -58,12 +56,20 @@ jobs:
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
|
||||
- name: Set up Bun
|
||||
uses: oven-sh/setup-bun@v1
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build-and-push
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
bun-version: "latest"
|
||||
|
||||
- name: Changelog
|
||||
run: bun x changelogithub
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
registry-url: https://registry.npmjs.org/
|
||||
node-version: lts/*
|
||||
|
||||
- run: npx changelogithub
|
||||
env:
|
||||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
||||
|
@ -1,6 +1,5 @@
|
||||
// @auto-i18n-check. Please do not delete the line.
|
||||
import { MotionProvider } from "@/components/motion/motion-provider";
|
||||
import { ThemeColorManager } from "@/components/ThemeColorManager";
|
||||
import getEnv from "@/lib/env-entry";
|
||||
import { FilterProvider } from "@/lib/network-filter-context";
|
||||
import { StatusProvider } from "@/lib/status-context";
|
||||
@ -31,7 +30,7 @@ export const metadata: Metadata = {
|
||||
appleWebApp: {
|
||||
capable: true,
|
||||
title: customTitle || "NezhaDash",
|
||||
statusBarStyle: "default",
|
||||
statusBarStyle: "black-translucent",
|
||||
},
|
||||
robots: {
|
||||
index: disableIndex ? false : true,
|
||||
@ -82,10 +81,7 @@ export default async function LocaleLayout({
|
||||
>
|
||||
<NextIntlClientProvider messages={messages}>
|
||||
<FilterProvider>
|
||||
<StatusProvider>
|
||||
<ThemeColorManager />
|
||||
{children}
|
||||
</StatusProvider>
|
||||
<StatusProvider>{children}</StatusProvider>
|
||||
</FilterProvider>
|
||||
</NextIntlClientProvider>
|
||||
</ThemeProvider>
|
||||
|
@ -1,38 +0,0 @@
|
||||
'use client';
|
||||
|
||||
import { useEffect } from 'react';
|
||||
import { useTheme } from 'next-themes';
|
||||
|
||||
export function ThemeColorManager() {
|
||||
const { theme, systemTheme } = useTheme();
|
||||
|
||||
useEffect(() => {
|
||||
const updateThemeColor = () => {
|
||||
const currentTheme = theme === 'system' ? systemTheme : theme;
|
||||
const meta = document.querySelector('meta[name="theme-color"]');
|
||||
|
||||
if (!meta) {
|
||||
const newMeta = document.createElement('meta');
|
||||
newMeta.name = 'theme-color';
|
||||
document.head.appendChild(newMeta);
|
||||
}
|
||||
|
||||
const themeColor = currentTheme === 'dark'
|
||||
? 'hsl(30 15% 8%)' // 深色模式背景色
|
||||
: 'hsl(0 0% 98%)'; // 浅色模式背景色
|
||||
|
||||
document.querySelector('meta[name="theme-color"]')?.setAttribute('content', themeColor);
|
||||
};
|
||||
|
||||
// Update on mount and theme change
|
||||
updateThemeColor();
|
||||
|
||||
// Listen for system theme changes
|
||||
const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');
|
||||
mediaQuery.addEventListener('change', updateThemeColor);
|
||||
|
||||
return () => mediaQuery.removeEventListener('change', updateThemeColor);
|
||||
}, [theme, systemTheme]);
|
||||
|
||||
return null;
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "nezha-dash",
|
||||
"version": "1.6.6",
|
||||
"version": "1.6.4",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev -p 3040",
|
||||
@ -25,7 +25,7 @@
|
||||
"@turf/turf": "^7.1.0",
|
||||
"@types/d3-geo": "^3.1.0",
|
||||
"@types/luxon": "^3.4.2",
|
||||
"@typescript-eslint/eslint-plugin": "^8.17.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.16.0",
|
||||
"caniuse-lite": "^1.0.30001685",
|
||||
"class-variance-authority": "^0.7.1",
|
||||
"clsx": "^2.1.1",
|
||||
@ -47,12 +47,12 @@
|
||||
"react-dom": "19.0.0-rc-02c0e824-20241028",
|
||||
"react-intersection-observer": "^9.13.1",
|
||||
"react-wrap-balancer": "^1.1.1",
|
||||
"recharts": "^2.14.0",
|
||||
"recharts": "^2.13.3",
|
||||
"sharp": "^0.33.5",
|
||||
"swr": "^2.2.6-beta.4",
|
||||
"tailwind-merge": "^2.5.5",
|
||||
"tailwindcss-animate": "^1.0.7",
|
||||
"typescript-eslint": "^8.17.0"
|
||||
"typescript-eslint": "^8.16.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@next/bundle-analyzer": "^15.0.3",
|
||||
|
@ -14,8 +14,8 @@
|
||||
"type": "image/png"
|
||||
}
|
||||
],
|
||||
"theme_color": "hsl(0 0% 98%)",
|
||||
"background_color": "hsl(0 0% 98%)",
|
||||
"theme_color": "#000000",
|
||||
"background_color": "#000000",
|
||||
"start_url": "/",
|
||||
"display": "standalone",
|
||||
"orientation": "portrait"
|
||||
|
Loading…
Reference in New Issue
Block a user