Improve paste-to-upload UX with a modal dialog; drop media file preview in My Projects
This commit is contained in:
@@ -19,7 +19,10 @@
|
||||
<label class="text-white">Current Logo</label><br />
|
||||
<img id="logoPreview" src="@Model.existingImage" alt="@Model.TitleEN" style="@(string.IsNullOrWhiteSpace(Model.existingImage) ? "display:none;" : "")width:64px;height:64px;object-fit:contain;background:#fff;border-radius:6px;padding:4px;" />
|
||||
<input id="logoFile" type="file" name="logoFile" class="form-control bg-dark text-white mt-2" accept="image/*" />
|
||||
<small class="text-muted">Leave empty to keep the current logo. 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('#logoFile', '#logoPreview')">
|
||||
<i class="fa-solid fa-paste me-1"></i>Paste image
|
||||
</button>
|
||||
<small class="text-muted d-block mt-1">Leave empty to keep the current logo.</small>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
@@ -56,7 +59,3 @@
|
||||
|
||||
<button class="btn btn-success">Save</button>
|
||||
}
|
||||
|
||||
<script>
|
||||
enablePasteUpload('#logoFile', '#logoPreview');
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user