1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-11-04 08:17:24 -05:00

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.
This commit is contained in:
Panagiotis "Ivory" Vasilopoulos 2023-06-22 08:58:16 +00:00 committed by GitHub
parent a55ff0dd99
commit ff90c87c87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 9 deletions

View File

@ -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

View File

@ -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"}}

View File

@ -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>
@ -77,6 +71,13 @@
</div>
</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>