From 7bb932910afcaf9e86f967c2f5cf5a0485ce7ebe Mon Sep 17 00:00:00 2001 From: CPTProgrammer <46586216+CPTProgrammer@users.noreply.github.com> Date: Thu, 16 Jul 2026 14:34:56 +0800 Subject: [PATCH] Use theme tokens for spacing and sizing and update PublishModal --- src/components/MainPage.tsx | 9 +- src/components/PublishModal.tsx | 207 ++++++++++++++++++++------------ src/components/VersionTable.tsx | 5 +- 3 files changed, 136 insertions(+), 85 deletions(-) diff --git a/src/components/MainPage.tsx b/src/components/MainPage.tsx index 2819a3d..ad55bba 100644 --- a/src/components/MainPage.tsx +++ b/src/components/MainPage.tsx @@ -1,7 +1,7 @@ "use client"; import { useState, useCallback } from "react"; -import { Typography, Space, Card, Button } from "antd"; +import { Typography, Space, Card, Button, theme } from "antd"; import { CloudUploadOutlined } from "@ant-design/icons"; import { ConfigSelector } from "./ConfigSelector"; import { VersionTable } from "./VersionTable"; @@ -16,6 +16,7 @@ interface MainPageProps { } export function MainPage({ initialConfigs }: MainPageProps) { + const { token } = theme.useToken(); const [configs, setConfigs] = useState<{ name: string; file: string }[]>(initialConfigs); const [selectedConfigFile, setSelectedConfigFile] = useState( @@ -67,11 +68,11 @@ export function MainPage({ initialConfigs }: MainPageProps) { style={{ maxWidth: 900, margin: "40px auto", - padding: "0 24px", + padding: `0 ${token.paddingLG}px`, }} > {/* Page header */} - + <Title level={2} style={{ marginBottom: token.marginLG }}> Mod Releaser @@ -99,7 +100,7 @@ export function MainPage({ initialConfigs }: MainPageProps) { style={{ display: "flex", justifyContent: "flex-end", - marginTop: 24, + marginTop: token.marginLG, }} >