diff --git a/src/components/doclist/views/ListView.tsx b/src/components/doclist/views/ListView.tsx
index 1233184..e6bc86a 100644
--- a/src/components/doclist/views/ListView.tsx
+++ b/src/components/doclist/views/ListView.tsx
@@ -36,6 +36,9 @@ function formatDate(ms: number): string {
function formatSize(bytes: number): string {
const mb = bytes / 1024 / 1024;
+ if (mb >= 1024) {
+ return `${(mb / 1024).toFixed(2)} GB`;
+ }
return mb >= 1 ? `${mb.toFixed(2)} MB` : `${(bytes / 1024).toFixed(1)} KB`;
}
diff --git a/src/components/doclist/window/FinderSidebar.tsx b/src/components/doclist/window/FinderSidebar.tsx
index 5298520..7de467b 100644
--- a/src/components/doclist/window/FinderSidebar.tsx
+++ b/src/components/doclist/window/FinderSidebar.tsx
@@ -47,7 +47,7 @@ function SidebarRow({
type="button"
onClick={onClick}
className={
- 'group w-full flex items-center gap-2 px-2 py-1 rounded-md text-[12px] border transform transition-all duration-200 ease-out text-left hover:scale-[1.02] ' +
+ 'group w-full flex items-center gap-2 px-2 py-1 rounded-md text-[12px] border transform transition-all duration-200 ease-out text-left hover:scale-[1.01] ' +
(active
? 'border-accent bg-offbase text-accent'
: 'border-transparent text-foreground hover:border-accent hover:bg-offbase hover:text-accent') +
diff --git a/src/components/doclist/window/FinderToolbar.tsx b/src/components/doclist/window/FinderToolbar.tsx
index d929043..e40761f 100644
--- a/src/components/doclist/window/FinderToolbar.tsx
+++ b/src/components/doclist/window/FinderToolbar.tsx
@@ -58,10 +58,9 @@ const ICON_SIZES: Array<{ value: IconSize; label: string }> = [
// Match SettingsModal / UserMenu trigger sizing exactly so all bar buttons share one rhythm.
const TOOLBAR_BTN =
- 'inline-flex items-center py-1 px-2 rounded-md border bg-base text-xs transition-all duration-200 ease-out hover:scale-[1.02]';
+ 'inline-flex items-center py-1 px-2 rounded-md border bg-base text-xs transition-all duration-200 ease-out hover:scale-[1.01]';
const TOOLBAR_BTN_INACTIVE =
'border-offbase text-foreground hover:text-accent hover:border-accent hover:bg-offbase';
-const TOOLBAR_BTN_ACTIVE = 'border-accent text-accent bg-offbase';
// Pill-grouped segmented control. Outer pill carries the border; inner segments are
// borderless and rely on bg/text color to show active/hover. Sized so the whole pill
diff --git a/src/components/documents/DocumentUploader.tsx b/src/components/documents/DocumentUploader.tsx
index efe1afb..2ff1766 100644
--- a/src/components/documents/DocumentUploader.tsx
+++ b/src/components/documents/DocumentUploader.tsx
@@ -1,6 +1,6 @@
'use client';
-import { useState, useCallback } from 'react';
+import { useState, useCallback, type ReactNode } from 'react';
import { useDropzone } from 'react-dropzone';
import { UploadIcon } from '@/components/icons/Icons';
import { useDocuments } from '@/contexts/DocumentContext';
@@ -10,10 +10,11 @@ import { useFeatureFlag } from '@/contexts/RuntimeConfigContext';
interface DocumentUploaderProps {
className?: string;
- variant?: 'default' | 'compact';
+ variant?: 'default' | 'compact' | 'overlay';
+ children?: ReactNode;
}
-export function DocumentUploader({ className = '', variant = 'default' }: DocumentUploaderProps) {
+export function DocumentUploader({ className = '', variant = 'default', children }: DocumentUploaderProps) {
const enableDocx = useFeatureFlag('enableDocxConversion');
const {
addPDFDocument: addPDF,
@@ -71,11 +72,13 @@ export function DocumentUploader({ className = '', variant = 'default' }: Docume
} : {})
},
multiple: true,
- disabled: isUploading || isConverting
+ disabled: isUploading || isConverting,
+ noClick: variant === 'overlay',
+ noKeyboard: variant === 'overlay'
});
const containerBase = `group w-full rounded transform transition-all duration-200 ease-in-out ${
- variant === 'compact' ? 'hover:scale-[1.02]' : ''
+ variant === 'compact' ? 'hover:scale-[1.01]' : ''
} ${
isUploading || isConverting ? 'cursor-not-allowed opacity-50' : 'cursor-pointer'
} ${className}`;
@@ -95,6 +98,32 @@ export function DocumentUploader({ className = '', variant = 'default' }: Docume
const paddingClass = variant === 'compact' ? 'py-1 px-2 rounded-md' : 'py-5 px-3 rounded-lg';
+ if (variant === 'overlay') {
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
+ const { onClick, onKeyDown, ...rootProps } = getRootProps();
+ return (
+
+
+ {children}
+ {isDragActive && (
+
+
+
+
+ Drop files here to upload
+
+
+ {enableDocx
+ ? 'Accepts PDF, EPUB, TXT, MD, or DOCX'
+ : 'Accepts PDF, EPUB, TXT, or MD'}
+
+
+
+ )}
+
+ );
+ }
+
return (