iOS: Fix share extension showed app introduction, share extension add cancel button, add browse button to settings

This commit is contained in:
Leon Böttger committed 2025-08-18 10:10:37 +02:00
1 parent 006f389891
commit 9d71ed35b7
4 files changed
+152 -14

No files matched your search

+26 -3
View File
@@ -13,8 +13,15 @@ struct ContentView: View {
var body: some View {
AppRootView(isPlus: .constant(true), phoneView: {
DeviceListView()
.environment(\.sheetActive, isShareExtension())
}, settingsView: {
EmptyView()
CustomSection {
LUIButton {
SaveFilesManager.shared.openDownloadedFilesFolder()
} label: {
NavigationLinkLabel(imageName: "folder.fill", text: "BrowseDownloadedFiles")
}
}
})
}
}
@@ -31,7 +38,7 @@ struct DeviceListView: View {
var body: some View {
NavigationSubView(header: "QuickDrop ") {
NavigationSubView(header: "QuickDrop ", navigationBarLayout: isShareExtension() ? .SmallOnlyAlways : .Default) {
VStack(alignment: .leading, spacing: 8) {
@@ -117,7 +124,14 @@ struct DeviceListView: View {
}
.padding(.vertical, 16)
}
.navigationBarItems(trailing: LUISettingsButton())
.navigationBarItems(trailing: ZStack {
if isShareExtension() {
XButton(action: { NearbyConnectionManager.shared.attachments?.closeView?() })
}
else {
LUISettingsButton()
}
})
}
}
@@ -176,6 +190,15 @@ struct DeviceButton: View {
}
func isShareExtension() -> Bool {
#if EXTENSION
return true
#else
return false
#endif
}
//extension DeviceListView {
// static var preview: DeviceListView {
// let model = SendModel()