feat(console): message and login texts, privacy policy (#2016)

* message texts wrapper components

* message-text sub, i18n, grid

* fix routing

* pack

* pack

* update material

* audit

* fix mgmt service for labelplcy

* map conv

* edit text from map

* request map

* fetch data, mgmt admin service

* warn box, i18n

* resetbtn

* login texts

* login text requests

* reset, default, i18n

* disabled, features, message text setter, service

* locale switcher

* policy grid

* password reset, domain claimed i18n

* lint files

* fix admin service, i18n, lang setter

* fix scss duplicate

* privacy policy, cleanup grid, fix message, login texts (#2031)

* policy grid everywhere 🦒

* cleanup home

* log login text request

* patch all data

* refresh toggle

* fix: add dialog for unsaved changes (#2057)

* logintexts dialog

* check for dialog on pairwise operation

* fix: patch value to local state after save

* fix: i18n and custom login texts (#2060)

* fix: i18n and custom login texts

* fix: tos and privacy texts

* fix frontend

* fix: tos and privacy texts and tests

* fix: i18n, tos and privacy texts and tests

* fix frontend maps

* i18n

* add ResetCustomLoginTextToDefault in admin api and fix template remove in handlers

* resetlogintexttodefault

Co-authored-by: Livio Amstutz <livio.a@gmail.com>
This commit is contained in:
Max Peintner
2021-07-26 12:44:45 +02:00
committed by GitHub
parent 26e4e607bc
commit 2e684684de
100 changed files with 4500 additions and 2259 deletions

View File

@@ -311,50 +311,44 @@ func RegistrationOptionScreenTextToPb(text domain.RegistrationOptionScreenText)
func RegistrationUserScreenTextToPb(text domain.RegistrationUserScreenText) *text_pb.RegistrationUserScreenText {
return &text_pb.RegistrationUserScreenText{
Title: text.Title,
Description: text.Description,
DescriptionOrgRegister: text.DescriptionOrgRegister,
FirstnameLabel: text.FirstnameLabel,
LastnameLabel: text.LastnameLabel,
EmailLabel: text.EmailLabel,
UsernameLabel: text.UsernameLabel,
LanguageLabel: text.LanguageLabel,
GenderLabel: text.GenderLabel,
PasswordLabel: text.PasswordLabel,
PasswordConfirmLabel: text.PasswordConfirmLabel,
TosAndPrivacyLabel: text.TOSAndPrivacyLabel,
TosConfirm: text.TOSConfirm,
TosLink: text.TOSLink,
TosLinkText: text.TOSLinkText,
PrivacyConfirm: text.PrivacyConfirm,
PrivacyLink: text.PrivacyLink,
PrivacyLinkText: text.PrivacyLinkText,
ExternalLoginDescription: text.ExternalLoginDescription,
NextButtonText: text.NextButtonText,
BackButtonText: text.BackButtonText,
Title: text.Title,
Description: text.Description,
DescriptionOrgRegister: text.DescriptionOrgRegister,
FirstnameLabel: text.FirstnameLabel,
LastnameLabel: text.LastnameLabel,
EmailLabel: text.EmailLabel,
UsernameLabel: text.UsernameLabel,
LanguageLabel: text.LanguageLabel,
GenderLabel: text.GenderLabel,
PasswordLabel: text.PasswordLabel,
PasswordConfirmLabel: text.PasswordConfirmLabel,
TosAndPrivacyLabel: text.TOSAndPrivacyLabel,
TosConfirm: text.TOSConfirm,
TosLinkText: text.TOSLinkText,
TosConfirmAnd: text.TOSConfirmAnd,
PrivacyLinkText: text.PrivacyLinkText,
NextButtonText: text.NextButtonText,
BackButtonText: text.BackButtonText,
}
}
func RegistrationOrgScreenTextToPb(text domain.RegistrationOrgScreenText) *text_pb.RegistrationOrgScreenText {
return &text_pb.RegistrationOrgScreenText{
Title: text.Title,
Description: text.Description,
OrgnameLabel: text.OrgNameLabel,
FirstnameLabel: text.FirstnameLabel,
LastnameLabel: text.LastnameLabel,
EmailLabel: text.EmailLabel,
UsernameLabel: text.UsernameLabel,
PasswordLabel: text.PasswordLabel,
PasswordConfirmLabel: text.PasswordConfirmLabel,
TosAndPrivacyLabel: text.TOSAndPrivacyLabel,
TosConfirm: text.TOSConfirm,
TosLink: text.TOSLink,
TosLinkText: text.TOSLinkText,
PrivacyConfirm: text.PrivacyConfirm,
PrivacyLink: text.PrivacyLink,
PrivacyLinkText: text.PrivacyLinkText,
ExternalLoginDescription: text.ExternalLoginDescription,
SaveButtonText: text.SaveButtonText,
Title: text.Title,
Description: text.Description,
OrgnameLabel: text.OrgNameLabel,
FirstnameLabel: text.FirstnameLabel,
LastnameLabel: text.LastnameLabel,
EmailLabel: text.EmailLabel,
UsernameLabel: text.UsernameLabel,
PasswordLabel: text.PasswordLabel,
PasswordConfirmLabel: text.PasswordConfirmLabel,
TosAndPrivacyLabel: text.TOSAndPrivacyLabel,
TosConfirm: text.TOSConfirm,
TosLinkText: text.TOSLinkText,
TosConfirmAnd: text.TOSConfirmAnd,
PrivacyLinkText: text.PrivacyLinkText,
SaveButtonText: text.SaveButtonText,
}
}
@@ -395,12 +389,10 @@ func LogoutDoneScreenTextToPb(text domain.LogoutDoneScreenText) *text_pb.LogoutD
func FooterTextToPb(text domain.FooterText) *text_pb.FooterText {
return &text_pb.FooterText{
Tos: text.TOS,
TosLink: text.TOSLink,
PrivacyPolicy: text.PrivacyPolicy,
PrivacyPolicyLink: text.PrivacyPolicyLink,
Help: text.Help,
HelpLink: text.HelpLink,
Tos: text.TOS,
PrivacyPolicy: text.PrivacyPolicy,
Help: text.Help,
HelpLink: text.HelpLink,
}
}
@@ -722,27 +714,24 @@ func RegistrationUserScreenTextPbToDomain(text *text_pb.RegistrationUserScreenTe
return domain.RegistrationUserScreenText{}
}
return domain.RegistrationUserScreenText{
Title: text.Title,
Description: text.Description,
DescriptionOrgRegister: text.DescriptionOrgRegister,
FirstnameLabel: text.FirstnameLabel,
LastnameLabel: text.LastnameLabel,
EmailLabel: text.EmailLabel,
UsernameLabel: text.UsernameLabel,
LanguageLabel: text.LanguageLabel,
GenderLabel: text.GenderLabel,
PasswordLabel: text.PasswordLabel,
PasswordConfirmLabel: text.PasswordConfirmLabel,
TOSAndPrivacyLabel: text.TosAndPrivacyLabel,
TOSConfirm: text.TosConfirm,
TOSLink: text.TosLink,
TOSLinkText: text.TosLinkText,
PrivacyConfirm: text.PrivacyConfirm,
PrivacyLink: text.PrivacyLink,
PrivacyLinkText: text.PrivacyLinkText,
ExternalLoginDescription: text.ExternalLoginDescription,
NextButtonText: text.NextButtonText,
BackButtonText: text.BackButtonText,
Title: text.Title,
Description: text.Description,
DescriptionOrgRegister: text.DescriptionOrgRegister,
FirstnameLabel: text.FirstnameLabel,
LastnameLabel: text.LastnameLabel,
EmailLabel: text.EmailLabel,
UsernameLabel: text.UsernameLabel,
LanguageLabel: text.LanguageLabel,
GenderLabel: text.GenderLabel,
PasswordLabel: text.PasswordLabel,
PasswordConfirmLabel: text.PasswordConfirmLabel,
TOSAndPrivacyLabel: text.TosAndPrivacyLabel,
TOSConfirm: text.TosConfirm,
TOSLinkText: text.TosLinkText,
TOSConfirmAnd: text.TosConfirmAnd,
PrivacyLinkText: text.PrivacyLinkText,
NextButtonText: text.NextButtonText,
BackButtonText: text.BackButtonText,
}
}
@@ -751,24 +740,21 @@ func RegistrationOrgScreenTextPbToDomain(text *text_pb.RegistrationOrgScreenText
return domain.RegistrationOrgScreenText{}
}
return domain.RegistrationOrgScreenText{
Title: text.Title,
Description: text.Description,
OrgNameLabel: text.OrgnameLabel,
FirstnameLabel: text.FirstnameLabel,
LastnameLabel: text.LastnameLabel,
EmailLabel: text.EmailLabel,
UsernameLabel: text.UsernameLabel,
PasswordLabel: text.PasswordLabel,
PasswordConfirmLabel: text.PasswordConfirmLabel,
TOSAndPrivacyLabel: text.TosAndPrivacyLabel,
TOSConfirm: text.TosConfirm,
TOSLink: text.TosLink,
TOSLinkText: text.TosLinkText,
PrivacyConfirm: text.PrivacyConfirm,
PrivacyLink: text.PrivacyLink,
PrivacyLinkText: text.PrivacyLinkText,
ExternalLoginDescription: text.ExternalLoginDescription,
SaveButtonText: text.SaveButtonText,
Title: text.Title,
Description: text.Description,
OrgNameLabel: text.OrgnameLabel,
FirstnameLabel: text.FirstnameLabel,
LastnameLabel: text.LastnameLabel,
EmailLabel: text.EmailLabel,
UsernameLabel: text.UsernameLabel,
PasswordLabel: text.PasswordLabel,
PasswordConfirmLabel: text.PasswordConfirmLabel,
TOSAndPrivacyLabel: text.TosAndPrivacyLabel,
TOSConfirm: text.TosConfirm,
TOSLinkText: text.TosLinkText,
TOSConfirmAnd: text.TosConfirmAnd,
PrivacyLinkText: text.PrivacyLinkText,
SaveButtonText: text.SaveButtonText,
}
}
@@ -824,11 +810,9 @@ func FooterTextPbToDomain(text *text_pb.FooterText) domain.FooterText {
return domain.FooterText{}
}
return domain.FooterText{
TOS: text.Tos,
TOSLink: text.TosLink,
PrivacyPolicy: text.PrivacyPolicy,
PrivacyPolicyLink: text.PrivacyPolicyLink,
Help: text.Help,
HelpLink: text.HelpLink,
TOS: text.Tos,
PrivacyPolicy: text.PrivacyPolicy,
Help: text.Help,
HelpLink: text.HelpLink,
}
}