Added ability to load in external image

This commit is contained in:
Dan 2026-01-09 13:40:42 +00:00
parent c82cfa1d23
commit 39e72f56f9
4 changed files with 259 additions and 2 deletions

View file

@ -418,7 +418,11 @@ export class UIBuilder {
input.type = 'text';
input.id = id;
input.value = defaultValue || '';
input.maxLength = 20;
// Only set maxLength for text inputs that aren't URLs
if (id !== 'bg-image-url') {
input.maxLength = 20;
}
container.appendChild(labelEl);
container.appendChild(input);
@ -464,6 +468,8 @@ export class UIBuilder {
control.style.display = triggerControl.value === 'texture' ? 'block' : 'none';
} else if (controlId && (controlId.startsWith('emoji-') || controlId === 'emoji-text')) {
control.style.display = triggerControl.value === 'emoji-wallpaper' ? 'block' : 'none';
} else if (controlId && (controlId.startsWith('bg-image-') || controlId === 'bg-image-url' || controlId === 'bg-image-fit' || controlId === 'bg-image-opacity')) {
control.style.display = triggerControl.value === 'external-image' ? 'block' : 'none';
}
}
// For text color controls