From abf37b286ae01d198b60397cf8abb8146b59db5a Mon Sep 17 00:00:00 2001 From: RaviAnand Mohabir Date: Tue, 8 Apr 2025 09:42:12 +0200 Subject: [PATCH] feat: :lipstick: add title to preview pane and improve general styling --- src/Organizrr.tsx | 77 +++++++++++++++++++++++------------------------ 1 file changed, 37 insertions(+), 40 deletions(-) diff --git a/src/Organizrr.tsx b/src/Organizrr.tsx index 5c35323..0b2861b 100644 --- a/src/Organizrr.tsx +++ b/src/Organizrr.tsx @@ -2,15 +2,12 @@ import { ActionIcon, AppShell, Autocomplete, - Box, Burger, Button, Group, - Indicator, Loader, Pagination, Paper, - Progress, ScrollArea, Select, Stack, @@ -20,7 +17,6 @@ import { Tooltip, } from "@mantine/core"; import { Document, Page } from "react-pdf"; -import { Form, isNotEmpty, useForm } from "@mantine/form"; import { IconDownload, IconEye, @@ -29,7 +25,6 @@ import { IconLayoutSidebarLeftCollapse, IconLayoutSidebarLeftExpand, IconRestore, - IconRobotFace, IconTrash, } from "@tabler/icons-react"; import { @@ -38,6 +33,7 @@ import { getFileDataUrl, systemMessage, } from "./utils"; +import { isNotEmpty, useForm } from "@mantine/form"; import { useCallback, useMemo, useState } from "react"; import { ChatCompletionMessageParam } from "@mlc-ai/web-llm"; @@ -281,7 +277,7 @@ function Organizrr() { hiddenFrom="sm" size="sm" /> - + Organizrr @@ -418,8 +414,6 @@ function Organizrr() { (d, idx) => ( { @@ -453,20 +447,18 @@ function Organizrr() { {form.values.documents .find((_d) => _d.id === d.id) ?.file.name.endsWith(".pdf") && ( - - - _d.id === d.id - )?.file - } - className={classNames.pdfPreview} - > - - - - + + _d.id === d.id + )?.file + } + className={classNames.pdfPreview} + > + + + )} - {activeDocument && activeDocument.file.name.endsWith(".pdf") && ( - - {activeDocument.file.name} - - - - - - - - )} + + + Vorschau + + {activeDocument && activeDocument.file.name.endsWith(".pdf") && ( + <> + {activeDocument.file.name} + + + + + + + + )} +