better preview visuals

This commit is contained in:
2025-06-01 12:43:24 +02:00
parent ea118a37c5
commit 3a768146c1
2 changed files with 39 additions and 7 deletions

View File

@@ -234,7 +234,16 @@ function renderFiles(files) {
// Add preview button for supported file types
if (file.type !== 'folder') {
const extension = file.name.split('.').pop().toLowerCase();
const supportedTypes = ['jpg', 'jpeg', 'png', 'gif', 'pdf', 'mp4', 'webm', 'mp3', 'wav'];
const supportedTypes = [
// Images
'jpg', 'jpeg', 'png', 'gif', 'bmp', 'svg', 'webp', 'tiff',
// Documents
'pdf', 'txt', 'md', 'csv', 'py', 'js', 'html', 'css', 'json', 'xml', 'sql', 'sh', 'bat',
'docx', 'doc', 'xlsx', 'xls', 'pptx', 'ppt', 'odt', 'odp', 'ods',
// Media
'mp4', 'webm', 'avi', 'mov', 'wmv', 'flv', 'mkv',
'mp3', 'wav', 'ogg', 'm4a', 'flac'
];
if (supportedTypes.includes(extension)) {
actionsArr.push(`
@@ -282,7 +291,16 @@ function renderFiles(files) {
// Add preview button for supported file types
if (file.type !== 'folder') {
const extension = file.name.split('.').pop().toLowerCase();
const supportedTypes = ['jpg', 'jpeg', 'png', 'gif', 'pdf', 'mp4', 'webm', 'mp3', 'wav'];
const supportedTypes = [
// Images
'jpg', 'jpeg', 'png', 'gif', 'bmp', 'svg', 'webp', 'tiff',
// Documents
'pdf', 'txt', 'md', 'csv', 'py', 'js', 'html', 'css', 'json', 'xml', 'sql', 'sh', 'bat',
'docx', 'doc', 'xlsx', 'xls', 'pptx', 'ppt', 'odt', 'odp', 'ods',
// Media
'mp4', 'webm', 'avi', 'mov', 'wmv', 'flv', 'mkv',
'mp3', 'wav', 'ogg', 'm4a', 'flac'
];
if (supportedTypes.includes(extension)) {
actionsArr.push(`