This repository has been archived by the owner on Dec 15, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Merge pull request #870 from Cutlery-Drawer/file-icons"
- Loading branch information
Showing
8 changed files
with
77 additions
and
229 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
fs = require 'fs-plus' | ||
path = require 'path' | ||
|
||
class DefaultFileIcons | ||
iconClassForPath: (filePath) -> | ||
extension = path.extname(filePath) | ||
|
||
if fs.isSymbolicLinkSync(filePath) | ||
'icon-file-symlink-file' | ||
else if fs.isReadmePath(filePath) | ||
'icon-book' | ||
else if fs.isCompressedExtension(extension) | ||
'icon-file-zip' | ||
else if fs.isImageExtension(extension) | ||
'icon-file-media' | ||
else if fs.isPdfExtension(extension) | ||
'icon-file-pdf' | ||
else if fs.isBinaryExtension(extension) | ||
'icon-file-binary' | ||
else | ||
'icon-file-text' | ||
|
||
module.exports = DefaultFileIcons |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
DefaultFileIcons = require './default-file-icons' | ||
|
||
class FileIcons | ||
constructor: -> | ||
@service = new DefaultFileIcons | ||
|
||
getService: -> | ||
@service | ||
|
||
resetService: -> | ||
@service = new DefaultFileIcons | ||
|
||
setService: (@service) -> | ||
|
||
module.exports = new FileIcons |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters