mirror of
https://github.com/metabolist/metatext
synced 2024-12-28 02:30:30 +01:00
UI refinements
This commit is contained in:
parent
921e84c08b
commit
757e8dba35
@ -10,4 +10,13 @@ extension View {
|
|||||||
Alert(title: Text($0.error.localizedDescription))
|
Alert(title: Text($0.error.localizedDescription))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ViewBuilder
|
||||||
|
func animation(_ animation: Animation?, if condition: Bool) -> some View {
|
||||||
|
if condition {
|
||||||
|
self.animation(animation)
|
||||||
|
} else {
|
||||||
|
self
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,7 @@ struct AddIdentityView: View {
|
|||||||
.frame(maxWidth: .infinity, alignment: .center)
|
.frame(maxWidth: .infinity, alignment: .center)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.animation(.default)
|
.animation(.default, if: !viewModel.loading)
|
||||||
.alertItem($viewModel.alertItem)
|
.alertItem($viewModel.alertItem)
|
||||||
.onReceive(viewModel.addedIdentityID) { id in
|
.onReceive(viewModel.addedIdentityID) { id in
|
||||||
withAnimation {
|
withAnimation {
|
||||||
|
Loading…
Reference in New Issue
Block a user