summaryrefslogtreecommitdiff
path: root/Hutch/Views/Repositories/CommitRowView.swift
diff options
context:
space:
mode:
authorChristian Cleberg <[email protected]>2026-03-22 20:42:58 -0500
committerChristian Cleberg <[email protected]>2026-03-22 20:42:58 -0500
commitcbf5f669abe126d4d508a8826c64b922963700c1 (patch)
treea77a483b71723d7ec51cbe4feb5786956283b885 /Hutch/Views/Repositories/CommitRowView.swift
parent82e54ad018ae5fa5cdf90c0d763e09e99bc0e933 (diff)
downloadhutch-cbf5f669abe126d4d508a8826c64b922963700c1.tar.gz
hutch-cbf5f669abe126d4d508a8826c64b922963700c1.tar.bz2
hutch-cbf5f669abe126d4d508a8826c64b922963700c1.zip
feat: context menus to copy clone URLs and commit SHAs
Diffstat (limited to 'Hutch/Views/Repositories/CommitRowView.swift')
-rw-r--r--Hutch/Views/Repositories/CommitRowView.swift14
1 files changed, 14 insertions, 0 deletions
diff --git a/Hutch/Views/Repositories/CommitRowView.swift b/Hutch/Views/Repositories/CommitRowView.swift
index b5eb31d..362ab4d 100644
--- a/Hutch/Views/Repositories/CommitRowView.swift
+++ b/Hutch/Views/Repositories/CommitRowView.swift
@@ -1,4 +1,5 @@
import SwiftUI
+import UIKit
struct CommitRowView: View {
let commit: CommitSummary
@@ -26,5 +27,18 @@ struct CommitRowView: View {
}
}
.padding(.vertical, 2)
+ .contextMenu {
+ Button {
+ UIPasteboard.general.string = commit.id
+ } label: {
+ Label("Copy Full SHA", systemImage: "doc.on.doc")
+ }
+
+ Button {
+ UIPasteboard.general.string = commit.shortId
+ } label: {
+ Label("Copy Short SHA", systemImage: "doc.on.doc.fill")
+ }
+ }
}
}