Improve paste-to-upload UX with a modal dialog; drop media file preview in My Projects
This commit is contained in:
@@ -100,9 +100,11 @@ else
|
||||
<!-- FILE UPLOAD -->
|
||||
<div id="fileWrap" class="mb-2">
|
||||
<label class="text-white">Upload</label>
|
||||
<img id="mediaFilePreview" style="display:none;max-width:160px;max-height:120px;object-fit:contain;background:#fff;border-radius:6px;padding:4px;" class="mb-2 d-block" />
|
||||
<input id="mediaFile" type="file" name="mediaFile" class="form-control bg-dark text-white" />
|
||||
<small class="text-muted">Upload image/document files. You can also paste (Ctrl+V) an image directly.</small>
|
||||
<button type="button" class="btn btn-outline-light btn-sm mt-2" onclick="PasteImageModal.open('#mediaFile')">
|
||||
<i class="fa-solid fa-paste me-1"></i>Paste image
|
||||
</button>
|
||||
<small class="text-muted d-block mt-1">Upload image/document files.</small>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
@@ -137,7 +139,5 @@ else
|
||||
sel.addEventListener("change", sync);
|
||||
sync();
|
||||
})();
|
||||
|
||||
enablePasteUpload('#mediaFile', '#mediaFilePreview');
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user