From f33d8970fc9ceff47d1627c7bf8166851ffcab4d Mon Sep 17 00:00:00 2001 From: 3w36zj6 <52315048+3w36zj6@users.noreply.github.com> Date: Thu, 12 Jun 2025 07:40:23 +0900 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20=E7=BF=BB=E8=A8=B3=E7=8E=87?= =?UTF-8?q?=E3=82=92=E8=A1=A8=E7=A4=BA=E3=81=99=E3=82=8B=E3=83=90=E3=83=83?= =?UTF-8?q?=E3=82=B8=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- website/src/components/ui/common/Header.tsx | 150 +++++++++++++------- 1 file changed, 96 insertions(+), 54 deletions(-) diff --git a/website/src/components/ui/common/Header.tsx b/website/src/components/ui/common/Header.tsx index 091c29be61..b5efd4a8bb 100644 --- a/website/src/components/ui/common/Header.tsx +++ b/website/src/components/ui/common/Header.tsx @@ -5,28 +5,62 @@ import { typstOfficialUrl, version, } from "../../../metadata"; -import { DiscordIcon, GitHubIcon, MenuIcon, SearchIcon } from "../../icons"; +import { calculateTranslationProgressRate } from "../../../utils/translationStatus"; +import { + DiscordIcon, + GitHubIcon, + LanguageIcon, + MenuIcon, + SearchIcon, +} from "../../icons"; import { SiteTitle } from "./SiteTitle"; const VersionBadge = () => ( - + v{version} ); +const TranslationCoverageBadge = () => { + const rate = calculateTranslationProgressRate() * 100; + return ( +
+
+
+ +
+ 翻訳率 +
+
+
+
+
+ + {rate.toFixed(0)}% + +
+
+ ); +}; + export const Header = () => { return ( <>
-
-
- - +
+
+
+ + +
+
+ +
-
+