mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-23 03:06:46 +00:00
fix(login): use label policy settings for favicon, translate titles (#4641)
* fix: render favicon from label policy * translate main title * translation * i18n * i18n * i18nkey * rm attr * select user title * Add description meta * Update internal/api/ui/login/mfa_init_verify_handler.go Co-authored-by: Livio Spring <livio.a@gmail.com> * Update internal/api/ui/login/renderer.go Co-authored-by: Livio Spring <livio.a@gmail.com> * merge ifs * use errors.internal * check for i18ndescriptionkey * missing i18n Co-authored-by: Livio Spring <livio.a@gmail.com>
This commit is contained in:
@@ -17,12 +17,21 @@ type userSelectionFormData struct {
|
||||
}
|
||||
|
||||
func (l *Login) renderUserSelection(w http.ResponseWriter, r *http.Request, authReq *domain.AuthRequest, selectionData *domain.SelectUserStep) {
|
||||
data := userSelectionData{
|
||||
baseData: l.getBaseData(r, authReq, "Select User", "", ""),
|
||||
Users: selectionData.Users,
|
||||
Linking: len(authReq.LinkingUsers) > 0,
|
||||
}
|
||||
translator := l.getTranslator(r.Context(), authReq)
|
||||
|
||||
linking := len(authReq.LinkingUsers) > 0
|
||||
|
||||
titleI18nKey := "SelectAccount.Title"
|
||||
descriptionI18nKey := "SelectAccount.Description"
|
||||
if linking {
|
||||
titleI18nKey = "SelectAccount.TitleLinking"
|
||||
descriptionI18nKey = "SelectAccount.DescriptionLinking"
|
||||
}
|
||||
data := userSelectionData{
|
||||
baseData: l.getBaseData(r, authReq, titleI18nKey,descriptionI18nKey, "", ""),
|
||||
Users: selectionData.Users,
|
||||
Linking: linking,
|
||||
}
|
||||
l.renderer.RenderTemplate(w, r, translator, l.renderer.Templates[tmplUserSelection], data, nil)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user