feat(login): show profile (#485)

* profile data

* fix scripts

* fix image paths

* feat: show profile (with image) when possible

* fix profile image width
This commit is contained in:
Livio Amstutz
2020-07-20 10:00:29 +02:00
committed by GitHub
parent 4f3ccbfad0
commit 933193855a
42 changed files with 321 additions and 212 deletions

View File

@@ -22,6 +22,7 @@ type mailVerificationFormData struct {
type mailVerificationData struct {
baseData
profileData
UserID string
}
@@ -77,15 +78,17 @@ func (l *Login) renderMailVerification(w http.ResponseWriter, r *http.Request, a
userID = authReq.UserID
}
data := mailVerificationData{
baseData: l.getBaseData(r, authReq, "Mail Verification", errType, errMessage),
UserID: userID,
baseData: l.getBaseData(r, authReq, "Mail Verification", errType, errMessage),
UserID: userID,
profileData: l.getProfileData(authReq),
}
l.renderer.RenderTemplate(w, r, l.renderer.Templates[tmplMailVerification], data, nil)
}
func (l *Login) renderMailVerified(w http.ResponseWriter, r *http.Request, authReq *model.AuthRequest) {
data := mailVerificationData{
baseData: l.getBaseData(r, authReq, "Mail Verified", "", ""),
baseData: l.getBaseData(r, authReq, "Mail Verified", "", ""),
profileData: l.getProfileData(authReq),
}
l.renderer.RenderTemplate(w, r, l.renderer.Templates[tmplMailVerified], data, nil)
}