Add email open for logging string sending

This commit is contained in:
Leon Böttger committed 2025-05-03 13:45:04 +02:00
1 parent a2e3bf1603
commit 0614ab56cd
2 files changed
+10 -2

No files matched your search

+8
View File
@@ -112,6 +112,7 @@ struct LargeAppIconView<Content: View>: View {
if taps == 5 {
let logString = LogManager.sharedInstance.getLogString()
sendLoggingString(logString)
copyToClipboard(logString)
print("Copied log to clipboard")
}
@@ -129,6 +130,13 @@ struct LargeAppIconView<Content: View>: View {
}
func sendLoggingString(_ text: String) {
if let url = URL(string: "mailto:quickdrop@leonboettger.com?subject=QuickDrop Log&body=\n\n\n––––––––––––––––––––\n\(text)") {
NSWorkspace.shared.open(url)
}
}
func copyToClipboard(_ text: String) {
let pasteboard = NSPasteboard.general
pasteboard.clearContents()