Fix duplicate title in Import Profile sheet on macOS
This commit is contained in:
@@ -135,11 +135,13 @@ public struct NewProfileView: View {
|
|||||||
#if os(macOS)
|
#if os(macOS)
|
||||||
private var macOSBody: some View {
|
private var macOSBody: some View {
|
||||||
VStack(alignment: .leading, spacing: 0) {
|
VStack(alignment: .leading, spacing: 0) {
|
||||||
|
if !viewModel.isImport {
|
||||||
Text("New Profile")
|
Text("New Profile")
|
||||||
.font(.headline)
|
.font(.headline)
|
||||||
.padding(.horizontal, 20)
|
.padding(.horizontal, 20)
|
||||||
.padding(.top, 20)
|
.padding(.top, 20)
|
||||||
.padding(.bottom, 12)
|
.padding(.bottom, 12)
|
||||||
|
}
|
||||||
|
|
||||||
formContent
|
formContent
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,10 @@ public final class NewProfileViewModel: BaseViewModel {
|
|||||||
@Published public var autoUpdateInterval: Int32 = 60
|
@Published public var autoUpdateInterval: Int32 = 60
|
||||||
@Published public var pickerPresented = false
|
@Published public var pickerPresented = false
|
||||||
|
|
||||||
|
public let isImport: Bool
|
||||||
|
|
||||||
public init(importRequest: NewProfileView.ImportRequest? = nil, localImportRequest: NewProfileView.LocalImportRequest? = nil) {
|
public init(importRequest: NewProfileView.ImportRequest? = nil, localImportRequest: NewProfileView.LocalImportRequest? = nil) {
|
||||||
|
isImport = importRequest != nil
|
||||||
super.init()
|
super.init()
|
||||||
if let importRequest {
|
if let importRequest {
|
||||||
profileName = importRequest.name
|
profileName = importRequest.name
|
||||||
|
|||||||
Reference in New Issue
Block a user