Build [v1.14.24]

This commit is contained in:
2026-04-25 12:04:02 +03:00
parent 33c1555d8c
commit 3257a2cf48
50 changed files with 837 additions and 845 deletions

View File

@@ -200,13 +200,13 @@ export function ImageAdjustmentModal({ imageUrl, onConfirm, onCancel }: ImageAdj
return (
<div className="fixed inset-0 bg-black/80 flex items-center justify-center z-50 p-4">
<div className="bg-slate-900 border border-slate-700 rounded-lg shadow-2xl max-w-6xl w-full max-h-[95vh] overflow-hidden flex flex-col">
<div className="bg-background border border-outline/30 shadow-2xl max-w-6xl w-full max-h-[95vh] overflow-hidden flex flex-col">
{/* Header */}
<div className="p-4 border-b border-slate-700 flex items-center justify-between bg-slate-800">
<h2 className="text-xl font-normal text-white">Rotate Image</h2>
<div className="p-4 border-b border-outline/30 flex items-center justify-between bg-surface-container">
<h2 className="text-xl font-normal text-foreground">Rotate Image</h2>
<button
onClick={onCancel}
className="p-2 hover:bg-slate-700 rounded text-gray-400 hover:text-white transition"
className="p-2 hover:bg-surface-bright text-secondary hover:text-foreground transition"
>
<X size={20} />
</button>
@@ -214,11 +214,11 @@ export function ImageAdjustmentModal({ imageUrl, onConfirm, onCancel }: ImageAdj
<div className="flex gap-4 p-4 flex-1 overflow-hidden">
{/* Left: Controls */}
<div className="w-56 bg-slate-800 p-4 rounded space-y-4 flex-shrink-0 overflow-y-auto">
<div className="w-56 bg-surface-container p-4 space-y-4 flex-shrink-0 overflow-y-auto">
{/* Rotation */}
<div>
<label className="block text-sm font-normal text-white mb-2">
Rotation: <span className="text-yellow-400">{rotation}°</span>
<label className="block text-sm font-normal text-foreground mb-2">
Rotation: <span className="text-warning">{rotation}°</span>
</label>
<input
type="range"
@@ -232,8 +232,8 @@ export function ImageAdjustmentModal({ imageUrl, onConfirm, onCancel }: ImageAdj
{/* Zoom */}
<div>
<label className="block text-sm font-normal text-white mb-2">
Zoom: <span className="text-yellow-400">{zoom.toFixed(2)}x</span>
<label className="block text-sm font-normal text-foreground mb-2">
Zoom: <span className="text-warning">{zoom.toFixed(2)}x</span>
</label>
<input
type="range"
@@ -246,30 +246,10 @@ export function ImageAdjustmentModal({ imageUrl, onConfirm, onCancel }: ImageAdj
/>
</div>
{/* Aspect Ratio - DISABLED (cropping not implemented) */}
{/* <div>
<label className="block text-sm font-normal text-white mb-2">Aspect Ratio</label>
<div className="space-y-2">
{aspectRatios.map((ratio) => (
<button
key={ratio.label}
onClick={() => setAspectRatio(ratio.value)}
className={`w-full py-2 px-3 rounded text-sm font-normal transition ${
aspectRatio === ratio.value
? 'bg-yellow-600 text-white'
: 'bg-slate-700 text-gray-300 hover:bg-slate-600'
}`}
>
{ratio.label}
</button>
))}
</div>
</div> */}
{/* Reset */}
<button
onClick={handleReset}
className="w-full py-2 px-3 rounded text-sm font-normal bg-slate-700 text-gray-300 hover:bg-slate-600 transition flex items-center justify-center gap-2"
className="w-full py-2 px-3 text-sm font-normal bg-surface-bright text-foreground hover:bg-surface-container transition flex items-center justify-center gap-2"
>
<RotateCw size={16} />
Reset
@@ -277,9 +257,9 @@ export function ImageAdjustmentModal({ imageUrl, onConfirm, onCancel }: ImageAdj
</div>
{/* Center: Canvas */}
<div className="flex-1 flex flex-col bg-slate-800 p-4 rounded border border-slate-700 overflow-hidden">
<h3 className="text-sm font-normal text-white mb-2">Image Preview</h3>
<div className="flex-1 flex items-center justify-center bg-black/50 rounded border border-slate-600 overflow-hidden">
<div className="flex-1 flex flex-col bg-surface-container p-4 border border-outline/30 overflow-hidden">
<h3 className="text-sm font-normal text-foreground mb-2">Image Preview</h3>
<div className="flex-1 flex items-center justify-center bg-black/50 border border-outline/50 overflow-hidden">
<canvas
ref={canvasRef}
onWheel={handleWheel}
@@ -289,13 +269,13 @@ export function ImageAdjustmentModal({ imageUrl, onConfirm, onCancel }: ImageAdj
className="max-w-full max-h-full cursor-grab active:cursor-grabbing touch-none"
/>
</div>
<p className="text-xs text-gray-400 mt-2">Scroll to zoom | Drag to pan | Rotate with slider</p>
<p className="text-xs text-secondary mt-2">Scroll to zoom | Drag to pan | Rotate with slider</p>
</div>
</div>
{/* Footer */}
<div className="p-4 border-t border-slate-700 bg-slate-800 flex items-center justify-between">
<label className="flex items-center gap-2 text-sm font-normal text-white">
<div className="p-4 border-t border-outline/30 bg-surface-container flex items-center justify-between">
<label className="flex items-center gap-2 text-sm font-normal text-foreground">
<input
type="checkbox"
checked={useImage}
@@ -307,13 +287,13 @@ export function ImageAdjustmentModal({ imageUrl, onConfirm, onCancel }: ImageAdj
<div className="flex gap-2">
<button
onClick={onCancel}
className="px-4 py-2 rounded text-sm font-normal bg-slate-700 text-gray-300 hover:bg-slate-600 transition"
className="px-4 py-2 text-sm font-normal bg-surface-bright text-foreground hover:bg-surface-container transition"
>
Cancel
</button>
<button
onClick={handleConfirm}
className="px-4 py-2 rounded text-sm font-normal bg-yellow-600 text-white hover:bg-yellow-700 transition"
className="px-4 py-2 text-sm font-normal bg-warning text-primary-foreground hover:bg-warning/80 transition"
>
Confirm
</button>