From 5b1703db680d164afca3b752380615aad5570b62 Mon Sep 17 00:00:00 2001 From: C4illin Date: Fri, 20 Sep 2024 12:55:00 +0200 Subject: [PATCH] chore: add safe attribute to input element --- src/index.tsx | 24 +++++++++++++++++------- src/public/style.css | 2 +- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/src/index.tsx b/src/index.tsx index 24c3619..094c487 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -543,9 +543,11 @@ const app = new Elysia({ style={{ borderColor: "gray", padding: "2px", - }}> + }} + >
+ style={{ fontSize: "20px", fontWeight: "bold" }} + safe> {converter}
@@ -567,7 +569,9 @@ const app = new Elysia({ data-target={target} data-converter={converter} style={{ fontSize: "15px", padding: "5px" }} - type="button"> + type="button" + safe + > {target} ))} @@ -638,8 +642,9 @@ const app = new Elysia({ style={{ borderColor: "gray", padding: "2px", - }}> -
+ }} + > +
{converter}
@@ -661,7 +666,9 @@ const app = new Elysia({ data-target={target} data-converter={converter} style={{ fontSize: "15px", padding: "5px" }} - type="button"> + type="button" + safe + > {target} ))} @@ -828,7 +835,10 @@ const app = new Elysia({ const fileTypeOrig = fileName.split(".").pop() ?? ""; const fileType = normalizeFiletype(fileTypeOrig); const newFileExt = normalizeOutputFiletype(convertTo); - const newFileName = fileName.replace(new RegExp(`${fileTypeOrig}(?!.*${fileTypeOrig})`), newFileExt); + const newFileName = fileName.replace( + new RegExp(`${fileTypeOrig}(?!.*${fileTypeOrig})`), + newFileExt, + ); const targetPath = `${userOutputDir}${newFileName}`; const result = await mainConverter( diff --git a/src/public/style.css b/src/public/style.css index cff90bd..2ed0bed 100644 --- a/src/public/style.css +++ b/src/public/style.css @@ -4,7 +4,7 @@ div.icon { } button[type="submit"] { - width: 50% + width: 50%; } div.center {