add viewmodifiers.siwft to conditionally do viewmodifiers

replaced all the .apply s everywhere
colorcodable into its own file
add icon changing for mac
This commit is contained in:
neon443
2025-06-13 18:30:07 +01:00
parent 3f21074091
commit 6e7bc6c2d1
15 changed files with 177 additions and 137 deletions

View File

@@ -118,11 +118,6 @@ struct EventListView: View {
.spring(response: 0.2, dampingFraction: 0.75, blendDuration: 2),
value: largeTick
)
.apply {
if #available(iOS 17, *) {
$0.sensoryFeedback(.success, trigger: event.complete)
}
}
}
.transition(.opacity)
.fixedSize(horizontal: false, vertical: true)

View File

@@ -143,11 +143,7 @@ struct AddEventView: View {
.buttonStyle(BorderedProminentButtonStyle())
}
.tint(.accent)
.apply {
if #available(iOS 17, *) {
$0.sensoryFeedback(.success, trigger: bye)
}
}
.modifier(hapticSuccess(trigger: bye))
.disabled(event.name.isEmpty)
.onTapGesture {
if event.name.isEmpty {