File tree Expand file tree Collapse file tree 2 files changed +24
-1
lines changed
Utils/Extensions/OperatingSystemVersion Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change 66//
77
88import SwiftUI
9+ import Foundation
910
1011struct AboutDefaultView : View {
1112 private var appVersion : String {
@@ -64,6 +65,15 @@ struct AboutDefaultView: View {
6465 )
6566 . blur ( radius: aboutMode == . about ? 0 : 10 )
6667 . opacity ( aboutMode == . about ? 1 : 0 )
68+ . onTapGesture {
69+ // Create a string suitable for pasting into a bug report
70+ let macOSVersion = ProcessInfo . processInfo. operatingSystemVersion. semverString
71+ NSPasteboard . general. clearContents ( )
72+ NSPasteboard . general. setString (
73+ " CodeEdit: \( appVersion) ( \( appBuild) ) \n macOS: \( macOSVersion) " ,
74+ forType: . string
75+ )
76+ }
6777 }
6878 . padding ( . horizontal)
6979 }
@@ -96,7 +106,6 @@ struct AboutDefaultView: View {
96106 Link ( destination: Self . licenseURL) {
97107 Text ( " MIT License " )
98108 . underline ( )
99-
100109 }
101110 Text ( Bundle . copyrightString ?? " " )
102111 }
Original file line number Diff line number Diff line change 1+ //
2+ // OperatingSystemVersion+String.swift
3+ // CodeEdit
4+ //
5+ // Created by Khan Winter on 5/27/25.
6+ //
7+
8+ import Foundation
9+
10+ extension OperatingSystemVersion {
11+ var semverString : String {
12+ " \( majorVersion) . \( minorVersion) . \( patchVersion) "
13+ }
14+ }
You can’t perform that action at this time.
0 commit comments