Minor fixes
This commit is contained in:
@@ -78,11 +78,6 @@ public struct ProfileCard: View {
|
||||
QRCodeSheet(profileName: profile.name, remoteURL: remoteURL)
|
||||
}
|
||||
}
|
||||
.sheet(isPresented: $viewModel.showQRSShare) {
|
||||
if let profile = selectedProfile, let data = try? profile.origin.toContent().encode() {
|
||||
QRSSheet(profileName: profile.name, profileData: data)
|
||||
}
|
||||
}
|
||||
#else
|
||||
.sheet(isPresented: $viewModel.showNewProfile, onDismiss: {
|
||||
environments.profileUpdate.send()
|
||||
@@ -269,10 +264,12 @@ public struct ProfileCard: View {
|
||||
}
|
||||
}
|
||||
|
||||
Button {
|
||||
viewModel.showQRSShare = true
|
||||
} label: {
|
||||
Label("Share as QRS Code", systemImage: "barcode")
|
||||
if let data = try? profile.origin.toContent().encode() {
|
||||
FormNavigationLink {
|
||||
QRSSheet(profileName: profile.name, profileData: data)
|
||||
} label: {
|
||||
Label("Share as QRS Code", systemImage: "qrcode")
|
||||
}
|
||||
}
|
||||
} label: {
|
||||
Image(systemName: "square.and.arrow.up")
|
||||
@@ -317,7 +314,7 @@ public struct ProfileCard: View {
|
||||
Button {
|
||||
viewModel.showQRSShare = true
|
||||
} label: {
|
||||
Label("Share as QRS Code", systemImage: "barcode")
|
||||
Label("Share as QRS Code", systemImage: "qrcode")
|
||||
}
|
||||
} label: {
|
||||
Image(systemName: "square.and.arrow.up")
|
||||
@@ -497,10 +494,12 @@ extension ProfileCard {
|
||||
@Published var alert: AlertState?
|
||||
@Published var profileToEdit: Profile?
|
||||
@Published var shareItemType: ShareItemType?
|
||||
#if !os(tvOS)
|
||||
@Published var profileExportDocument: ProfileExportDocument?
|
||||
@Published var showProfileExporter = false
|
||||
@Published var profileJSONExportDocument: ProfileJSONExportDocument?
|
||||
@Published var showJSONExporter = false
|
||||
#endif
|
||||
#if os(macOS)
|
||||
var shareButtonView: NSView?
|
||||
#endif
|
||||
|
||||
@@ -570,11 +570,6 @@ private struct ProfilePickerRow: View {
|
||||
QRCodeSheet(profileName: profile.name, remoteURL: remoteURL)
|
||||
}
|
||||
}
|
||||
.sheet(isPresented: $showQRSShare) {
|
||||
if let data = try? profile.origin.toContent().encode() {
|
||||
QRSSheet(profileName: profile.name, profileData: data)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private var tvOSNormalBody: some View {
|
||||
@@ -632,10 +627,12 @@ private struct ProfilePickerRow: View {
|
||||
}
|
||||
}
|
||||
|
||||
Button {
|
||||
showQRSShare = true
|
||||
} label: {
|
||||
Label("Share as QRS Code", systemImage: "barcode")
|
||||
if let data = try? profile.origin.toContent().encode() {
|
||||
FormNavigationLink {
|
||||
QRSSheet(profileName: profile.name, profileData: data)
|
||||
} label: {
|
||||
Label("Share as QRS Code", systemImage: "barcode")
|
||||
}
|
||||
}
|
||||
} label: {
|
||||
Label("Share", systemImage: "square.and.arrow.up")
|
||||
|
||||
Reference in New Issue
Block a user