improves the git feature by adding a conflict status
This commit is contained in:
@@ -145,7 +145,7 @@ private struct TreeRowView: View {
|
||||
if let status {
|
||||
Text(status.rawValue)
|
||||
.typeRole(RowStyle.changeLetterRole)
|
||||
.foregroundStyle(status == .deleted ? Palette.amberDeep : Palette.addedText)
|
||||
.foregroundStyle(letterColor(status))
|
||||
.padding(.leading, 8)
|
||||
}
|
||||
}
|
||||
@@ -164,6 +164,14 @@ private struct TreeRowView: View {
|
||||
.help(isDirectory ? "" : row.path)
|
||||
}
|
||||
|
||||
private func letterColor(_ status: GitStatus) -> Color {
|
||||
switch status {
|
||||
case .deleted: Palette.amberDeep
|
||||
case .unmerged: Palette.gitConflict
|
||||
default: Palette.addedText
|
||||
}
|
||||
}
|
||||
|
||||
private var labelColor: Color {
|
||||
if status == .deleted { return Palette.text4 }
|
||||
return selected || (isDirectory && isOpen) ? Palette.text1 : Palette.text3
|
||||
|
||||
Reference in New Issue
Block a user