diff --git a/src/App.tsx b/src/App.tsx index 99de8d2..6911cf6 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -7,7 +7,7 @@ function App() { const [currentSave, setCurrentSave] = useState(null); return ( -
+
{currentSave === null ? ( { diff --git a/src/components/Bytes.tsx b/src/components/Bytes.tsx new file mode 100644 index 0000000..6586e40 --- /dev/null +++ b/src/components/Bytes.tsx @@ -0,0 +1,46 @@ +import { cn } from "../utils"; + +interface BytesProps { + className?: string; +} + +export default function Bytes({ className }: BytesProps) { + const bytes = new Array(16 * 16).fill(0).map(() => + Math.floor(Math.random() * 256) + .toString(16) + .padStart(2, "0") + ); + + return ( +
+

Bytes

+

+ You can change the offset of the bytes modified in this menu if it + doesn't work initially. +

+
+ {bytes.map((byte, index) => ( +
16 * 10, + })} + > + {byte} +
+ ))} +
+
+ ); +} diff --git a/src/components/Logs.tsx b/src/components/Logs.tsx new file mode 100644 index 0000000..602a828 --- /dev/null +++ b/src/components/Logs.tsx @@ -0,0 +1,46 @@ +import { cn } from "../utils"; + +export default function Logs() { + const data = [ + { + type: "info", + message: "Starting patcher...", + }, + { + type: "warning", + message: "Checking for updates...", + }, + { + type: "info", + message: "No updates found.", + }, + { + type: "error", + message: "Patching...", + }, + { + type: "info", + message: "Patching complete.", + }, + ]; + + return ( +
+

Logs

+
+ {data.map((log) => { + return ( +

+ {log.message} +

+ ); + })} +
+
+ ); +} diff --git a/src/views/Patcher.tsx b/src/views/Patcher.tsx index 2fd68b4..49dbcc5 100644 --- a/src/views/Patcher.tsx +++ b/src/views/Patcher.tsx @@ -1,4 +1,6 @@ import { useEffect, useState } from "preact/hooks"; +import Logs from "../components/Logs"; +import Bytes from "../components/Bytes"; interface PatcherProps { className?: string; @@ -33,18 +35,21 @@ export default function Patcher({ onComplete, path }: PatcherProps) { }, []); return ( -
-
-

{filename}

-

- {path} -

+
+
+
+

{filename}

+

+ {path} +

+
+ +
- diff --git a/tailwind.config.js b/tailwind.config.js index 614c86b..80bcb00 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -2,7 +2,11 @@ export default { content: ["./index.html", "./src/**/*.{js,ts,jsx,tsx}"], theme: { - extend: {}, + extend: { + gridTemplateColumns: { + 16: "repeat(16, minmax(0, 1fr))", + }, + }, }, plugins: [], };