better preview of files
This commit is contained in:
27
templates/components/file_preview_modal.html
Normal file
27
templates/components/file_preview_modal.html
Normal file
@@ -0,0 +1,27 @@
|
||||
<!-- File Preview Modal -->
|
||||
<div class="modal fade" id="filePreviewModal" tabindex="-1" aria-labelledby="filePreviewModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg modal-dialog-centered">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="filePreviewModalLabel">File Preview</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body p-0">
|
||||
<div id="filePreviewContent" class="d-flex justify-content-center align-items-center" style="min-height: 400px;">
|
||||
<div class="text-center">
|
||||
<div class="spinner-border text-primary" role="status">
|
||||
<span class="visually-hidden">Loading...</span>
|
||||
</div>
|
||||
<p class="mt-2 text-muted">Loading preview...</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||
<a id="downloadPreviewBtn" href="#" class="btn btn-primary" download>
|
||||
<i class="fas fa-download me-1"></i>Download
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -248,7 +248,7 @@
|
||||
</div>
|
||||
|
||||
<!-- Move Modal -->
|
||||
<div class="modal fade" id="moveModal" tabindex="-1" aria-labelledby="moveModalLabel" aria-hidden="true">
|
||||
<div id="moveModal" class="modal fade" tabindex="-1" aria-labelledby="moveModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
@@ -272,6 +272,10 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Include modals -->
|
||||
{% include 'components/details_modal.html' %}
|
||||
{% include 'components/file_preview_modal.html' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_js %}
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
<option value="file_upload">File Upload</option>
|
||||
<option value="file_delete">File Delete</option>
|
||||
<option value="file_download">File Download</option>
|
||||
<option value="file_preview">File Preview</option>
|
||||
<option value="file_restore">File Restore</option>
|
||||
<option value="file_move">File Move</option>
|
||||
<option value="file_rename">File Rename</option>
|
||||
@@ -90,6 +91,8 @@
|
||||
<span class="badge bg-danger">File Delete</span>
|
||||
{% elif event.event_type == 'file_download' %}
|
||||
<span class="badge bg-info">File Download</span>
|
||||
{% elif event.event_type == 'file_preview' %}
|
||||
<span class="badge bg-info">File Preview</span>
|
||||
{% elif event.event_type == 'file_restore' %}
|
||||
<span class="badge bg-warning">File Restore</span>
|
||||
{% elif event.event_type == 'file_move' %}
|
||||
|
||||
@@ -38,9 +38,10 @@
|
||||
</div>
|
||||
|
||||
{% include 'components/details_modal.html' %}
|
||||
{% include 'components/file_preview_modal.html' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_js %}
|
||||
<script src="{{ url_for('static', filename='js/file-grid.js', v=config.CSS_VERSION) }}"></script>
|
||||
<script type="module" src="{{ url_for('static', filename='js/file-grid.js', v=config.CSS_VERSION) }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/starred.js', v=config.CSS_VERSION) }}"></script>
|
||||
{% endblock %}
|
||||
@@ -44,9 +44,10 @@
|
||||
{% include 'components/details_modal.html' %}
|
||||
{% include 'components/permanent_delete_modal.html' %}
|
||||
{% include 'components/empty_trash_modal.html' %}
|
||||
{% include 'components/file_preview_modal.html' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_js %}
|
||||
<script src="{{ url_for('static', filename='js/file-grid.js', v=config.CSS_VERSION) }}"></script>
|
||||
<script type="module" src="{{ url_for('static', filename='js/file-grid.js', v=config.CSS_VERSION) }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/trash.js', v=config.CSS_VERSION) }}"></script>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user