mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-09-15 18:56:59 +00:00
feat: add pronoun privacy option (#6773)
This commit contains UI changes, tests and migrations for a feature that lets users optionally hide their pronouns from the general public. This is useful if a person wants to disclose that information to a smaller set of people on a local instance belonging to a local community/association. Co-authored-by: Gusted <gusted@noreply.codeberg.org> Co-authored-by: Beowulf <beowulf@beocode.eu> Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6773 Reviewed-by: Gusted <gusted@noreply.codeberg.org> Co-authored-by: Panagiotis "Ivory" Vasilopoulos <git@n0toose.net> Co-committed-by: Panagiotis "Ivory" Vasilopoulos <git@n0toose.net>
This commit is contained in:
parent
7104c73c96
commit
a1486b0ee4
17 changed files with 158 additions and 25 deletions
|
@ -16,7 +16,7 @@
|
|||
</div>
|
||||
<div class="content tw-break-anywhere profile-avatar-name">
|
||||
{{if .ContextUser.FullName}}<span class="header text center">{{.ContextUser.FullName}}</span>{{end}}
|
||||
<span class="username text center">{{.ContextUser.Name}}{{if .ContextUser.Pronouns}} · {{.ContextUser.Pronouns}}{{end}} {{if .IsAdmin}}
|
||||
<span class="username text center">{{.ContextUser.Name}} {{if .ContextUser.GetPronouns .IsSigned}} · {{.ContextUser.GetPronouns .IsSigned}}{{end}} {{if .IsAdmin}}
|
||||
<a class="muted" href="{{AppSubUrl}}/admin/users/{{.ContextUser.ID}}" data-tooltip-content="{{ctx.Locale.Tr "admin.users.details"}}">
|
||||
{{svg "octicon-gear" 18}}
|
||||
</a>
|
||||
|
|
8
templates/swagger/v1_json.tmpl
generated
8
templates/swagger/v1_json.tmpl
generated
|
@ -27954,6 +27954,10 @@
|
|||
"type": "boolean",
|
||||
"x-go-name": "HideEmail"
|
||||
},
|
||||
"hide_pronouns": {
|
||||
"type": "boolean",
|
||||
"x-go-name": "HidePronouns"
|
||||
},
|
||||
"language": {
|
||||
"type": "string",
|
||||
"x-go-name": "Language"
|
||||
|
@ -28006,6 +28010,10 @@
|
|||
"type": "boolean",
|
||||
"x-go-name": "HideEmail"
|
||||
},
|
||||
"hide_pronouns": {
|
||||
"type": "boolean",
|
||||
"x-go-name": "HidePronouns"
|
||||
},
|
||||
"language": {
|
||||
"type": "string",
|
||||
"x-go-name": "Language"
|
||||
|
|
|
@ -120,6 +120,12 @@
|
|||
{{ctx.Locale.Tr "settings.keep_activity_private"}}
|
||||
<span class="help">{{ctx.Locale.Tr "settings.keep_activity_private.description" (printf "/%s?tab=activity" .SignedUser.Name)}}</span>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<input name="keep_pronouns_private" type="checkbox" {{if .SignedUser.KeepPronounsPrivate}}checked{{end}}>
|
||||
{{ctx.Locale.Tr "settings.keep_pronouns_private"}}
|
||||
<span class="help">{{ctx.Locale.Tr "settings.keep_pronouns_private.description"}}</span>
|
||||
</label>
|
||||
</fieldset>
|
||||
|
||||
<button class="ui primary button">{{ctx.Locale.Tr "settings.update_profile"}}</button>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue