userpage: generate & display referral links

shown on a new card, with an explanation, the number of remaining uses,
and expiry of the current referral.
This commit is contained in:
Harvey Tindall
2023-09-07 16:25:47 +01:00
parent 0a82f889f3
commit 311ecb7030
50 changed files with 166 additions and 54 deletions
+1
View File
@@ -204,6 +204,7 @@ func (app *appContext) MyUserPage(gc *gin.Context) {
"langName": lang,
"jfLink": app.config.Section("ui").Key("redirect_url").String(),
"requirements": app.validator.getCriteria(),
"referralsEnabled": app.config.Section("user_page").Key("enabled").MustBool(false) && app.config.Section("user_page").Key("referrals").MustBool(false),
}
if telegramEnabled {
data["telegramUsername"] = app.telegram.username