Improve paste-to-upload UX with a modal dialog; drop media file preview in My Projects

This commit is contained in:
2026-07-08 14:27:07 +02:00
parent 0ccbef45a1
commit 8ec6e3fd50
7 changed files with 108 additions and 53 deletions
+19
View File
@@ -120,6 +120,25 @@
</div>
</div>
<div class="modal fade" id="pasteImageModal" tabindex="-1" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content bg-dark text-white border border-secondary">
<div class="modal-header border-secondary">
<h5 class="modal-title">Paste Image</h5>
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body text-center">
<div id="pasteImageTarget" contenteditable="true" spellcheck="false"
class="border border-secondary rounded p-5 mb-3 text-white-50"
style="outline:none;cursor:text;min-height:120px;display:flex;align-items:center;justify-content:center;">
Click here, then press Ctrl+V to paste your image
</div>
<img id="pasteImageModalPreview" style="display:none;max-width:100%;max-height:220px;border-radius:6px;" />
</div>
</div>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/js/bootstrap.bundle.min.js"></script>
<script src="@Url.Content("~/web_atakanozbancom/assets/js/paste-upload.js")"></script>
</body>