aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPanagiotis "Ivory" Vasilopoulos <git@n0toose.net>2023-06-22 08:58:16 +0000
committerGitHub <noreply@github.com>2023-06-22 08:58:16 +0000
commitff90c87c878b03e7beabac5f19396e0db2c25a1e (patch)
tree5cc675fb77fa2fe2c4cc4a47095094718ecf60b8
parenta55ff0dd99439eb96151e64be38e0f14f6e723b7 (diff)
downloadgitea-ff90c87c878b03e7beabac5f19396e0db2c25a1e.tar.gz
gitea-ff90c87c878b03e7beabac5f19396e0db2c25a1e.zip
Improve 'Privacy' section in profile settings (#25309)
- Improve "Hide the activity from the profile page" label - E-Mail privacy icon in user profile now redirects to Privacy section - E-Mail privacy settings moved to Privacy section Previously, the user was redirected to the setting itself, however, that is not a good design choice because the setting itself would be at the very top of the user's browser window. This fix doesn't fix the problem entirely, but it is definitely an improvement compared to its previous iteration.
-rw-r--r--options/locale/locale_en-US.ini2
-rw-r--r--templates/user/profile.tmpl2
-rw-r--r--templates/user/settings/profile.tmpl15
3 files changed, 10 insertions, 9 deletions
diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini
index 70802fc4ca..7845b1d521 100644
--- a/options/locale/locale_en-US.ini
+++ b/options/locale/locale_en-US.ini
@@ -662,7 +662,7 @@ comment_type_group_project = Project
comment_type_group_issue_ref = Issue reference
saved_successfully = Your settings were saved successfully.
privacy = Privacy
-keep_activity_private = Hide the activity from the profile page
+keep_activity_private = Hide Activity from profile page
keep_activity_private_popup = Makes the activity visible only for you and the admins
lookup_avatar_by_mail = Look Up Avatar by Email Address
diff --git a/templates/user/profile.tmpl b/templates/user/profile.tmpl
index 51d4a46a92..7c37de2bc9 100644
--- a/templates/user/profile.tmpl
+++ b/templates/user/profile.tmpl
@@ -35,7 +35,7 @@
<li>
{{svg "octicon-mail"}}
<a href="mailto:{{.ContextUser.Email}}" rel="nofollow">{{.ContextUser.Email}}</a>
- <a href="{{AppSubUrl}}/user/settings#keep-email-private">
+ <a href="{{AppSubUrl}}/user/settings#privacy-user-settings">
{{if .ShowUserEmail}}
<i class="ui right" data-tooltip-content="{{.locale.Tr "user.email_visibility.limited"}}">
{{svg "octicon-unlock"}}
diff --git a/templates/user/settings/profile.tmpl b/templates/user/settings/profile.tmpl
index 350f8a0275..385a2ea205 100644
--- a/templates/user/settings/profile.tmpl
+++ b/templates/user/settings/profile.tmpl
@@ -25,12 +25,6 @@
<label for="email">{{.locale.Tr "email"}}</label>
<p>{{.SignedUser.Email}}</p>
</div>
- <div class="inline field">
- <div class="ui checkbox" id="keep-email-private">
- <label data-tooltip-content="{{.locale.Tr "settings.keep_email_private_popup"}}"><strong>{{.locale.Tr "settings.keep_email_private"}}</strong></label>
- <input name="keep_email_private" type="checkbox" {{if .SignedUser.KeepEmailPrivate}}checked{{end}}>
- </div>
- </div>
<div class="field {{if .Err_Description}}error{{end}}">
<label for="description">{{$.locale.Tr "user.user_bio"}}</label>
<textarea id="description" name="description" rows="2" placeholder="{{.locale.Tr "settings.biography_placeholder"}}" maxlength="255">{{.SignedUser.Description}}</textarea>
@@ -47,7 +41,7 @@
<div class="ui divider"></div>
<!-- private block -->
- <div class="field">
+ <div class="field" id="privacy-user-settings">
<label for="security-private"><strong>{{.locale.Tr "settings.privacy"}}</strong></label>
</div>
@@ -78,6 +72,13 @@
</div>
<div class="field">
+ <div class="ui checkbox">
+ <label data-tooltip-content="{{.locale.Tr "settings.keep_email_private_popup"}}"><strong>{{.locale.Tr "settings.keep_email_private"}}</strong></label>
+ <input name="keep_email_private" type="checkbox" {{if .SignedUser.KeepEmailPrivate}}checked{{end}}>
+ </div>
+ </div>
+
+ <div class="field">
<div class="ui checkbox" id="keep-activity-private">
<label data-tooltip-content="{{.locale.Tr "settings.keep_activity_private_popup"}}"><strong>{{.locale.Tr "settings.keep_activity_private"}}</strong></label>
<input name="keep_activity_private" type="checkbox" {{if .SignedUser.KeepActivityPrivate}}checked{{end}}>