diff --git a/frontend/bun.lockb b/frontend/bun.lockb index 8a4d45d..208bfdf 100755 Binary files a/frontend/bun.lockb and b/frontend/bun.lockb differ diff --git a/frontend/package.json b/frontend/package.json index ade55db..89ffb63 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -20,6 +20,7 @@ "@tauri-apps/api": "^2", "@tauri-apps/plugin-dialog": "~2", "@tauri-apps/plugin-opener": "^2", + "clsx": "^2.1.1", "solid-js": "^1.9.3" }, "devDependencies": { diff --git a/frontend/src/App.css b/frontend/src/App.css deleted file mode 100644 index 8b13789..0000000 --- a/frontend/src/App.css +++ /dev/null @@ -1 +0,0 @@ - diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 68c7c79..74f5546 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -1,8 +1,7 @@ -import { FolderPicker } from "./components/FolderPicker"; -import { listen } from "@tauri-apps/api/event"; -import { createEffect, createSignal } from "solid-js"; +import { createSignal } from "solid-js"; import { Search } from "@kobalte/core/search"; import { IconSearch, IconRefresh } from "@tabler/icons-solidjs"; +import clsx from "clsx"; type Emoji = { emoji: string; @@ -10,7 +9,6 @@ type Emoji = { }; function App() { - const [latestImage, setLatestImage] = createSignal(null); const [options, setOptions] = createSignal([]); const [emoji, setEmoji] = createSignal(null); @@ -28,35 +26,8 @@ function App() { ); }; - createEffect(() => { - // Listen for PNG processing events - const unlisten = listen("png-processed", (event) => { - console.log("Received processed PNG"); - const base64Data = event.payload as string; - setLatestImage(`data:image/png;base64,${base64Data}`); - }); - - return () => { - unlisten.then((fn) => fn()); // Cleanup listener - }; - }); - return ( -
-

hello???

- - - {latestImage() && ( -
-

Latest Processed Image:

- Latest processed -
- )} - +
( - - {props.item.rawValue.emoji} + + + {props.item.rawValue.emoji} + )} > - + - + + } > - - + + - + e.preventDefault()} > - - + + 😬 No emoji found -
+
Emoji selected: {emoji()?.emoji} {emoji()?.name}
diff --git a/frontend/src/assets/fonts/Manrope-VariableFont_wght.ttf b/frontend/src/assets/fonts/Manrope-VariableFont_wght.ttf new file mode 100644 index 0000000..f39ca39 Binary files /dev/null and b/frontend/src/assets/fonts/Manrope-VariableFont_wght.ttf differ diff --git a/frontend/src/components/ImageViewer.tsx b/frontend/src/components/ImageViewer.tsx new file mode 100644 index 0000000..85fc08a --- /dev/null +++ b/frontend/src/components/ImageViewer.tsx @@ -0,0 +1,37 @@ +import { createEffect, createSignal } from "solid-js"; +import { listen } from "@tauri-apps/api/event"; +import { FolderPicker } from "./FolderPicker"; + +export function ImageViewer() { + const [latestImage, setLatestImage] = createSignal(null); + + createEffect(() => { + // Listen for PNG processing events + const unlisten = listen("png-processed", (event) => { + console.log("Received processed PNG"); + const base64Data = event.payload as string; + setLatestImage(`data:image/png;base64,${base64Data}`); + }); + + return () => { + unlisten.then((fn) => fn()); // Cleanup listener + }; + }); + + return ( +
+ + + {latestImage() && ( +
+

Latest Processed Image:

+ Latest processed +
+ )} +
+ ); +} diff --git a/frontend/src/index.css b/frontend/src/index.css index 9f7ac1a..622aff8 100644 --- a/frontend/src/index.css +++ b/frontend/src/index.css @@ -2,13 +2,19 @@ @tailwind components; @tailwind utilities; +@font-face { + font-family: "Manrope"; + src: url("./assets/fonts/Manrope-VariableFont_wght.ttf") format("truetype"); + font-weight: 100 900; + font-display: swap; +} + :root { @apply bg-neutral-50 text-black rounded-xl; - font-family: Inter, Avenir, Helvetica, Arial, sans-serif; + font-family: Manrope, sans-serif; font-size: 16px; line-height: 24px; - font-weight: 400; - + font-weight: 500; font-synthesis: none; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; diff --git a/frontend/tailwind.config.js b/frontend/tailwind.config.js index 38b7fb7..c6e0218 100644 --- a/frontend/tailwind.config.js +++ b/frontend/tailwind.config.js @@ -2,7 +2,11 @@ export default { content: ["./index.html", "./src/**/*.{js,ts,jsx,tsx}"], theme: { - extend: {}, + extend: { + fontFamily: { + sans: ["Manrope", "sans-serif"], + }, + }, }, plugins: [require("@kobalte/tailwindcss")], };