This commit is contained in:
Corey Johnson
2012-11-02 16:09:02 -07:00
parent 25744fcd61
commit bef4f9aaa5
2 changed files with 8 additions and 7 deletions

View File

@@ -20,10 +20,10 @@ class StatusBar extends View
@content: ->
@div class: 'status-bar', =>
@div class: 'file-info', =>
@span class: 'octicons git-status', outlet: 'gitStatusIcon'
@span class: 'current-path', outlet: 'currentPath'
@span class: 'buffer-modified', outlet: 'bufferModified'
@div class: 'cursor-position', =>
@span class: 'octicons', outlet: 'gitStatusIcon'
@span outlet: 'branchArea', =>
@span '\uf020', class: 'octicons'
@span class: 'branch-label', outlet: 'branchLabel'
@@ -71,17 +71,16 @@ class StatusBar extends View
@branchArea.hide()
updateStatusText: ->
@gitStatusIcon.empty().hide()
path = @editor.getPath()
@gitStatusIcon.empty()
return unless path
git = new Git(path)
if git.isPathModified(path)
@gitStatusIcon.append $$ -> @span '\uf26d', class: 'modified-status-icon'
@gitStatusIcon.show()
else if git.isPathNew(path)
@gitStatusIcon.append $$ -> @span '\uf26b', class: 'new-status-icon'
@gitStatusIcon.show()
updatePathText: ->
if path = @editor.getPath()

View File

@@ -16,12 +16,14 @@
top: 5px;
}
.status-bar .file-info .modified-status-icon {
.status-bar .modified-status-icon {
color: #6C6912;
padding-right: 5px;
}
.status-bar .file-info .new-status-icon {
.status-bar .new-status-icon {
color: #269F81;
padding-right: 5px;
}
.status-bar .octicons {
@@ -29,9 +31,9 @@
font-size: 14px;
width: 14px;
height: 14px;
padding-right: 5px;
}
.status-bar .branch-label {
padding-left: 5px;
padding-right: 10px;
}