Skip to content

Commit

Permalink
Submit login and consent form with enter key
Browse files Browse the repository at this point in the history
  • Loading branch information
Brutus5000 committed Dec 25, 2024
1 parent 8b05a0d commit e5eb344
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import com.faforever.userservice.ui.component.ScopeWidget
import com.faforever.userservice.ui.component.SocialIcons
import com.faforever.userservice.ui.layout.CardLayout
import com.faforever.userservice.ui.layout.CompactVerticalLayout
import com.vaadin.flow.component.Key
import com.vaadin.flow.component.button.Button
import com.vaadin.flow.component.button.ButtonVariant
import com.vaadin.flow.component.orderedlayout.FlexComponent
Expand All @@ -26,6 +27,7 @@ class ConsentView(
private val authorize =
Button(getTranslation("consent.authorize")) { authorize() }.apply {
addThemeVariants(ButtonVariant.LUMO_PRIMARY)
addClickShortcut(Key.ENTER)
}
private val deny = Button(getTranslation("consent.deny")) { deny() }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ class LoginView(
private val submit = Button(getTranslation("login.loginAction")) { login() }.apply {
setWidthFull()
addThemeVariants(ButtonVariant.LUMO_PRIMARY)
addClickShortcut(Key.ENTER)
}
private val loginLayout = CompactVerticalLayout(usernameOrEmail, password, submit)

Expand Down

0 comments on commit e5eb344

Please sign in to comment.