fix: hide Creative Tools in release builds and improve Add Item keyboard behavior
Gate Icon Generator section behind #if DEBUG and group it with other debug sections at the bottom of Settings. Remove auto-focus on description field, dismiss keyboard on return key and on scroll. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -49,9 +49,6 @@ struct SettingsView: View {
|
|||||||
// Privacy
|
// Privacy
|
||||||
privacySection
|
privacySection
|
||||||
|
|
||||||
// Icon Generator
|
|
||||||
iconGeneratorSection
|
|
||||||
|
|
||||||
// About
|
// About
|
||||||
aboutSection
|
aboutSection
|
||||||
|
|
||||||
@@ -59,6 +56,9 @@ struct SettingsView: View {
|
|||||||
resetSection
|
resetSection
|
||||||
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
|
// Icon Generator
|
||||||
|
iconGeneratorSection
|
||||||
|
|
||||||
// Debug
|
// Debug
|
||||||
debugSection
|
debugSection
|
||||||
|
|
||||||
@@ -377,6 +377,7 @@ struct SettingsView: View {
|
|||||||
|
|
||||||
// MARK: - Icon Generator Section
|
// MARK: - Icon Generator Section
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
private var iconGeneratorSection: some View {
|
private var iconGeneratorSection: some View {
|
||||||
Section {
|
Section {
|
||||||
NavigationLink {
|
NavigationLink {
|
||||||
@@ -404,6 +405,7 @@ struct SettingsView: View {
|
|||||||
}
|
}
|
||||||
.listRowBackground(Theme.cardBackground(colorScheme))
|
.listRowBackground(Theme.cardBackground(colorScheme))
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// MARK: - Reset Section
|
// MARK: - Reset Section
|
||||||
|
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ struct QuickAddItemSheet: View {
|
|||||||
.padding(.top, Theme.Spacing.md)
|
.padding(.top, Theme.Spacing.md)
|
||||||
.padding(.bottom, Theme.Spacing.xxl)
|
.padding(.bottom, Theme.Spacing.xxl)
|
||||||
}
|
}
|
||||||
.scrollDismissesKeyboard(.interactively)
|
.scrollDismissesKeyboard(.immediately)
|
||||||
.background(Theme.backgroundGradient(colorScheme))
|
.background(Theme.backgroundGradient(colorScheme))
|
||||||
.navigationTitle(isEditing ? "Edit Item" : "Add to Day \(day)")
|
.navigationTitle(isEditing ? "Edit Item" : "Add to Day \(day)")
|
||||||
.navigationBarTitleDisplayMode(.inline)
|
.navigationBarTitleDisplayMode(.inline)
|
||||||
@@ -102,10 +102,6 @@ struct QuickAddItemSheet: View {
|
|||||||
}
|
}
|
||||||
.onAppear {
|
.onAppear {
|
||||||
loadExistingItem()
|
loadExistingItem()
|
||||||
// Focus text field after a brief delay
|
|
||||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
|
|
||||||
isTitleFocused = true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
.task {
|
.task {
|
||||||
await loadNearbyPOIs()
|
await loadNearbyPOIs()
|
||||||
@@ -126,6 +122,8 @@ struct QuickAddItemSheet: View {
|
|||||||
.font(.body)
|
.font(.body)
|
||||||
.lineLimit(1...3)
|
.lineLimit(1...3)
|
||||||
.focused($isTitleFocused)
|
.focused($isTitleFocused)
|
||||||
|
.submitLabel(.done)
|
||||||
|
.onSubmit { isTitleFocused = false }
|
||||||
.padding(Theme.Spacing.md)
|
.padding(Theme.Spacing.md)
|
||||||
.background(inputBackground)
|
.background(inputBackground)
|
||||||
.clipShape(RoundedRectangle(cornerRadius: Theme.CornerRadius.medium))
|
.clipShape(RoundedRectangle(cornerRadius: Theme.CornerRadius.medium))
|
||||||
|
|||||||
Reference in New Issue
Block a user