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
@@ -78,7 +78,8 @@ struct ContextMenuOverlay: View {
ContextMenuSeparator()
case let .action(action, label):
ContextMenuRow(label, systemImage: Self.symbol(for: action), iconTint: Self.tint(for: action).color,
isHighlighted: highlighted == index, isDestructive: action.isDestructive)
isHighlighted: highlighted == index, isDestructive: action.isDestructive,
isEmphasized: action.isEmphasized)
.onHover { inside in if inside { highlighted = index } }
.onTapGesture { onPerform(action) }
}
@@ -109,11 +110,11 @@ struct ContextMenuOverlay: View {
nonisolated static func tint(for action: ContextAction) -> MenuIconTint {
switch action {
case .copyReference, .copyTerminalSelection, .pasteIntoTerminal, .readAloudFile, .readAloudText, .readAloudTerminalSelection,
.plak, .plakTerminalSelection: .plain
case .newFile, .newFolder, .stage: .add
case .copyFileName, .unstage, .revealInFinder: .modify
case .passOnReference, .passOnFileName, .bouwen, .waitWhat, .openDiff, .showDiff, .rename: .rename
case .discard, .delete: .danger
.plak, .plakTerminalSelection, .openFile, .commit: .plain
case .newFile, .newFolder: .add
case .copyFileName, .revealInFinder: .modify
case .passOnReference, .passOnFileName, .bouwen, .waitWhat, .showDiff, .rename: .rename
case .gitDiscard, .delete: .danger
}
}
@@ -125,13 +126,14 @@ struct ContextMenuOverlay: View {
case .readAloudFile, .readAloudText, .readAloudTerminalSelection: "speaker.wave.2"
case .plak, .plakTerminalSelection: "note.text.badge.plus"
case .copyReference, .copyFileName, .copyTerminalSelection: "doc.on.doc"
case .openFile: "doc.text"
case .commit(andPush: false): "checkmark"
case .commit(andPush: true): "arrow.up.to.line"
case .pasteIntoTerminal: "doc.on.clipboard"
case .newFile: "doc.badge.plus"
case .newFolder: "folder.badge.plus"
case .stage: "plus"
case .unstage: "minus"
case .openDiff, .showDiff: "arrow.left.arrow.right"
case .discard: "arrow.uturn.backward"
case .showDiff: "arrow.left.arrow.right"
case .gitDiscard: "arrow.uturn.backward"
case .rename: "pencil"
case .revealInFinder: "folder"
case .delete: "trash"