File tree Expand file tree Collapse file tree 3 files changed +10
-10
lines changed
NavigatorArea/SourceControlNavigator/History/Views Expand file tree Collapse file tree 3 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -42,10 +42,10 @@ extension GitClient {
42
42
. map { line -> GitCommit in
43
43
let parameters = line. components ( separatedBy: " ¦ " )
44
44
let infoRef = parameters [ safe: 9 ]
45
-
45
+
46
46
var ref = " "
47
47
var tag = " "
48
-
48
+
49
49
if let infoRef = infoRef {
50
50
if infoRef. contains ( " tag: " ) {
51
51
tag = infoRef. components ( separatedBy: " tag: " ) [ 1 ] . trimmingCharacters ( in: . whitespaces)
Original file line number Diff line number Diff line change @@ -101,12 +101,12 @@ struct CommitDetailsHeaderView: View {
101
101
. padding ( . horizontal, 16 )
102
102
103
103
Divider ( )
104
-
104
+
105
105
Text ( commitDetails ( ) )
106
106
. fontWeight ( . bold)
107
107
. padding ( . horizontal, 16 )
108
108
. frame ( alignment: . leading)
109
-
109
+
110
110
if !commit. body. isEmpty {
111
111
Text ( commit. body)
112
112
. padding ( . horizontal, 16 )
Original file line number Diff line number Diff line change @@ -10,20 +10,20 @@ import SwiftUI
10
10
struct CommitListItemView : View {
11
11
12
12
var commit : GitCommit
13
-
13
+
14
14
private var defaultAvatar : some View {
15
15
Image ( systemName: " person.crop.circle.fill " )
16
16
. symbolRenderingMode ( . hierarchical)
17
17
. resizable ( )
18
18
. foregroundColor ( avatarColor)
19
19
. frame ( width: 32 , height: 32 )
20
20
}
21
-
21
+
22
22
private func generateAvatarHash( ) -> String {
23
23
let hash = commit. authorEmail. md5 ( trim: true , caseSensitive: false )
24
24
return " \( hash) ?d=404&s=64 " // send 404 if no image available, image size 64x64 (32x32 @2x)
25
25
}
26
-
26
+
27
27
private var avatarColor : Color {
28
28
let hash = generateAvatarHash ( ) . hash
29
29
switch hash % 12 {
@@ -68,7 +68,7 @@ struct CommitListItemView: View {
68
68
Text ( commit. author)
69
69
. fontWeight ( . bold)
70
70
. font ( . system( size: 11 ) )
71
-
71
+
72
72
if !commit. ref. isEmpty {
73
73
HStack {
74
74
Image . branch
@@ -85,7 +85,7 @@ struct CommitListItemView: View {
85
85
)
86
86
. padding ( . trailing, 2.5 )
87
87
}
88
-
88
+
89
89
if !commit. tag. isEmpty {
90
90
HStack {
91
91
Image . breakpoint
@@ -102,7 +102,7 @@ struct CommitListItemView: View {
102
102
)
103
103
. padding ( . trailing, 2.5 )
104
104
}
105
-
105
+
106
106
Text ( " \( commit. message) \( commit. body) " )
107
107
. font ( . system( size: 11 ) )
108
108
. lineLimit ( 2 )
You can’t perform that action at this time.
0 commit comments