improves the git feature by adding a conflict status

This commit is contained in:
2026-10-30 16:47:34 +01:00
parent caec81e762
commit 0278d7fbd1
14 changed files with 10927 additions and 19 deletions
@@ -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