diff --git a/config/config-base.json b/config/config-base.json index c0c59ff..b12d081 100644 --- a/config/config-base.json +++ b/config/config-base.json @@ -418,6 +418,14 @@ "required": "false", "description": "Click the edit icon next to the \"User Page\" Setting to add custom Markdown messages that will be shown to the user. Note message cards are not private, little effort is required for anyone to view them." }, + "show_link": { + "name": "Show Link on Admin Login page", + "required": false, + "requires_restart": false, + "type": "bool", + "value": true, + "description": "Whether or not to show a link to the \"My Account\" page on the admin login screen, to direct lost users." + }, "referrals": { "name": "User Referrals", "required": false, diff --git a/html/login-modal.html b/html/login-modal.html index 2f9c3fb..e3c4a5d 100644 --- a/html/login-modal.html +++ b/html/login-modal.html @@ -7,6 +7,14 @@ {{ end }} {{ end }} + {{ if index . "userPageEnabled" }} + {{ if and .userPageEnabled .showUserPageLink }} +
+ {{ .strings.loginNotAdmin }} + {{ .strings.myAccount }} +
+ {{ end }} + {{ end }}
{{ .strings.login }} diff --git a/lang/admin/en-us.json b/lang/admin/en-us.json index 9a3bd22..e22efe8 100644 --- a/lang/admin/en-us.json +++ b/lang/admin/en-us.json @@ -123,7 +123,8 @@ "userPageLogin": "User Page: Login", "userPagePage": "User Page: Page", "buildTime": "Build Time", - "builtBy": "Built By" + "builtBy": "Built By", + "loginNotAdmin": "Not an Admin?" }, "notifications": { "changedEmailAddress": "Changed email address of {n}.", diff --git a/views.go b/views.go index f388c35..7e56900 100644 --- a/views.go +++ b/views.go @@ -175,6 +175,7 @@ func (app *appContext) AdminPage(gc *gin.Context) { "jfAdminOnly": jfAdminOnly, "jfAllowAll": jfAllowAll, "userPageEnabled": app.config.Section("user_page").Key("enabled").MustBool(false), + "showUserPageLink": app.config.Section("user_page").Key("show_link").MustBool(true), "referralsEnabled": app.config.Section("user_page").Key("enabled").MustBool(false) && app.config.Section("user_page").Key("referrals").MustBool(false), "loginAppearance": app.config.Section("ui").Key("login_appearance").MustString("clear"), })