fix: no proper loading feedback on forms
This commit is contained in:
parent
cbb14ffba2
commit
d224f5a10a
27 changed files with 192 additions and 57 deletions
|
|
@ -79,7 +79,7 @@ templ Dashboard(spaces []*model.Space) {
|
|||
Cancel
|
||||
}
|
||||
}
|
||||
@button.Button(button.Props{Type: button.TypeSubmit}) {
|
||||
@button.Submit() {
|
||||
Create
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -89,9 +89,7 @@ templ AppSettings(hasPassword bool, errorMsg string) {
|
|||
}
|
||||
}
|
||||
}
|
||||
@button.Button(button.Props{
|
||||
Type: button.TypeSubmit,
|
||||
}) {
|
||||
@button.Submit() {
|
||||
if hasPassword {
|
||||
Change Password
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -261,7 +261,7 @@ templ AddBudgetForm(spaceID string, tags []*model.Tag) {
|
|||
})
|
||||
</div>
|
||||
<div class="flex justify-end">
|
||||
@button.Button(button.Props{Type: button.TypeSubmit}) {
|
||||
@button.Submit() {
|
||||
Save
|
||||
}
|
||||
</div>
|
||||
|
|
@ -374,7 +374,7 @@ templ EditBudgetForm(spaceID string, b *model.BudgetWithSpent, tags []*model.Tag
|
|||
}
|
||||
</div>
|
||||
<div class="flex justify-end">
|
||||
@button.Button(button.Props{Type: button.TypeSubmit}) {
|
||||
@button.Submit() {
|
||||
Save
|
||||
}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -63,9 +63,7 @@ templ SpaceListDetailPage(space *model.Space, list *model.ShoppingList, items []
|
|||
"autocomplete": "off",
|
||||
},
|
||||
})
|
||||
@button.Button(button.Props{
|
||||
Type: button.TypeSubmit,
|
||||
}) {
|
||||
@button.Submit() {
|
||||
Add Item
|
||||
}
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -27,9 +27,7 @@ templ SpaceListsPage(space *model.Space, cards []model.ListCardData) {
|
|||
Name: "name",
|
||||
Placeholder: "New list name...",
|
||||
})
|
||||
@button.Button(button.Props{
|
||||
Type: button.TypeSubmit,
|
||||
}) {
|
||||
@button.Submit() {
|
||||
Create
|
||||
}
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -46,9 +46,7 @@ templ SpaceSettingsPage(space *model.Space, members []*model.SpaceMemberWithProf
|
|||
"required": true,
|
||||
},
|
||||
})
|
||||
@button.Button(button.Props{
|
||||
Type: button.TypeSubmit,
|
||||
}) {
|
||||
@button.Submit() {
|
||||
Save
|
||||
}
|
||||
</form>
|
||||
|
|
@ -110,9 +108,7 @@ templ SpaceSettingsPage(space *model.Space, members []*model.SpaceMemberWithProf
|
|||
"required": true,
|
||||
},
|
||||
})
|
||||
@button.Button(button.Props{
|
||||
Type: button.TypeSubmit,
|
||||
}) {
|
||||
@button.Submit() {
|
||||
@icon.UserPlus(icon.Props{Class: "size-4"})
|
||||
Invite
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,9 +30,7 @@ templ SpaceTagsPage(space *model.Space, tags []*model.Tag) {
|
|||
"autocomplete": "off",
|
||||
},
|
||||
})
|
||||
@button.Button(button.Props{
|
||||
Type: button.TypeSubmit,
|
||||
}) {
|
||||
@button.Submit() {
|
||||
Create
|
||||
}
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -57,8 +57,7 @@ templ Auth(errorMsg string) {
|
|||
}
|
||||
}
|
||||
}
|
||||
@button.Button(button.Props{
|
||||
Type: button.TypeSubmit,
|
||||
@button.Submit(button.Props{
|
||||
FullWidth: true,
|
||||
}) {
|
||||
Continue with Email
|
||||
|
|
|
|||
|
|
@ -39,10 +39,9 @@ templ MagicLinkSent(email string) {
|
|||
>
|
||||
@csrf.Token()
|
||||
<input type="hidden" name="email" value={ email }/>
|
||||
@button.Button(button.Props{
|
||||
@button.Submit(button.Props{
|
||||
Variant: button.VariantOutline,
|
||||
FullWidth: true,
|
||||
Type: button.TypeSubmit,
|
||||
}) {
|
||||
Resend magic link
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,8 +76,7 @@ templ AuthPassword(errorMsg string) {
|
|||
</a>
|
||||
</div>
|
||||
}
|
||||
@button.Button(button.Props{
|
||||
Type: button.TypeSubmit,
|
||||
@button.Submit(button.Props{
|
||||
FullWidth: true,
|
||||
}) {
|
||||
Sign In
|
||||
|
|
|
|||
|
|
@ -66,8 +66,7 @@ templ OnboardingWelcome() {
|
|||
<form action="/auth/logout" method="POST" class="text-center mt-6">
|
||||
@csrf.Token()
|
||||
<span class="text-sm text-muted-foreground">Not you? </span>
|
||||
@button.Button(button.Props{
|
||||
Type: button.TypeSubmit,
|
||||
@button.Submit(button.Props{
|
||||
Variant: button.VariantLink,
|
||||
Class: "p-0 h-auto text-sm",
|
||||
}) {
|
||||
|
|
@ -138,8 +137,7 @@ templ OnboardingName(errorMsg string) {
|
|||
@icon.ArrowLeft()
|
||||
Back
|
||||
}
|
||||
@button.Button(button.Props{
|
||||
Type: button.TypeSubmit,
|
||||
@button.Submit(button.Props{
|
||||
Class: "grow",
|
||||
}) {
|
||||
Continue
|
||||
|
|
@ -150,8 +148,7 @@ templ OnboardingName(errorMsg string) {
|
|||
<form action="/auth/logout" method="POST" class="text-center mt-6">
|
||||
@csrf.Token()
|
||||
<span class="text-sm text-muted-foreground">Not you? </span>
|
||||
@button.Button(button.Props{
|
||||
Type: button.TypeSubmit,
|
||||
@button.Submit(button.Props{
|
||||
Variant: button.VariantLink,
|
||||
Class: "p-0 h-auto text-sm",
|
||||
}) {
|
||||
|
|
@ -222,8 +219,7 @@ templ OnboardingSpace(name string, errorMsg string) {
|
|||
@icon.ArrowLeft()
|
||||
Back
|
||||
}
|
||||
@button.Button(button.Props{
|
||||
Type: button.TypeSubmit,
|
||||
@button.Submit(button.Props{
|
||||
Class: "grow",
|
||||
}) {
|
||||
Create Space
|
||||
|
|
@ -233,8 +229,7 @@ templ OnboardingSpace(name string, errorMsg string) {
|
|||
<form action="/auth/logout" method="POST" class="text-center mt-6">
|
||||
@csrf.Token()
|
||||
<span class="text-sm text-muted-foreground">Not you? </span>
|
||||
@button.Button(button.Props{
|
||||
Type: button.TypeSubmit,
|
||||
@button.Submit(button.Props{
|
||||
Variant: button.VariantLink,
|
||||
Class: "p-0 h-auto text-sm",
|
||||
}) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue