File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
CodeEditModules/Modules/GitClone/src Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 4545 </dict >
4646 </array >
4747 <key >GitHash </key >
48- <string >Placeholder </string >
48+ <string >c27acdfadd10e91ab5ff3ccdf4deb73b1e0d5fd2 </string >
4949</dict >
5050</plist >
Original file line number Diff line number Diff line change @@ -100,6 +100,9 @@ public struct GitCloneView: View {
100100 . padding ( . top, 20 )
101101 . padding ( . horizontal, 20 )
102102 . padding ( . bottom, 16 )
103+ . onAppear {
104+ self . checkClipboard ( textFieldText: & repoUrlStr)
105+ }
103106 }
104107 }
105108}
@@ -151,4 +154,11 @@ extension GitCloneView {
151154 }
152155 return false
153156 }
157+ func checkClipboard( textFieldText: inout String ) {
158+ if let url = NSPasteboard . general. pasteboardItems? . first? . string ( forType: . string) {
159+ if isValid ( url: url) {
160+ textFieldText = url
161+ }
162+ }
163+ }
154164}
You can’t perform that action at this time.
0 commit comments