Skip to content

Commit 77a6935

Browse files
committed
✨ Add credits page
1 parent 52a4492 commit 77a6935

File tree

4 files changed

+43
-0
lines changed

4 files changed

+43
-0
lines changed
3.68 KB
Binary file not shown.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
@font-face {
2+
font-family: "DINPro Bold";
3+
src: url("./DINPro-Bold.subset.woff2") format("woff2");
4+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import { Field } from "@/components/ui/field";
2+
import { Heart } from "lucide-react";
3+
import "./assets/font.css";
4+
5+
export default function CreditsTab() {
6+
return (
7+
<div className="mx-auto flex w-2/3 flex-col overflow-auto">
8+
<Donation user="鳕鱼" note="支持开源支持国产" amount={50} />
9+
<Donation user="木头" amount={50} />
10+
<Donation user="Edelweiß" amount={5} />
11+
</div>
12+
);
13+
}
14+
15+
function Donation({
16+
user,
17+
note = "",
18+
amount,
19+
currency = "CNY",
20+
}: {
21+
user: string;
22+
note?: string;
23+
amount: number;
24+
currency?: string;
25+
}) {
26+
return (
27+
<Field icon={<Heart />} title={user} description={note}>
28+
<div className="flex items-center gap-2 *:font-[DINPro_Bold]">
29+
<span className="text-2xl">{amount}</span>
30+
<span className="text-xl">{currency}</span>
31+
</div>
32+
</Field>
33+
);
34+
}

app/src/sub/SettingsWindow/index.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { Rectangle } from "@graphif/shapes";
66
import { useState } from "react";
77
import AboutTab from "./about";
88
import AppearanceTab from "./appearance";
9+
import CreditsTab from "./credits";
910
import KeyBindsPage from "./keybinds";
1011
import SettingsTab from "./settings";
1112

@@ -22,6 +23,7 @@ export default function SettingsWindow({ defaultTab = "settings" }: { defaultTab
2223
<TabsTrigger value="keybinds">快捷键</TabsTrigger>
2324
<TabsTrigger value="appearance">个性化</TabsTrigger>
2425
<TabsTrigger value="about">关于</TabsTrigger>
26+
<TabsTrigger value="credits">鸣谢</TabsTrigger>
2527
</TabsList>
2628
<div data-pg-drag-region className="h-full flex-1" />
2729
</div>
@@ -37,6 +39,9 @@ export default function SettingsWindow({ defaultTab = "settings" }: { defaultTab
3739
<TabsContent value="about" className="overflow-auto">
3840
<AboutTab />
3941
</TabsContent>
42+
<TabsContent value="credits" className="overflow-auto">
43+
<CreditsTab />
44+
</TabsContent>
4045
</Tabs>
4146
);
4247
}

0 commit comments

Comments
 (0)