diff --git a/.env.example b/.env.example index cf625da..b46311b 100644 --- a/.env.example +++ b/.env.example @@ -7,4 +7,7 @@ NEXT_PUBLIC_ShowFlag=true NEXT_PUBLIC_DisableCartoon=false NEXT_PUBLIC_ShowTag=true NEXT_PUBLIC_ShowNetTransfer=false -NEXT_PUBLIC_ForceUseSvgFlag=false \ No newline at end of file +NEXT_PUBLIC_ForceUseSvgFlag=false +NEXT_PUBLIC_CustomLogo=https://nezha-cf.buycoffee.top/apple-touch-icon.png +NEXT_PUBLIC_CustomTitle=NezhaDash +NEXT_PUBLIC_CustomDescription=NezhaDash is a dashboard for Nezha. diff --git a/app/[locale]/(main)/header.tsx b/app/[locale]/(main)/header.tsx index ba182b4..15b3e82 100644 --- a/app/[locale]/(main)/header.tsx +++ b/app/[locale]/(main)/header.tsx @@ -3,6 +3,7 @@ import { LanguageSwitcher } from "@/components/LanguageSwitcher"; import { ModeToggle } from "@/components/ThemeSwitcher"; import { Separator } from "@/components/ui/separator"; +import getEnv from "@/lib/env-entry"; import { DateTime } from "luxon"; import { useTranslations } from "next-intl"; import Image from "next/image"; @@ -10,6 +11,10 @@ import React, { useEffect, useRef, useState } from "react"; function Header() { const t = useTranslations("Header"); + const customLogo = getEnv("NEXT_PUBLIC_CustomLogo"); + const customTitle = getEnv("NEXT_PUBLIC_CustomTitle"); + const customDescription = getEnv("NEXT_PUBLIC_CustomDescription"); + return (
- {t("p_1079-1199_Simpleandbeautifuldashbo")} + {customDescription + ? customDescription + : t("p_1079-1199_Simpleandbeautifuldashbo")}