From fbff719066b2c17389bd7c1f0bc14da0a62261cd Mon Sep 17 00:00:00 2001 From: Thomas Ricouard Date: Wed, 19 Jul 2023 08:13:16 +0200 Subject: [PATCH] Fixes to add tag group view --- .../App/Tabs/Timeline/AddTagGroupView.swift | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/IceCubesApp/App/Tabs/Timeline/AddTagGroupView.swift b/IceCubesApp/App/Tabs/Timeline/AddTagGroupView.swift index 5ec7d585..06401626 100644 --- a/IceCubesApp/App/Tabs/Timeline/AddTagGroupView.swift +++ b/IceCubesApp/App/Tabs/Timeline/AddTagGroupView.swift @@ -17,6 +17,7 @@ struct AddTagGroupView: View { @State private var sfSymbolName: String = "" @State private var tags: [String] = [] @State private var newTag: String = "" + @State private var popupTagsPresented = false private var canSave: Bool { !title.isEmpty && @@ -34,31 +35,31 @@ struct AddTagGroupView: View { var body: some View { NavigationStack { - Form { - metadataSection - keywordsSection - } - .formStyle(.grouped) - .navigationTitle("timeline.filter.add-tag-groups") - .navigationBarTitleDisplayMode(.inline) - .scrollContentBackground(.hidden) - .background(theme.secondaryBackgroundColor) - .scrollDismissesKeyboard(.immediately) - .toolbar { - ToolbarItem(placement: .navigationBarLeading) { - Button("action.cancel", action: { dismiss() }) + ZStack(alignment: .bottom) { + Form { + metadataSection + keywordsSection } - ToolbarItem(placement: .navigationBarTrailing) { - Button("action.save", action: { save() }) - .disabled(!canSave) + .formStyle(.grouped) + .navigationTitle("timeline.filter.add-tag-groups") + .navigationBarTitleDisplayMode(.inline) + .scrollContentBackground(.hidden) + .background(theme.secondaryBackgroundColor) + .scrollDismissesKeyboard(.immediately) + .toolbar { + ToolbarItem(placement: .navigationBarLeading) { + Button("action.cancel", action: { dismiss() }) + } + ToolbarItem(placement: .navigationBarTrailing) { + Button("action.save", action: { save() }) + .disabled(!canSave) + } } + symbolsSuggestionView } .onAppear { focusedField = .title } - .overlay(alignment: .bottom) { - symbolsSuggestionView - } } } @@ -86,10 +87,9 @@ struct AddTagGroupView: View { Image(systemName: sfSymbolName) } } + .listRowBackground(theme.primaryBackgroundColor) } - @State private var popupTagsPresented = false - private var keywordsSection: some View { Section("add-tag-groups.edit.tags") { ForEach(tags, id: \.self) { tag in