mirror of
https://github.com/neon443/NearFuture.git
synced 2026-03-11 06:49:12 +00:00
fix modifier uses
fix addeventview not compiling
This commit is contained in:
@@ -14,4 +14,4 @@ BUNDLE_ID_WIDGETS = com.neon443.NearFuture.widgets
|
|||||||
GROUP_ID = group.NearFuture
|
GROUP_ID = group.NearFuture
|
||||||
VERSION = 5
|
VERSION = 5
|
||||||
NAME = Near Future
|
NAME = Near Future
|
||||||
BUILD_NUMBER = 18
|
BUILD_NUMBER = 27
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ struct ContentView: View {
|
|||||||
}
|
}
|
||||||
.tag(Tab.settings)
|
.tag(Tab.settings)
|
||||||
}
|
}
|
||||||
.modifier(hapticHeavy(trigger: tabSelection))
|
.hapticHeavy(trigger: tabSelection)
|
||||||
.sheet(isPresented: $settingsModel.settings.showWhatsNew) {
|
.sheet(isPresented: $settingsModel.settings.showWhatsNew) {
|
||||||
WhatsNewView(settingsModel: settingsModel)
|
WhatsNewView(settingsModel: settingsModel)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,8 +16,6 @@ struct AddEventView: View {
|
|||||||
@State var showNeedsNameAlert: Bool = false
|
@State var showNeedsNameAlert: Bool = false
|
||||||
@State var isSymbolPickerPresented: Bool = false
|
@State var isSymbolPickerPresented: Bool = false
|
||||||
|
|
||||||
@State private var bye: Bool = false
|
|
||||||
|
|
||||||
@FocusState private var focusedField: Field?
|
@FocusState private var focusedField: Field?
|
||||||
private enum Field {
|
private enum Field {
|
||||||
case Name, Notes
|
case Name, Notes
|
||||||
@@ -152,13 +150,14 @@ struct AddEventView: View {
|
|||||||
viewModel.addEvent(
|
viewModel.addEvent(
|
||||||
newEvent: event
|
newEvent: event
|
||||||
)
|
)
|
||||||
bye.toggle()
|
|
||||||
resetAddEventView()
|
resetAddEventView()
|
||||||
|
#if canImport(UIKit)
|
||||||
|
UINotificationFeedbackGenerator().notificationOccurred(.success)
|
||||||
|
#endif
|
||||||
} label: {
|
} label: {
|
||||||
Label("Save", systemImage: "checkmark")
|
Label("Save", systemImage: "checkmark")
|
||||||
}
|
}
|
||||||
.tint(.accent)
|
.tint(.accent)
|
||||||
.modifier(hapticSuccess(trigger: bye))
|
|
||||||
.disabled(event.name.isEmpty)
|
.disabled(event.name.isEmpty)
|
||||||
.onTapGesture {
|
.onTapGesture {
|
||||||
if event.name.isEmpty {
|
if event.name.isEmpty {
|
||||||
@@ -180,6 +179,9 @@ struct AddEventView: View {
|
|||||||
Button() {
|
Button() {
|
||||||
viewModel.editEvent(event)
|
viewModel.editEvent(event)
|
||||||
dismiss()
|
dismiss()
|
||||||
|
#if canImport(UIKit)
|
||||||
|
UINotificationFeedbackGenerator().notificationOccurred(.success)
|
||||||
|
#endif
|
||||||
} label: {
|
} label: {
|
||||||
Label("Done", systemImage: "checkmark")
|
Label("Done", systemImage: "checkmark")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ struct WhatsNewView: View {
|
|||||||
}
|
}
|
||||||
.foregroundStyle(.orange)
|
.foregroundStyle(.orange)
|
||||||
.modifier(glassButton())
|
.modifier(glassButton())
|
||||||
.modifier(hapticHeavy(trigger: bye))
|
.hapticHeavy(trigger: bye)
|
||||||
}
|
}
|
||||||
.scrollContentBackground(.hidden)
|
.scrollContentBackground(.hidden)
|
||||||
.presentationDragIndicator(.visible)
|
.presentationDragIndicator(.visible)
|
||||||
|
|||||||
Reference in New Issue
Block a user