mirror of
https://github.com/leonboe1/QuickDrop.git
synced 2026-11-12 03:21:09 +00:00
Fix icons for older macOS versions
This commit is contained in:
1 parent
b6e3943374
commit
71ef68d4cb
3 files changed
+23
-23
No files matched your search
@@ -40,11 +40,11 @@ struct WelcomeScreen: View {
|
||||
openPrivacyPolicy()
|
||||
}
|
||||
|
||||
ExternalLinkLabel(label: "AndroidApp", icon: "smartphone") {
|
||||
ExternalLinkLabel(label: "AndroidApp", icon: getPhoneIcon()) {
|
||||
openAppAdvertisementView()
|
||||
}
|
||||
|
||||
ExternalLinkLabel(label: "TransmitUsingCable", icon: "cable.connector") {
|
||||
ExternalLinkLabel(label: "TransmitUsingCable", icon: getCableIcon()) {
|
||||
openCableTransmissionView()
|
||||
}
|
||||
|
||||
@@ -90,6 +90,20 @@ struct WelcomeScreen: View {
|
||||
NSWorkspace.shared.open(url)
|
||||
}
|
||||
}
|
||||
|
||||
func getPhoneIcon() -> String {
|
||||
if #available(macOS 14.0, *) {
|
||||
return "smartphone"
|
||||
}
|
||||
return "iphone.rear.camera"
|
||||
}
|
||||
|
||||
func getCableIcon() -> String {
|
||||
if #available(macOS 12.0, *) {
|
||||
return "cable.connector"
|
||||
}
|
||||
return "externaldrive.connected.to.line.below.fill"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user