feat: redesign UI to match lovable compact sidebar layout

- Replace green hacker theme with professional blue-toned design
- Light theme default, manual toggle only (no system detection)
- Compact w-60 sidebar with collapsible sections
- New CSS tokens: sidebar, chart, candle, annotation colors
- Tools displayed as compact grid buttons
- Color swatches as inline bar
- Chart top bar with keyboard shortcut hints
- Inter + JetBrains Mono font pairing
- All components updated for compact styling
- Tailwind config extended with sidebar/chart tokens
This commit is contained in:
Marko Djordjevic 2026-02-16 20:50:30 +01:00
parent 2bde38d0bf
commit 4605283d2b
13 changed files with 976 additions and 740 deletions

View file

@ -1,7 +1,6 @@
'use client';
import { useState, useRef } from 'react';
import { Button } from '@/components/ui/button';
import { Upload } from 'lucide-react';
interface FileUploadProps {
@ -34,7 +33,7 @@ export default function FileUpload({ onUploadSuccess }: FileUploadProps) {
if (response.ok) {
setMessage({
type: 'success',
text: `Successfully uploaded ${data.count} candle records`,
text: `Uploaded ${data.count} candles`,
});
onUploadSuccess(data.chart);
} else {
@ -50,7 +49,6 @@ export default function FileUpload({ onUploadSuccess }: FileUploadProps) {
});
} finally {
setIsUploading(false);
// Reset file input
if (fileInputRef.current) {
fileInputRef.current.value = '';
}
@ -58,9 +56,7 @@ export default function FileUpload({ onUploadSuccess }: FileUploadProps) {
};
return (
<div className="p-4 bg-muted rounded-lg border border-border">
<h3 className="text-sm font-medium mb-3 text-foreground">Upload CSV Data</h3>
<div>
<input
ref={fileInputRef}
type="file"
@ -68,29 +64,20 @@ export default function FileUpload({ onUploadSuccess }: FileUploadProps) {
onChange={handleFileChange}
disabled={isUploading}
className="hidden"
id="csv-upload"
/>
<Button
variant="outline"
className="w-full"
<button
onClick={() => fileInputRef.current?.click()}
disabled={isUploading}
className="w-full flex items-center justify-center gap-1.5 px-2 py-1.5 text-xs rounded border border-border bg-secondary/30 hover:bg-secondary text-muted-foreground hover:text-foreground transition-colors disabled:opacity-50"
>
<Upload className="w-4 h-4 mr-2" />
{isUploading ? 'Uploading...' : 'Choose CSV File'}
</Button>
<Upload className="w-3 h-3" />
{isUploading ? 'Uploading...' : 'Upload CSV'}
</button>
{message && (
<div
className={`mt-3 text-xs p-3 rounded-md ${
message.type === 'success'
? 'bg-emerald-50 text-emerald-700 border border-emerald-200'
: 'bg-red-50 text-red-700 border border-red-200'
}`}
>
<p className={`mt-1 text-[10px] ${message.type === 'success' ? 'text-green-600' : 'text-destructive'}`}>
{message.text}
</div>
</p>
)}
</div>
);