mirror of
https://invent.kde.org/network/kdeconnect-ios.git
synced 2025-12-12 20:36:04 +01:00
Fix library search path, macOS entitlements
UI: empty battery status when unavailable, clickable row for PeerSettingsView Release 0.4.2 (7)
This commit is contained in:
@@ -1079,8 +1079,9 @@
|
||||
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(LD_RUNPATH_SEARCH_PATHS_$(IS_MACCATALYST))",
|
||||
"@executable_path/Frameworks",
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 13.0;
|
||||
MARKETING_VERSION = 0.4.2;
|
||||
@@ -1117,8 +1118,9 @@
|
||||
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(LD_RUNPATH_SEARCH_PATHS_$(IS_MACCATALYST))",
|
||||
"@executable_path/Frameworks",
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 13.0;
|
||||
MARKETING_VERSION = 0.4.2;
|
||||
|
||||
@@ -2,6 +2,12 @@
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.network.server</key>
|
||||
<true/>
|
||||
<key>com.apple.security.network.client</key>
|
||||
<true/>
|
||||
<key>com.apple.developer.usernotifications.time-sensitive</key>
|
||||
<true/>
|
||||
<key>com.apple.security.app-sandbox</key>
|
||||
<true/>
|
||||
<key>com.apple.developer.device-information.user-assigned-device-name</key>
|
||||
|
||||
@@ -50,8 +50,12 @@ struct BatteryStatus<ValidBatteryStatusContent: View>: View {
|
||||
if isEnabled == nil || battery.remoteChargeLevel == 0 {
|
||||
makeNoBatteryView()
|
||||
} else if isEnabled == false {
|
||||
#if !os(macOS)
|
||||
Text("Battery Plugin Disabled")
|
||||
.font(.footnote)
|
||||
#else
|
||||
makeNoBatteryView()
|
||||
#endif
|
||||
} else {
|
||||
validBatteryContent(battery)
|
||||
}
|
||||
@@ -59,8 +63,12 @@ struct BatteryStatus<ValidBatteryStatusContent: View>: View {
|
||||
}
|
||||
|
||||
private static func makeNoBatteryView() -> some View {
|
||||
#if !os(macOS)
|
||||
Text("No battery detected in device")
|
||||
.font(.footnote)
|
||||
#else
|
||||
EmptyView()
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ struct PeerSettingsView: View {
|
||||
@State var editingIndex = -1
|
||||
|
||||
var peerList: some View {
|
||||
ForEach(self.$directIPs.indices, id:\.self) { ind in
|
||||
ForEach(self.$directIPs.indices, id: \.self) { ind in
|
||||
HStack {
|
||||
if self.selectedIndex == ind && self.editingIndex == ind {
|
||||
TextField("", text: self.$directIPs[ind])
|
||||
@@ -40,8 +40,11 @@ struct PeerSettingsView: View {
|
||||
self.editingIndex = -1
|
||||
}
|
||||
} else {
|
||||
Text(self.directIPs[ind])
|
||||
.padding(.horizontal, 4)
|
||||
HStack {
|
||||
Text(self.directIPs[ind]).padding(.horizontal, 4)
|
||||
Spacer()
|
||||
}
|
||||
.contentShape(Rectangle())
|
||||
.foregroundColor(self.selectedIndex == ind ? .white : .black)
|
||||
.onTapGesture {
|
||||
if self.selectedIndex == ind {
|
||||
@@ -50,7 +53,7 @@ struct PeerSettingsView: View {
|
||||
self.selectedIndex = ind
|
||||
self.editingIndex = -1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Spacer()
|
||||
}
|
||||
@@ -61,10 +64,11 @@ struct PeerSettingsView: View {
|
||||
|
||||
var mainFrame: some View {
|
||||
HStack {
|
||||
if self.directIPs.count > 0 {
|
||||
if !self.directIPs.isEmpty {
|
||||
ScrollView(showsIndicators: true) {
|
||||
peerList
|
||||
}.background(.white)
|
||||
}
|
||||
.background(.white)
|
||||
.onTapGesture {
|
||||
self.selectedIndex = -1
|
||||
self.editingIndex = -1
|
||||
|
||||
Reference in New Issue
Block a user