mirror of
https://github.com/hamster1963/nezha-dash.git
synced 2025-04-24 21:10:45 +08:00
Compare commits
4 Commits
c212c6688c
...
14b12bf8e0
Author | SHA1 | Date | |
---|---|---|---|
|
14b12bf8e0 | ||
|
80a58d8cfc | ||
|
9ff5913ffb | ||
|
4c5a012bdc |
@ -10,7 +10,7 @@ export default function ServerFlag({
|
|||||||
country_code: string
|
country_code: string
|
||||||
className?: string
|
className?: string
|
||||||
}) {
|
}) {
|
||||||
const [supportsEmojiFlags, setSupportsEmojiFlags] = useState(false)
|
const [supportsEmojiFlags, setSupportsEmojiFlags] = useState(true)
|
||||||
|
|
||||||
const useSvgFlag = getEnv("NEXT_PUBLIC_ForceUseSvgFlag") === "true"
|
const useSvgFlag = getEnv("NEXT_PUBLIC_ForceUseSvgFlag") === "true"
|
||||||
|
|
||||||
@ -40,10 +40,6 @@ export default function ServerFlag({
|
|||||||
|
|
||||||
if (!country_code) return null
|
if (!country_code) return null
|
||||||
|
|
||||||
if (supportsEmojiFlags && country_code.toLowerCase() === "tw") {
|
|
||||||
country_code = "cn"
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<span className={cn("text-[12px] text-muted-foreground", className)}>
|
<span className={cn("text-[12px] text-muted-foreground", className)}>
|
||||||
{useSvgFlag || !supportsEmojiFlags ? (
|
{useSvgFlag || !supportsEmojiFlags ? (
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "nezha-dash",
|
"name": "nezha-dash",
|
||||||
"version": "1.8.6",
|
"version": "1.9.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev -p 3040",
|
"dev": "next dev -p 3040",
|
||||||
@ -44,7 +44,7 @@
|
|||||||
"maxmind": "^4.3.23",
|
"maxmind": "^4.3.23",
|
||||||
"next": "^15.1.2",
|
"next": "^15.1.2",
|
||||||
"next-auth": "^5.0.0-beta.25",
|
"next-auth": "^5.0.0-beta.25",
|
||||||
"next-intl": "^3.26.2",
|
"next-intl": "^3.26.3",
|
||||||
"next-runtime-env": "^3.2.2",
|
"next-runtime-env": "^3.2.2",
|
||||||
"next-themes": "^0.4.4",
|
"next-themes": "^0.4.4",
|
||||||
"react": "^19.0.0",
|
"react": "^19.0.0",
|
||||||
|
Loading…
Reference in New Issue
Block a user