kbot editor final round

This commit is contained in:
lovebird 2025-09-21 08:23:31 +02:00
parent 019283d4ca
commit 611af4a0be
16 changed files with 7 additions and 0 deletions

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB

View File

@ -477,6 +477,7 @@ export default function ImageGallery({
className="w-full bg-white/10 border border-white/30 rounded-lg px-3 py-2 text-white placeholder-white/60 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent backdrop-blur-sm disabled:opacity-50 resize-none" className="w-full bg-white/10 border border-white/30 rounded-lg px-3 py-2 text-white placeholder-white/60 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent backdrop-blur-sm disabled:opacity-50 resize-none"
onKeyDown={(e) => { onKeyDown={(e) => {
if (e.key === 'Enter' && !e.shiftKey && lightboxPrompt.trim() && !isGenerating) { if (e.key === 'Enter' && !e.shiftKey && lightboxPrompt.trim() && !isGenerating) {
e.stopPropagation();
if (e.ctrlKey) { if (e.ctrlKey) {
// Ctrl+Enter: Submit and keep prompt for iteration // Ctrl+Enter: Submit and keep prompt for iteration
e.preventDefault(); e.preventDefault();
@ -488,15 +489,21 @@ export default function ImageGallery({
setLightboxPrompt(''); setLightboxPrompt('');
} }
} else if (e.key === 'Escape') { } else if (e.key === 'Escape') {
e.stopPropagation();
e.preventDefault();
setLightboxPrompt(''); setLightboxPrompt('');
} else if (e.ctrlKey && e.key === 'ArrowUp' && navigateHistory) { } else if (e.ctrlKey && e.key === 'ArrowUp' && navigateHistory) {
e.stopPropagation();
e.preventDefault(); e.preventDefault();
navigateHistory('up'); navigateHistory('up');
} else if (e.ctrlKey && e.key === 'ArrowDown' && navigateHistory) { } else if (e.ctrlKey && e.key === 'ArrowDown' && navigateHistory) {
e.stopPropagation();
e.preventDefault(); e.preventDefault();
navigateHistory('down'); navigateHistory('down');
} }
// Delete key: Let it bubble up to lightbox handler for image deletion
// Shift+Enter: Allow new line (default textarea behavior) // Shift+Enter: Allow new line (default textarea behavior)
// All other keys: Normal textarea behavior without interference
}} }}
onClick={(e) => e.stopPropagation()} onClick={(e) => e.stopPropagation()}
/> />