From 1270edfeadd00604fb02a3a2cc6aa56aec4cd57d Mon Sep 17 00:00:00 2001 From: Token <239573049@qq.com> Date: Fri, 2 Feb 2024 10:49:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=9B=B4=E6=96=B0=E8=AF=81?= =?UTF-8?q?=E4=B9=A6=E9=94=99=E8=AF=AF=20=E4=BF=AE=E5=A4=8D=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=E8=AF=81=E4=B9=A6=E7=9A=84=E6=97=B6=E5=80=99=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E8=BF=94=E5=9B=9E=E5=9C=B0=E5=9D=80=E4=B8=BA=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Gateway/Services/FileStorageService.cs | 4 +- web/src/components/Certificate-Gateway.tsx | 139 +++++++++++---------- web/src/components/Create-Certificate.tsx | 2 +- 3 files changed, 74 insertions(+), 71 deletions(-) diff --git a/src/Gateway/Services/FileStorageService.cs b/src/Gateway/Services/FileStorageService.cs index f2f3b69..307af7d 100644 --- a/src/Gateway/Services/FileStorageService.cs +++ b/src/Gateway/Services/FileStorageService.cs @@ -25,8 +25,8 @@ public static class FileStorageExtension { public static void MapFileStorage(this IEndpointRouteBuilder app) { - app.MapPost("/api/gateway/file-storage", async (HttpContext context) => - await FileStorageService.UploadAsync(context)) + app.MapPost("/api/gateway/file-storage", + async (HttpContext context) => { return await FileStorageService.UploadAsync(context); }) .RequireAuthorization(); } } \ No newline at end of file diff --git a/web/src/components/Certificate-Gateway.tsx b/web/src/components/Certificate-Gateway.tsx index 0475bf6..2bc7287 100644 --- a/web/src/components/Certificate-Gateway.tsx +++ b/web/src/components/Certificate-Gateway.tsx @@ -42,78 +42,81 @@ export default function CertificateGateway({ activeKey }: IProps) { }) } - return ( - <> - -
- 证书管理 -
- + return ( + <> + +
+ 证书管理
- } - bordered - style={{ - height: 'calc(100vh - 280px)', - overflow: 'auto', - padding: '10px', - }} - dataSource={data} - renderItem={(item: CertificateEntity, index) => - <> -
-
-
-
-
- 证书名称:{item.name} -
-
- 证书描述:{item.description} -
+ +
+ } + bordered + style={{ + height: 'calc(100vh - 280px)', + overflow: 'auto', + padding: '10px', + }} + dataSource={data} + renderItem={(item: CertificateEntity, index) => + <> +
+
+
+
+
+ 证书名称:{item.name}
-
-
- 证书私钥:{item.password} -
-
- 上传时间:{item.createTime} -
+
+ 证书描述:{item.description}
-
-
- 域名:{item.host} -
-
- 过期时间:{item.expirationTime} -
+
+
+
+ 证书私钥:{item.password} +
+
+ 上传时间:{item.createTime} +
+
+
+
+ 域名:{item.host} +
+
+ 过期时间:{item.expirationTime}
-
- - -
- } - /> - setCreateCertificateVisible(false)} onSusccess={() => { - setCreateCertificateVisible(false); - loadingCertificate(); - }} /> - setUpdateCertificateVisible(false)} onSusccess={() => { - setUpdateCertificateVisible(false); - loadingCertificate(); - setUpdateCertificate({} as CertificateEntity); - }} /> - - ) - } \ No newline at end of file +
+ + +
+
+ } + /> + setCreateCertificateVisible(false)} onSusccess={() => { + setCreateCertificateVisible(false); + loadingCertificate(); + }} /> + setUpdateCertificateVisible(false)} onSusccess={() => { + setUpdateCertificateVisible(false); + loadingCertificate(); + setUpdateCertificate({} as CertificateEntity); + }} /> + + ) +} \ No newline at end of file diff --git a/web/src/components/Create-Certificate.tsx b/web/src/components/Create-Certificate.tsx index 316e07c..a0d7a16 100644 --- a/web/src/components/Create-Certificate.tsx +++ b/web/src/components/Create-Certificate.tsx @@ -11,7 +11,7 @@ interface IProps { onSusccess: () => void; } -const { Input, DatePicker } = Form; +const { Input, DatePicker } = Form; export default function CreateCertificate({ visible, onCancel, onSusccess }: IProps) { const [file, setFile] = useState({} as File);