meme generator update

This commit is contained in:
2026-05-25 08:57:13 +02:00
parent 96b13db79c
commit 3a436304bd
2 changed files with 7 additions and 1 deletions

View File

@@ -20,6 +20,12 @@
let img = new Image();
let hasLoadedImage = window.memeTemplate.id !== 'custom' && window.memeTemplate.category !== 'Custom';
// Show the local file picker only when no pre-selected template exists
if (!hasLoadedImage) {
const customSelector = document.getElementById('customTemplateSelector');
if (customSelector) customSelector.style.display = '';
}
const memeFont = 'Impact, Charcoal, sans-serif';
function wrapText(ctx, text, maxWidth) {

View File

@@ -32,7 +32,7 @@
</div>
<div class="meme-controls">
<div id="customTemplateSelector" class="form-group" style="margin-bottom: 20px;">
<div id="customTemplateSelector" class="form-group" style="margin-bottom: 20px; display: none;">
<label for="customTemplateFile">{{ t('meme.select_image') }}</label>
<input type="file" id="customTemplateFile" accept="image/*" style="display: none;">
<button id="selectCustomFileBtn" type="button" class="btn btn-secondary btn-block">