Show octicon for project's that are repos

This commit is contained in:
Kevin Sawicki
2013-01-05 19:24:53 -08:00
parent 0217bb9ce0
commit f11f85e87b
3 changed files with 22 additions and 7 deletions

View File

@@ -21,7 +21,18 @@ class DirectoryView extends View
initialize: ({@directory, isExpanded, @project, parent} = {}) ->
@expand() if isExpanded
@disclosureArrow.on 'click', => @toggleExpansion()
@directoryName.addClass('ignored') if @project.repo.isPathIgnored(@directory.getPath())
repo = @project.repo
if repo?
path = @directory.getPath()
@directoryName.addClass('ignored') if repo.isPathIgnored(path)
console.log path, repo.getWorkingDirectory()
if path is repo.getWorkingDirectory()
@directoryName.addClass('repository-icon')
else
@directoryName.addClass('directory-icon')
else
@directoryName.addClass('directory-icon')
getPath: ->
@directory.path

View File

@@ -128,11 +128,17 @@
-webkit-font-smoothing: antialiased;
}
.tree-view .directory .header .name:before {
.tree-view .directory .header .directory-icon:before {
content: "\f016";
top: -5px;
}
.tree-view .directory .header .repository-icon:before {
content: "\f001";
top: -4px;
}
.tree-view .file .text-name:before {
content: "\f011";
top: -2px;