Update default negative prompt and add image clear button
All checks were successful
Build and Push Frontend Docker Image / build (push) Successful in 29s

- Replace short negative prompt with comprehensive list
- Add X button to clear selected image before generating
- Allow selecting a new image by clearing the current one

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Debian
2026-01-08 00:38:30 +00:00
parent 55af3da1ae
commit ad4114ab82
3 changed files with 45 additions and 4 deletions

View File

@@ -277,6 +277,8 @@ document.querySelectorAll('.nav-link').forEach(link => {
const imageInput = document.getElementById('image-input');
const imageUploadArea = document.getElementById('image-upload-area');
const previewImage = document.getElementById('preview-image');
const previewContainer = document.getElementById('preview-container');
const clearImageBtn = document.getElementById('clear-image-btn');
imageInput.addEventListener('change', (e) => {
const file = e.target.files[0];
@@ -284,7 +286,7 @@ imageInput.addEventListener('change', (e) => {
const reader = new FileReader();
reader.onload = (event) => {
previewImage.src = event.target.result;
previewImage.classList.remove('hidden');
previewContainer.classList.remove('hidden');
imageUploadArea.classList.add('has-file');
base64Image = event.target.result.split(',')[1];
};
@@ -292,6 +294,14 @@ imageInput.addEventListener('change', (e) => {
}
});
clearImageBtn.addEventListener('click', () => {
previewImage.src = '';
previewContainer.classList.add('hidden');
imageUploadArea.classList.remove('has-file');
imageInput.value = '';
base64Image = '';
});
// Generation
document.getElementById('generate-form').addEventListener('submit', async (e) => {
e.preventDefault();