adds nice git interface

This commit is contained in:
2026-10-30 13:21:45 +01:00
parent b9c03a7637
commit caec81e762
107 changed files with 6466 additions and 3992 deletions
+38 -5
View File
@@ -49,8 +49,6 @@ public enum Palette {
public static let amberKeycapBorder = Color(hex: 0xE8913A, alpha: 0.35)
/// Text on an amber fill: always ink, never white.
public static let ink = Color(hex: 0x171C22)
/// The Commit button's label, a warmer ink than `ink`.
public static let commitInk = Color(hex: 0x201608)
/// Keycap border on an amber fill.
public static let inkKeycapBorder = Color(hex: 0x171C22, alpha: 0.25)
@@ -121,9 +119,44 @@ public enum Palette {
public static let menuIconModify = Color(hex: 0xF0B476)
public static let menuIconRename = Color(hex: 0xBAC0C0)
/// Git status letters: staged rows in teal, unstaged in amber-soft.
public static let stagedLetter = Color(hex: 0x8FBFB4)
public static let unstagedLetter = Color(hex: 0xF0B476)
// MARK: Git view
/// Secondary meta between text-3 and text-4: the sync label, the author, directories, hints.
public static let textMuted = Color(hex: 0x828D9A)
/// A file row under the pointer.
public static let gitRowHover = Color(hex: 0x1F2834)
/// The idle Commit button under the pointer: `raised` one step darker.
public static let commitIdleHover = Color(hex: 0x202834)
/// Status colours: modified, new, deleted; staged is `amber`.
public static let gitModified = Color(hex: 0xF0B476)
public static let gitNew = Color(hex: 0x8FBFB4)
public static let gitDeleted = Color(hex: 0xC3A6CE)
/// Section header fills.
public static let gitStagedTint = Color(hex: 0xE8913A, alpha: 0.08)
public static let gitModifiedTint = Color(hex: 0xF0B476, alpha: 0.06)
public static let gitNewTint = Color(hex: 0x8FBFB4, alpha: 0.06)
public static let gitDeletedTint = Color(hex: 0xC3A6CE, alpha: 0.06)
/// The current branch row.
public static let gitCurrentBranch = Color(hex: 0xE8913A, alpha: 0.08)
/// Inline diff: line fills, the differing middle of a paired line, and the side with no line.
public static let inlineRemovedFill = Color(hex: 0xE8913A, alpha: 0.12)
public static let inlineAddedFill = Color(hex: 0x8FBFB4, alpha: 0.12)
public static let inlineRemovedHighlight = Color(hex: 0xE8913A, alpha: 0.38)
public static let inlineAddedHighlight = Color(hex: 0x8FBFB4, alpha: 0.36)
public static let inlineFiller = Color(hex: 0x232C39, alpha: 0.35)
/// The colour of a console line.
public static func console(_ kind: GitLineKind) -> Color {
switch kind {
case .command: text1
case .output: text3
case .error: amber
case .hint: textMuted
case .staged, .success: gitNew
case .unstaged: gitModified
}
}
}
extension Color {