fix: change back to login button and add to register option screen (#4847)

* fix: change back to login button and add to register option screen

* fix: change back to login button and add logic for remove and set events

Co-authored-by: Fabi <[email protected]>
This commit is contained in:
Stefan Benz
2022-12-20 09:26:48 +01:00
committed by GitHub
co-authored by Fabi
parent 5d61ed5cac
commit 339fbd4f0c
14 changed files with 75 additions and 5 deletions
@@ -204,6 +204,7 @@ type CustomLoginTextReadModel struct {
RegistrationOptionDescription string
RegistrationOptionUserNameButtonText string
RegistrationOptionExternalLoginDescription string
RegistrationOptionLoginButtonText string
RegistrationUserTitle string
RegistrationUserDescription string
@@ -1878,6 +1879,10 @@ func (wm *CustomLoginTextReadModel) handleRegistrationOptionScreenSetEvent(e *po
wm.RegistrationOptionExternalLoginDescription = e.Text
return
}
if e.Key == domain.LoginKeyRegistrationOptionLoginButtonText {
wm.RegistrationOptionLoginButtonText = e.Text
return
}
}
func (wm *CustomLoginTextReadModel) handleRegistrationOptionScreenRemoveEvent(e *policy.CustomTextRemovedEvent) {
@@ -1897,6 +1902,10 @@ func (wm *CustomLoginTextReadModel) handleRegistrationOptionScreenRemoveEvent(e
wm.RegistrationOptionExternalLoginDescription = ""
return
}
if e.Key == domain.LoginKeyRegistrationOptionLoginButtonText {
wm.RegistrationOptionLoginButtonText = ""
return
}
}
func (wm *CustomLoginTextReadModel) handleRegistrationUserScreenSetEvent(e *policy.CustomTextSetEvent) {