Use binary icon for .woff and .DS_Store extensions

This commit is contained in:
Kevin Sawicki
2013-02-15 19:21:11 -08:00
parent 7f9fb785df
commit 10430842b0
5 changed files with 18 additions and 0 deletions

View File

@@ -48,6 +48,8 @@ class FuzzyFinderView extends SelectList
typeClass = 'image-name'
else if fs.isPdfExtension(ext)
typeClass = 'pdf-name'
else if fs.isBinaryExtension(ext)
typeClass = 'binary-name'
else
typeClass = 'text-name'
@span fs.base(path), class: "file label #{typeClass}"

View File

@@ -25,6 +25,8 @@ class FileView extends View
@fileName.addClass('image-icon')
else if fs.isPdfExtension(extension)
@fileName.addClass('pdf-icon')
else if fs.isBinaryExtension(extension)
@fileName.addClass('binary-icon')
else
@fileName.addClass('text-icon')

View File

@@ -180,6 +180,11 @@ module.exports =
'.ron'
], ext, true) >= 0
isBinaryExtension: (ext) ->
_.indexOf([
'.DS_Store'
'.woff'
], ext, true) >= 0
isReadmePath: (path) ->
extension = @extension(path)