summaryrefslogtreecommitdiffstats
path: root/pyload/web/app/scripts/helpers/fileHelper.js
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/web/app/scripts/helpers/fileHelper.js')
-rw-r--r--pyload/web/app/scripts/helpers/fileHelper.js18
1 files changed, 16 insertions, 2 deletions
diff --git a/pyload/web/app/scripts/helpers/fileHelper.js b/pyload/web/app/scripts/helpers/fileHelper.js
index 156be58f0..044887eea 100644
--- a/pyload/web/app/scripts/helpers/fileHelper.js
+++ b/pyload/web/app/scripts/helpers/fileHelper.js
@@ -20,9 +20,23 @@ define('helpers/fileHelper', ['handlebars', 'utils/apitypes', 'helpers/formatTim
return '';
}
- // TODO
function fileIcon(media, options) {
- return 'icon-music';
+ switch (media) {
+ case Api.MediaType.Audio:
+ return 'icon-music';
+ case Api.MediaType.Image:
+ return 'icon-picture';
+ case Api.MediaType.Video:
+ return 'icon-film';
+ case Api.MediaType.Document:
+ return 'icon-file-text';
+ case Api.MediaType.Archive:
+ return 'icon-archive';
+ case Api.MediaType.Executable:
+ return 'icon-cog';
+ default:
+ return 'icon-file-alt';
+ }
}
// TODO rest of the states