diff --git a/Passepartout/Library/Sources/AppUIMain/Views/Modules/OpenVPNView.swift b/Passepartout/Library/Sources/AppUIMain/Views/Modules/OpenVPNView.swift index 0717b6a8..2ed92fcb 100644 --- a/Passepartout/Library/Sources/AppUIMain/Views/Modules/OpenVPNView.swift +++ b/Passepartout/Library/Sources/AppUIMain/Views/Modules/OpenVPNView.swift @@ -80,7 +80,7 @@ struct OpenVPNView: View, ModuleDraftEditing { var body: some View { contentView - .moduleView(editor: editor, draft: draft.wrappedValue, withName: !isServerPushed) + .moduleView(editor: editor, draft: draft.wrappedValue) .fileImporter( isPresented: $isImporting, allowedContentTypes: [.item], diff --git a/Passepartout/Library/Sources/AppUIMain/Views/Profile/ModuleViewModifier.swift b/Passepartout/Library/Sources/AppUIMain/Views/Profile/ModuleViewModifier.swift index c793f655..2db94fda 100644 --- a/Passepartout/Library/Sources/AppUIMain/Views/Profile/ModuleViewModifier.swift +++ b/Passepartout/Library/Sources/AppUIMain/Views/Profile/ModuleViewModifier.swift @@ -33,16 +33,8 @@ struct ModuleViewModifier: ViewModifier where T: ModuleBuilder & Equatable { let draft: T - let withName: Bool - func body(content: Content) -> some View { Form { - if withName { - NameSection( - name: editor.binding(forNameOf: draft.id), - placeholder: draft.moduleType.localizedDescription - ) - } content } .themeForm() @@ -52,7 +44,7 @@ struct ModuleViewModifier: ViewModifier where T: ModuleBuilder & Equatable { } extension View { - func moduleView(editor: ProfileEditor, draft: T, withName: Bool = true) -> some View where T: ModuleBuilder & Equatable { - modifier(ModuleViewModifier(editor: editor, draft: draft, withName: withName)) + func moduleView(editor: ProfileEditor, draft: T) -> some View where T: ModuleBuilder & Equatable { + modifier(ModuleViewModifier(editor: editor, draft: draft)) } }