Build [v1.14.24]
This commit is contained in:
@@ -283,13 +283,13 @@ export function DebugRotationPanel({
|
||||
|
||||
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-surface-container border border-outline-variant shadow-2xl max-w-6xl w-full max-h-[95vh] overflow-hidden flex flex-col">
|
||||
{/* Header */}
|
||||
<div className="p-3 border-b border-slate-700 flex items-center justify-between bg-slate-800 flex-shrink-0">
|
||||
<h2 className="text-lg font-normal text-white">Debug Rotation & Crop</h2>
|
||||
<div className="p-3 border-b border-outline-variant flex items-center justify-between bg-surface-container flex-shrink-0">
|
||||
<h2 className="text-lg font-normal text-foreground">Debug Rotation & Crop</h2>
|
||||
<button
|
||||
onClick={onClose}
|
||||
className="p-2 hover:bg-slate-700 rounded text-gray-400 hover:text-white transition"
|
||||
className="p-2 hover:bg-surface-bright text-gray-400 hover:text-foreground transition"
|
||||
>
|
||||
<X size={20} />
|
||||
</button>
|
||||
@@ -297,11 +297,11 @@ export function DebugRotationPanel({
|
||||
|
||||
<div className="flex gap-4 p-4 flex-1 overflow-hidden">
|
||||
{/* Left: Controls */}
|
||||
<div className="w-48 bg-slate-800 p-3 rounded space-y-4 flex-shrink-0 overflow-y-auto">
|
||||
<div className="w-48 bg-surface-container p-3 space-y-4 flex-shrink-0 overflow-y-auto">
|
||||
{/* Rotation Slider */}
|
||||
<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"
|
||||
@@ -315,17 +315,13 @@ export function DebugRotationPanel({
|
||||
|
||||
{/* Quick Presets */}
|
||||
<div>
|
||||
<label className="block text-sm font-normal text-white mb-2">Quick Angles</label>
|
||||
<label className="block text-sm font-normal text-foreground mb-2">Quick Angles</label>
|
||||
<div className="grid grid-cols-2 gap-1">
|
||||
{commonAngles.map((angle) => (
|
||||
<button
|
||||
key={angle.value}
|
||||
onClick={() => setRotation(angle.value)}
|
||||
className={`py-1 px-2 rounded text-xs font-normal transition ${
|
||||
rotation === angle.value
|
||||
? 'bg-yellow-600 text-white'
|
||||
: 'bg-slate-700 text-gray-300 hover:bg-slate-600'
|
||||
}`}
|
||||
className={`py-1 px-2 text-xs font-normal transition ${ rotation === angle.value ? 'bg-warning text-foreground' : 'bg-surface-bright text-gray-300 hover:bg-outline-variant' }`}
|
||||
>
|
||||
{angle.label}
|
||||
</button>
|
||||
@@ -337,15 +333,15 @@ export function DebugRotationPanel({
|
||||
<button
|
||||
onClick={() => setAdjustedCropBounds(null)}
|
||||
disabled={!adjustedCropBounds}
|
||||
className="w-full py-2 px-3 rounded text-sm font-normal bg-slate-700 text-gray-300 hover:bg-slate-600 disabled:opacity-50 disabled:cursor-not-allowed transition"
|
||||
className="w-full py-2 px-3 text-sm font-normal bg-surface-bright text-gray-300 hover:bg-outline-variant disabled:opacity-50 disabled:cursor-not-allowed transition"
|
||||
>
|
||||
Reset Crop Box
|
||||
</button>
|
||||
|
||||
{/* Original Values */}
|
||||
{originalRotation !== undefined && (
|
||||
<div className="bg-slate-700 p-3 rounded text-xs space-y-1">
|
||||
<h3 className="font-normal text-white">Original AI Values</h3>
|
||||
<div className="bg-surface-bright p-3 text-xs space-y-1">
|
||||
<h3 className="font-normal text-foreground">Original AI Values</h3>
|
||||
<div className="text-gray-300 font-mono text-xs">
|
||||
<div>Rotation: {originalRotation}°</div>
|
||||
{originalCropBounds && (
|
||||
@@ -365,12 +361,12 @@ export function DebugRotationPanel({
|
||||
{/* Right: Canvas + Log */}
|
||||
<div className="flex-1 flex flex-col gap-3 min-w-0 overflow-hidden">
|
||||
{/* Canvas - takes most space */}
|
||||
<div className="flex-1 flex flex-col bg-slate-800 p-3 rounded border border-slate-700 overflow-hidden">
|
||||
<h3 className="text-xs font-normal text-white mb-2">Preview (Green = Crop, Orange = Rotation)</h3>
|
||||
<div className="flex-1 flex items-center justify-center bg-black/70 rounded border border-slate-600 overflow-auto">
|
||||
<div className="flex-1 flex flex-col bg-surface-container p-3 border border-outline-variant overflow-hidden">
|
||||
<h3 className="text-xs font-normal text-foreground mb-2">Preview (Green = Crop, Orange = Rotation)</h3>
|
||||
<div className="flex-1 flex items-center justify-center bg-black/70 border border-outline-variant overflow-auto">
|
||||
<canvas
|
||||
ref={canvasRef}
|
||||
className="rounded cursor-move"
|
||||
className="cursor-move"
|
||||
onMouseDown={handleCanvasMouseDown}
|
||||
onMouseMove={handleCanvasMouseMove}
|
||||
onMouseUp={handleCanvasMouseUp}
|
||||
@@ -380,8 +376,8 @@ export function DebugRotationPanel({
|
||||
</div>
|
||||
|
||||
{/* Log - single line */}
|
||||
<div className="bg-slate-800 p-2 rounded border border-slate-700 flex-shrink-0">
|
||||
<div className="bg-black text-green-400 p-2 rounded font-mono text-xs">
|
||||
<div className="bg-surface-container p-2 border border-outline-variant flex-shrink-0">
|
||||
<div className="bg-black text-success p-2 font-mono text-xs">
|
||||
{log}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user