docker upload directories fixes
This commit is contained in:
@@ -348,13 +348,32 @@ export class ViewManager {
|
||||
renderFileActions(file, index) {
|
||||
const actions = [];
|
||||
|
||||
// Add details button
|
||||
actions.push(`
|
||||
<button class="btn btn-sm file-action-btn" title="Details" onclick="window.roomManager.modalManager.showDetailsModal('${file.name}', '${file.path || ''}')"
|
||||
style="background-color:var(--primary-opacity-8);color:var(--primary-color);">
|
||||
<i class="fas fa-info-circle"></i>
|
||||
</button>
|
||||
`);
|
||||
// Check if file can be previewed
|
||||
const extension = file.name.split('.').pop().toLowerCase();
|
||||
const previewableExtensions = [
|
||||
'pdf', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx',
|
||||
'txt', 'md', 'csv', 'py', 'js', 'html', 'css', 'json', 'xml', 'sql', 'sh', 'bat',
|
||||
'jpg', 'jpeg', 'png', 'gif', 'bmp', 'svg', 'webp', 'tiff',
|
||||
'mp3', 'mp4', 'webm', 'avi', 'mov', 'wmv', 'flv', 'mkv'
|
||||
];
|
||||
|
||||
if (previewableExtensions.includes(extension)) {
|
||||
// Add preview button for previewable files
|
||||
actions.push(`
|
||||
<button class="btn btn-sm file-action-btn" title="Preview" onclick="window.roomManager.viewManager.previewFile(${index})"
|
||||
style="background-color:var(--primary-opacity-8);color:var(--primary-color);">
|
||||
<i class="fas fa-eye"></i>
|
||||
</button>
|
||||
`);
|
||||
} else {
|
||||
// Add details button for non-previewable files
|
||||
actions.push(`
|
||||
<button class="btn btn-sm file-action-btn" title="Details" onclick="window.roomManager.modalManager.showDetailsModal('${file.name}', '${file.path || ''}')"
|
||||
style="background-color:var(--primary-opacity-8);color:var(--primary-color);">
|
||||
<i class="fas fa-info-circle"></i>
|
||||
</button>
|
||||
`);
|
||||
}
|
||||
|
||||
// Add download button if user has permission
|
||||
if (this.roomManager.canDownload) {
|
||||
|
||||
Reference in New Issue
Block a user