mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Refactor i18n
to locale
(#20153)
* Refactor `i18n` to `locale` - Currently we're using the `i18n` variable naming for the `locale` struct. This contains locale's specific information and cannot be used for general i18n purpose, therefore refactoring it to `locale` makes more sense. - Ref: https://github.com/go-gitea/gitea/pull/20096#discussion_r906699200 * Update routers/install/install.go
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<div class="ui container">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "settings.password"}}
|
||||
{{.locale.Tr "settings.password"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
{{if or (.SignedUser.IsLocal) (.SignedUser.IsOAuth2)}}
|
||||
@@ -13,43 +13,43 @@
|
||||
{{.CsrfTokenHtml}}
|
||||
{{if .SignedUser.IsPasswordSet}}
|
||||
<div class="required field {{if .Err_OldPassword}}error{{end}}">
|
||||
<label for="old_password">{{.i18n.Tr "settings.old_password"}}</label>
|
||||
<label for="old_password">{{.locale.Tr "settings.old_password"}}</label>
|
||||
<input id="old_password" name="old_password" type="password" autocomplete="current-password" autofocus required>
|
||||
</div>
|
||||
{{end}}
|
||||
<div class="required field {{if .Err_Password}}error{{end}}">
|
||||
<label for="password">{{.i18n.Tr "settings.new_password"}}</label>
|
||||
<label for="password">{{.locale.Tr "settings.new_password"}}</label>
|
||||
<input id="password" name="password" type="password" autocomplete="new-password" required>
|
||||
</div>
|
||||
<div class="required field {{if .Err_Password}}error{{end}}">
|
||||
<label for="retype">{{.i18n.Tr "settings.retype_new_password"}}</label>
|
||||
<label for="retype">{{.locale.Tr "settings.retype_new_password"}}</label>
|
||||
<input id="retype" name="retype" type="password" autocomplete="new-password" required>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<button class="ui green button">{{$.i18n.Tr "settings.change_password"}}</button>
|
||||
<a href="{{AppSubUrl}}/user/forgot_password?email={{.Email}}">{{.i18n.Tr "auth.forgot_password"}}</a>
|
||||
<button class="ui green button">{{$.locale.Tr "settings.change_password"}}</button>
|
||||
<a href="{{AppSubUrl}}/user/forgot_password?email={{.Email}}">{{.locale.Tr "auth.forgot_password"}}</a>
|
||||
</div>
|
||||
</form>
|
||||
{{else}}
|
||||
<div class="ui info message">
|
||||
<p class="text left">{{$.i18n.Tr "settings.password_change_disabled"}}</p>
|
||||
<p class="text left">{{$.locale.Tr "settings.password_change_disabled"}}</p>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "settings.manage_emails"}}
|
||||
{{.locale.Tr "settings.manage_emails"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<div class="ui email list">
|
||||
{{if $.EnableNotifyMail}}
|
||||
<div class="item">
|
||||
<form action="{{AppSubUrl}}/user/settings/account/email" class="ui form" method="post">
|
||||
{{.i18n.Tr "settings.email_desc"}}
|
||||
{{.locale.Tr "settings.email_desc"}}
|
||||
<div class="right floated content">
|
||||
<div class="field">
|
||||
<button class="ui green button">{{$.i18n.Tr "settings.email_notifications.submit"}}</button>
|
||||
<button class="ui green button">{{$.locale.Tr "settings.email_notifications.submit"}}</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right floated content">
|
||||
@@ -59,11 +59,11 @@
|
||||
<div class="ui selection dropdown" tabindex="0">
|
||||
<input name="preference" type="hidden" value="{{.EmailNotificationsPreference}}">
|
||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||
<div class="text">{{$.i18n.Tr "settings.email_notifications"}}</div>
|
||||
<div class="text">{{$.locale.Tr "settings.email_notifications"}}</div>
|
||||
<div class="menu">
|
||||
<div data-value="enabled" class="{{if eq .EmailNotificationsPreference "enabled"}}active selected {{end}}item">{{$.i18n.Tr "settings.email_notifications.enable"}}</div>
|
||||
<div data-value="onmention" class="{{if eq .EmailNotificationsPreference "onmention"}}active selected {{end}}item">{{$.i18n.Tr "settings.email_notifications.onmention"}}</div>
|
||||
<div data-value="disabled" class="{{if eq .EmailNotificationsPreference "disabled"}}active selected {{end}}item">{{$.i18n.Tr "settings.email_notifications.disable"}}</div>
|
||||
<div data-value="enabled" class="{{if eq .EmailNotificationsPreference "enabled"}}active selected {{end}}item">{{$.locale.Tr "settings.email_notifications.enable"}}</div>
|
||||
<div data-value="onmention" class="{{if eq .EmailNotificationsPreference "onmention"}}active selected {{end}}item">{{$.locale.Tr "settings.email_notifications.onmention"}}</div>
|
||||
<div data-value="disabled" class="{{if eq .EmailNotificationsPreference "disabled"}}active selected {{end}}item">{{$.locale.Tr "settings.email_notifications.disable"}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -76,7 +76,7 @@
|
||||
{{if not .IsPrimary}}
|
||||
<div class="right floated content">
|
||||
<button class="ui red tiny button delete-button" data-modal-id="delete-email" data-url="{{AppSubUrl}}/user/settings/account/email/delete" data-id="{{.ID}}">
|
||||
{{$.i18n.Tr "settings.delete_email"}}
|
||||
{{$.locale.Tr "settings.delete_email"}}
|
||||
</button>
|
||||
</div>
|
||||
{{if .CanBePrimary}}
|
||||
@@ -85,7 +85,7 @@
|
||||
{{$.CsrfTokenHtml}}
|
||||
<input name="_method" type="hidden" value="PRIMARY">
|
||||
<input name="id" type="hidden" value="{{.ID}}">
|
||||
<button class="ui primary tiny button">{{$.i18n.Tr "settings.primary_email"}}</button>
|
||||
<button class="ui primary tiny button">{{$.locale.Tr "settings.primary_email"}}</button>
|
||||
</form>
|
||||
</div>
|
||||
{{end}}
|
||||
@@ -97,9 +97,9 @@
|
||||
<input name="_method" type="hidden" value="SENDACTIVATION">
|
||||
<input name="id" type="hidden" value="{{.ID}}">
|
||||
{{if $.ActivationsPending}}
|
||||
<button disabled class="ui primary tiny button">{{$.i18n.Tr "settings.activations_pending"}}</button>
|
||||
<button disabled class="ui primary tiny button">{{$.locale.Tr "settings.activations_pending"}}</button>
|
||||
{{else}}
|
||||
<button class="ui primary tiny button">{{$.i18n.Tr "settings.activate_email"}}</button>
|
||||
<button class="ui primary tiny button">{{$.locale.Tr "settings.activate_email"}}</button>
|
||||
{{end}}
|
||||
</form>
|
||||
</div>
|
||||
@@ -107,12 +107,12 @@
|
||||
<div class="content">
|
||||
<strong>{{.Email}}</strong>
|
||||
{{if .IsPrimary}}
|
||||
<div class="ui primary label">{{$.i18n.Tr "settings.primary"}}</div>
|
||||
<div class="ui primary label">{{$.locale.Tr "settings.primary"}}</div>
|
||||
{{end}}
|
||||
{{if .IsActivated}}
|
||||
<div class="ui green label">{{$.i18n.Tr "settings.activated"}}</div>
|
||||
<div class="ui green label">{{$.locale.Tr "settings.activated"}}</div>
|
||||
{{else}}
|
||||
<div class="ui label">{{$.i18n.Tr "settings.requires_activation"}}</div>
|
||||
<div class="ui label">{{$.locale.Tr "settings.requires_activation"}}</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
@@ -123,37 +123,37 @@
|
||||
<form class="ui form" action="{{AppSubUrl}}/user/settings/account/email" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="required field {{if .Err_Email}}error{{end}}">
|
||||
<label for="email">{{.i18n.Tr "settings.add_new_email"}}</label>
|
||||
<label for="email">{{.locale.Tr "settings.add_new_email"}}</label>
|
||||
<input id="email" name="email" type="email" required {{if not .CanAddEmails}}disabled{{end}}>
|
||||
</div>
|
||||
<button class="ui green button" {{if not .CanAddEmails}}disabled{{end}}>
|
||||
{{.i18n.Tr "settings.add_email"}}
|
||||
{{.locale.Tr "settings.add_email"}}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<h4 class="ui top attached error header">
|
||||
{{.i18n.Tr "settings.delete_account"}}
|
||||
{{.locale.Tr "settings.delete_account"}}
|
||||
</h4>
|
||||
<div class="ui attached error segment">
|
||||
<div class="ui red message">
|
||||
<p class="text left">{{svg "octicon-alert"}} {{.i18n.Tr "settings.delete_prompt" | Str2html}}</p>
|
||||
<p class="text left">{{svg "octicon-alert"}} {{.locale.Tr "settings.delete_prompt" | Str2html}}</p>
|
||||
{{ if .UserDeleteWithComments }}
|
||||
<p class="text left" style="font-weight: bold;">{{.i18n.Tr "settings.delete_with_all_comments" .UserDeleteWithCommentsMaxTime | Str2html}}</p>
|
||||
<p class="text left" style="font-weight: bold;">{{.locale.Tr "settings.delete_with_all_comments" .UserDeleteWithCommentsMaxTime | Str2html}}</p>
|
||||
{{ end }}
|
||||
</div>
|
||||
<form class="ui form ignore-dirty" id="delete-form" action="{{AppSubUrl}}/user/settings/account/delete" method="post">
|
||||
{{template "base/disable_form_autofill"}}
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="required field {{if .Err_Password}}error{{end}}">
|
||||
<label for="password-confirmation">{{.i18n.Tr "password"}}</label>
|
||||
<label for="password-confirmation">{{.locale.Tr "password"}}</label>
|
||||
<input id="password-confirmation" name="password" type="password" autocomplete="off" required>
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="ui red button delete-button" data-modal-id="delete-account" data-type="form" data-form="#delete-form">
|
||||
{{.i18n.Tr "settings.confirm_delete_account"}}
|
||||
{{.locale.Tr "settings.confirm_delete_account"}}
|
||||
</div>
|
||||
<a href="{{AppSubUrl}}/user/forgot_password?email={{.Email}}">{{.i18n.Tr "auth.forgot_password"}}</a>
|
||||
<a href="{{AppSubUrl}}/user/forgot_password?email={{.Email}}">{{.locale.Tr "auth.forgot_password"}}</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@@ -163,10 +163,10 @@
|
||||
<div class="ui small basic delete modal" id="delete-email">
|
||||
<div class="ui icon header">
|
||||
{{svg "octicon-trash"}}
|
||||
{{.i18n.Tr "settings.email_deletion"}}
|
||||
{{.locale.Tr "settings.email_deletion"}}
|
||||
</div>
|
||||
<div class="content">
|
||||
<p>{{.i18n.Tr "settings.email_deletion_desc"}}</p>
|
||||
<p>{{.locale.Tr "settings.email_deletion_desc"}}</p>
|
||||
</div>
|
||||
{{template "base/delete_modal_actions" .}}
|
||||
</div>
|
||||
@@ -174,10 +174,10 @@
|
||||
<div class="ui small basic delete modal" id="delete-account">
|
||||
<div class="ui icon header">
|
||||
{{svg "octicon-trash"}}
|
||||
{{.i18n.Tr "settings.delete_account_title"}}
|
||||
{{.locale.Tr "settings.delete_account_title"}}
|
||||
</div>
|
||||
<div class="content">
|
||||
<p>{{.i18n.Tr "settings.delete_account_desc"}}</p>
|
||||
<p>{{.locale.Tr "settings.delete_account_desc"}}</p>
|
||||
</div>
|
||||
{{template "base/delete_modal_actions" .}}
|
||||
</div>
|
||||
|
@@ -6,18 +6,18 @@
|
||||
|
||||
<!-- Theme -->
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "settings.manage_themes"}}
|
||||
{{.locale.Tr "settings.manage_themes"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<div class="ui email list">
|
||||
<div class="item">
|
||||
{{.i18n.Tr "settings.theme_desc"}}
|
||||
{{.locale.Tr "settings.theme_desc"}}
|
||||
</div>
|
||||
|
||||
<form class="ui form" action="{{.Link}}/theme" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="field">
|
||||
<label for="ui">{{.i18n.Tr "settings.ui"}}</label>
|
||||
<label for="ui">{{.locale.Tr "settings.ui"}}</label>
|
||||
<div class="ui selection dropdown" id="ui">
|
||||
<input name="theme" type="hidden" value="{{.SignedUser.Theme}}">
|
||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||
@@ -38,7 +38,7 @@
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<button class="ui green button">{{$.i18n.Tr "settings.update_theme"}}</button>
|
||||
<button class="ui green button">{{$.locale.Tr "settings.update_theme"}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
<!-- Language -->
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "settings.language"}}
|
||||
{{.locale.Tr "settings.language"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<form class="ui form" action="{{.Link}}/language" method="post">
|
||||
@@ -64,14 +64,14 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<button class="ui green button">{{$.i18n.Tr "settings.update_language"}}</button>
|
||||
<button class="ui green button">{{$.locale.Tr "settings.update_language"}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- Shown comment event types -->
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "settings.hidden_comment_types"}}
|
||||
{{.locale.Tr "settings.hidden_comment_types"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<form class="ui form" action="{{.Link}}/hidden_comments" method="post">
|
||||
@@ -79,90 +79,90 @@
|
||||
<div class="inline field">
|
||||
<div class="ui checkbox">
|
||||
<input name="reference" type="checkbox" {{if(call .IsCommentTypeGroupChecked "reference")}}checked{{end}}>
|
||||
<label>{{.i18n.Tr "settings.comment_type_group_reference"}}</label>
|
||||
<label>{{.locale.Tr "settings.comment_type_group_reference"}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<div class="ui checkbox">
|
||||
<input name="label" type="checkbox" {{if (call .IsCommentTypeGroupChecked "label")}}checked{{end}}>
|
||||
<label>{{.i18n.Tr "settings.comment_type_group_label"}}</label>
|
||||
<label>{{.locale.Tr "settings.comment_type_group_label"}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<div class="ui checkbox">
|
||||
<input name="milestone" type="checkbox" {{if (call .IsCommentTypeGroupChecked "milestone")}}checked{{end}}>
|
||||
<label>{{.i18n.Tr "settings.comment_type_group_milestone"}}</label>
|
||||
<label>{{.locale.Tr "settings.comment_type_group_milestone"}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<div class="ui checkbox">
|
||||
<input name="assignee" type="checkbox" {{if (call .IsCommentTypeGroupChecked "assignee")}}checked{{end}}>
|
||||
<label>{{.i18n.Tr "settings.comment_type_group_assignee"}}</label>
|
||||
<label>{{.locale.Tr "settings.comment_type_group_assignee"}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<div class="ui checkbox">
|
||||
<input name="title" type="checkbox" {{if (call .IsCommentTypeGroupChecked "title")}}checked{{end}}>
|
||||
<label>{{.i18n.Tr "settings.comment_type_group_title"}}</label>
|
||||
<label>{{.locale.Tr "settings.comment_type_group_title"}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<div class="ui checkbox">
|
||||
<input name="branch" type="checkbox" {{if (call .IsCommentTypeGroupChecked "branch")}}checked{{end}}>
|
||||
<label>{{.i18n.Tr "settings.comment_type_group_branch"}}</label>
|
||||
<label>{{.locale.Tr "settings.comment_type_group_branch"}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<div class="ui checkbox">
|
||||
<input name="time_tracking" type="checkbox" {{if (call .IsCommentTypeGroupChecked "time_tracking")}}checked{{end}}>
|
||||
<label>{{.i18n.Tr "settings.comment_type_group_time_tracking"}}</label>
|
||||
<label>{{.locale.Tr "settings.comment_type_group_time_tracking"}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<div class="ui checkbox">
|
||||
<input name="deadline" type="checkbox" {{if (call .IsCommentTypeGroupChecked "deadline")}}checked{{end}}>
|
||||
<label>{{.i18n.Tr "settings.comment_type_group_deadline"}}</label>
|
||||
<label>{{.locale.Tr "settings.comment_type_group_deadline"}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<div class="ui checkbox">
|
||||
<input name="dependency" type="checkbox" {{if (call .IsCommentTypeGroupChecked "dependency")}}checked{{end}}>
|
||||
<label>{{.i18n.Tr "settings.comment_type_group_dependency"}}</label>
|
||||
<label>{{.locale.Tr "settings.comment_type_group_dependency"}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<div class="ui checkbox">
|
||||
<input name="lock" type="checkbox" {{if (call .IsCommentTypeGroupChecked "lock")}}checked{{end}}>
|
||||
<label>{{.i18n.Tr "settings.comment_type_group_lock"}}</label>
|
||||
<label>{{.locale.Tr "settings.comment_type_group_lock"}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<div class="ui checkbox">
|
||||
<input name="review_request" type="checkbox" {{if (call .IsCommentTypeGroupChecked "review_request")}}checked{{end}}>
|
||||
<label>{{.i18n.Tr "settings.comment_type_group_review_request"}}</label>
|
||||
<label>{{.locale.Tr "settings.comment_type_group_review_request"}}</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="inline field">
|
||||
<div class="ui checkbox">
|
||||
<input name="pull_request_push" type="checkbox" {{if (call .IsCommentTypeGroupChecked "pull_request_push")}}checked{{end}}>
|
||||
<label>{{.i18n.Tr "settings.comment_type_group_pull_request_push"}}</label>
|
||||
<label>{{.locale.Tr "settings.comment_type_group_pull_request_push"}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<div class="ui checkbox">
|
||||
<input name="project" type="checkbox" {{if (call .IsCommentTypeGroupChecked "project")}}checked{{end}}>
|
||||
<label>{{.i18n.Tr "settings.comment_type_group_project"}}</label>
|
||||
<label>{{.locale.Tr "settings.comment_type_group_project"}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<div class="ui checkbox">
|
||||
<input name="issue_ref" type="checkbox" {{if (call .IsCommentTypeGroupChecked "issue_ref")}}checked{{end}}>
|
||||
<label>{{.i18n.Tr "settings.comment_type_group_issue_ref"}}</label>
|
||||
<label>{{.locale.Tr "settings.comment_type_group_issue_ref"}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<button class="ui green button">{{$.i18n.Tr "save"}}</button>
|
||||
<button class="ui green button">{{$.locale.Tr "save"}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
@@ -4,26 +4,26 @@
|
||||
<div class="ui container">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "settings.manage_access_token"}}
|
||||
{{.locale.Tr "settings.manage_access_token"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<div class="ui key list">
|
||||
<div class="item">
|
||||
{{.i18n.Tr "settings.tokens_desc"}}
|
||||
{{.locale.Tr "settings.tokens_desc"}}
|
||||
</div>
|
||||
{{range .Tokens}}
|
||||
<div class="item">
|
||||
<div class="right floated content">
|
||||
<button class="ui red tiny button delete-button" data-modal-id="delete-token" data-url="{{$.Link}}/delete" data-id="{{.ID}}">
|
||||
{{svg "octicon-trash" 16 "mr-2"}}
|
||||
{{$.i18n.Tr "settings.delete_token"}}
|
||||
{{$.locale.Tr "settings.delete_token"}}
|
||||
</button>
|
||||
</div>
|
||||
<i class="big send icon {{if .HasRecentActivity}}green{{end}}" {{if .HasRecentActivity}}data-content="{{$.i18n.Tr "settings.token_state_desc"}}" data-variation="inverted tiny"{{end}}></i>
|
||||
<i class="big send icon {{if .HasRecentActivity}}green{{end}}" {{if .HasRecentActivity}}data-content="{{$.locale.Tr "settings.token_state_desc"}}" data-variation="inverted tiny"{{end}}></i>
|
||||
<div class="content">
|
||||
<strong>{{.Name}}</strong>
|
||||
<div class="activity meta">
|
||||
<i>{{$.i18n.Tr "settings.add_on"}} <span>{{.CreatedUnix.FormatShort}}</span> — {{svg "octicon-info"}} {{if .HasUsed}}{{$.i18n.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="green"{{end}}>{{.UpdatedUnix.FormatShort}}</span>{{else}}{{$.i18n.Tr "settings.no_activity"}}{{end}}</i>
|
||||
<i>{{$.locale.Tr "settings.add_on"}} <span>{{.CreatedUnix.FormatShort}}</span> — {{svg "octicon-info"}} {{if .HasUsed}}{{$.locale.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="green"{{end}}>{{.UpdatedUnix.FormatShort}}</span>{{else}}{{$.locale.Tr "settings.no_activity"}}{{end}}</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -32,17 +32,17 @@
|
||||
</div>
|
||||
<div class="ui attached bottom segment">
|
||||
<h5 class="ui top header">
|
||||
{{.i18n.Tr "settings.generate_new_token"}}
|
||||
{{.locale.Tr "settings.generate_new_token"}}
|
||||
</h5>
|
||||
<p>{{.i18n.Tr "settings.new_token_desc"}}</p>
|
||||
<p>{{.locale.Tr "settings.new_token_desc"}}</p>
|
||||
<form class="ui form ignore-dirty" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="field {{if .Err_Name}}error{{end}}">
|
||||
<label for="name">{{.i18n.Tr "settings.token_name"}}</label>
|
||||
<label for="name">{{.locale.Tr "settings.token_name"}}</label>
|
||||
<input id="name" name="name" value="{{.name}}" autofocus required>
|
||||
</div>
|
||||
<button class="ui green button">
|
||||
{{.i18n.Tr "settings.generate_token"}}
|
||||
{{.locale.Tr "settings.generate_token"}}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
@@ -57,19 +57,19 @@
|
||||
<div class="ui small basic delete modal" id="delete-token">
|
||||
<div class="ui icon header">
|
||||
{{svg "octicon-trash"}}
|
||||
{{.i18n.Tr "settings.access_token_deletion"}}
|
||||
{{.locale.Tr "settings.access_token_deletion"}}
|
||||
</div>
|
||||
<div class="content">
|
||||
<p>{{.i18n.Tr "settings.access_token_deletion_desc"}}</p>
|
||||
<p>{{.locale.Tr "settings.access_token_deletion_desc"}}</p>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="ui cancel button">
|
||||
<i class="remove icon"></i>
|
||||
{{.i18n.Tr "settings.access_token_deletion_cancel_action"}}
|
||||
{{.locale.Tr "settings.access_token_deletion_cancel_action"}}
|
||||
</div>
|
||||
<div class="ui red basic inverted ok button">
|
||||
<i class="checkmark icon"></i>
|
||||
{{.i18n.Tr "settings.access_token_deletion_confirm_action"}}
|
||||
{{.locale.Tr "settings.access_token_deletion_confirm_action"}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -1,23 +1,23 @@
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "settings.manage_oauth2_applications"}}
|
||||
{{.locale.Tr "settings.manage_oauth2_applications"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<div class="ui key list">
|
||||
<div class="item">
|
||||
{{.i18n.Tr "settings.oauth2_application_create_description"}}
|
||||
{{.locale.Tr "settings.oauth2_application_create_description"}}
|
||||
</div>
|
||||
{{range $app := .Applications}}
|
||||
<div class="item">
|
||||
<div class="right floated content">
|
||||
<a href="{{$.Link}}/oauth2/{{$app.ID}}" class="ui primary tiny button">
|
||||
{{svg "octicon-pencil" 16 "mr-2"}}
|
||||
{{$.i18n.Tr "settings.oauth2_application_edit"}}
|
||||
{{$.locale.Tr "settings.oauth2_application_edit"}}
|
||||
</a>
|
||||
<button class="ui red tiny button delete-button" data-modal-id="remove-gitea-oauth2-application"
|
||||
data-url="{{AppSubUrl}}/user/settings/applications/oauth2/delete"
|
||||
data-id="{{$app.ID}}">
|
||||
{{svg "octicon-trash" 16 "mr-2"}}
|
||||
{{$.i18n.Tr "settings.delete_key"}}
|
||||
{{$.locale.Tr "settings.delete_key"}}
|
||||
</button>
|
||||
</div>
|
||||
<div class="content">
|
||||
@@ -29,20 +29,20 @@
|
||||
</div>
|
||||
<div class="ui attached bottom segment">
|
||||
<h5 class="ui top header">
|
||||
{{.i18n.Tr "settings.create_oauth2_application" }}
|
||||
{{.locale.Tr "settings.create_oauth2_application" }}
|
||||
</h5>
|
||||
<form class="ui form ignore-dirty" action="{{.Link}}/oauth2" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="field {{if .Err_AppName}}error{{end}}">
|
||||
<label for="application-name">{{.i18n.Tr "settings.oauth2_application_name"}}</label>
|
||||
<label for="application-name">{{.locale.Tr "settings.oauth2_application_name"}}</label>
|
||||
<input id="application-name" name="application_name" value="{{.application_name}}" required>
|
||||
</div>
|
||||
<div class="field {{if .Err_RedirectURI}}error{{end}}">
|
||||
<label for="redirect-uri">{{.i18n.Tr "settings.oauth2_redirect_uri"}}</label>
|
||||
<label for="redirect-uri">{{.locale.Tr "settings.oauth2_redirect_uri"}}</label>
|
||||
<input type="url" name="redirect_uri" id="redirect-uri">
|
||||
</div>
|
||||
<button class="ui green button">
|
||||
{{.i18n.Tr "settings.create_oauth2_application_button"}}
|
||||
{{.locale.Tr "settings.create_oauth2_application_button"}}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
@@ -50,10 +50,10 @@
|
||||
<div class="ui small basic delete modal" id="remove-gitea-oauth2-application">
|
||||
<div class="ui icon header">
|
||||
{{svg "octicon-trash"}}
|
||||
{{.i18n.Tr "settings.remove_oauth2_application"}}
|
||||
{{.locale.Tr "settings.remove_oauth2_application"}}
|
||||
</div>
|
||||
<div class="content">
|
||||
<p>{{.i18n.Tr "settings.oauth2_application_remove_description"}}</p>
|
||||
<p>{{.locale.Tr "settings.oauth2_application_remove_description"}}</p>
|
||||
</div>
|
||||
{{template "base/delete_modal_actions" .}}
|
||||
</div>
|
||||
|
@@ -4,34 +4,34 @@
|
||||
<div class="ui container">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "settings.edit_oauth2_application"}}
|
||||
{{.locale.Tr "settings.edit_oauth2_application"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<p>{{.i18n.Tr "settings.oauth2_application_create_description"}}</p>
|
||||
<p>{{.locale.Tr "settings.oauth2_application_create_description"}}</p>
|
||||
</div>
|
||||
<div class="ui attached segment form ignore-dirty">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="field">
|
||||
<label for="client-id">{{.i18n.Tr "settings.oauth2_client_id"}}</label>
|
||||
<label for="client-id">{{.locale.Tr "settings.oauth2_client_id"}}</label>
|
||||
<input id="client-id" readonly value="{{.App.ClientID}}">
|
||||
</div>
|
||||
{{if .ClientSecret}}
|
||||
<div class="field">
|
||||
<label for="client-secret">{{.i18n.Tr "settings.oauth2_client_secret"}}</label>
|
||||
<label for="client-secret">{{.locale.Tr "settings.oauth2_client_secret"}}</label>
|
||||
<input id="client-secret" type="text" readonly value="{{.ClientSecret}}">
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="field">
|
||||
<label for="client-secret">{{.i18n.Tr "settings.oauth2_client_secret"}}</label>
|
||||
<label for="client-secret">{{.locale.Tr "settings.oauth2_client_secret"}}</label>
|
||||
<input id="client-secret" type="password" readonly value="averysecuresecret">
|
||||
</div>
|
||||
{{end}}
|
||||
<div class="item">
|
||||
<!-- TODO add regenerate secret functionality */ -->
|
||||
{{.i18n.Tr "settings.oauth2_regenerate_secret_hint"}}
|
||||
{{.locale.Tr "settings.oauth2_regenerate_secret_hint"}}
|
||||
<form class="ui form ignore-dirty" action="{{AppSubUrl}}/user/settings/applications/oauth2/{{.App.ID}}/regenerate_secret" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<a href="#" onclick="event.target.parentNode.submit()">{{.i18n.Tr "settings.oauth2_regenerate_secret"}}</a>
|
||||
<a href="#" onclick="event.target.parentNode.submit()">{{.locale.Tr "settings.oauth2_regenerate_secret"}}</a>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -39,15 +39,15 @@
|
||||
<form class="ui form ignore-dirty" action="{{AppSubUrl}}/user/settings/applications/oauth2/{{.App.ID}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="field {{if .Err_AppName}}error{{end}}">
|
||||
<label for="application-name">{{.i18n.Tr "settings.oauth2_application_name"}}</label>
|
||||
<label for="application-name">{{.locale.Tr "settings.oauth2_application_name"}}</label>
|
||||
<input id="application-name" value="{{.App.Name}}" name="application_name" required>
|
||||
</div>
|
||||
<div class="field {{if .Err_RedirectURI}}error{{end}}">
|
||||
<label for="redirect-uri">{{.i18n.Tr "settings.oauth2_redirect_uri"}}</label>
|
||||
<label for="redirect-uri">{{.locale.Tr "settings.oauth2_redirect_uri"}}</label>
|
||||
<input type="url" name="redirect_uri" value="{{.App.PrimaryRedirectURI}}" id="redirect-uri">
|
||||
</div>
|
||||
<button class="ui green button">
|
||||
{{.i18n.Tr "settings.save_application"}}
|
||||
{{.locale.Tr "settings.save_application"}}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
@@ -57,10 +57,10 @@
|
||||
<div class="ui small basic delete modal" id="delete-oauth2-application">
|
||||
<div class="ui icon header">
|
||||
{{svg "octicon-trash"}}
|
||||
{{.i18n.Tr "settings.remove_oauth2_application"}}
|
||||
{{.locale.Tr "settings.remove_oauth2_application"}}
|
||||
</div>
|
||||
<div class="content">
|
||||
<p>{{.i18n.Tr "settings.remove_oauth2_application_desc"}}</p>
|
||||
<p>{{.locale.Tr "settings.remove_oauth2_application_desc"}}</p>
|
||||
</div>
|
||||
{{template "base/delete_modal_actions" .}}
|
||||
</div>
|
||||
|
@@ -1,10 +1,10 @@
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "settings.authorized_oauth2_applications"}}
|
||||
{{.locale.Tr "settings.authorized_oauth2_applications"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<div class="ui key list">
|
||||
<div class="item">
|
||||
{{.i18n.Tr "settings.authorized_oauth2_applications_description"}}
|
||||
{{.locale.Tr "settings.authorized_oauth2_applications_description"}}
|
||||
</div>
|
||||
{{range $grant := .Grants}}
|
||||
<div class="item">
|
||||
@@ -12,7 +12,7 @@
|
||||
<button class="ui red tiny button delete-button" data-modal-id="revoke-gitea-oauth2-grant"
|
||||
data-url="{{AppSubUrl}}/user/settings/applications/oauth2/revoke"
|
||||
data-id="{{$grant.ID}}">
|
||||
{{$.i18n.Tr "settings.revoke_key"}}
|
||||
{{$.locale.Tr "settings.revoke_key"}}
|
||||
</button>
|
||||
</div>
|
||||
<div class="left floated content">
|
||||
@@ -21,7 +21,7 @@
|
||||
<div class="content">
|
||||
<strong>{{$grant.Application.Name}}</strong>
|
||||
<div class="activity meta">
|
||||
<i>{{$.i18n.Tr "settings.add_on"}} <span>{{$grant.CreatedUnix.FormatShort}}</span></i>
|
||||
<i>{{$.locale.Tr "settings.add_on"}} <span>{{$grant.CreatedUnix.FormatShort}}</span></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -32,10 +32,10 @@
|
||||
<div class="ui small basic delete modal" id="revoke-gitea-oauth2-grant">
|
||||
<div class="ui icon header">
|
||||
{{svg "octicon-shield" 16 "mr-2"}}
|
||||
{{.i18n.Tr "settings.revoke_oauth2_grant"}}
|
||||
{{.locale.Tr "settings.revoke_oauth2_grant"}}
|
||||
</div>
|
||||
<div class="content">
|
||||
<p>{{.i18n.Tr "settings.revoke_oauth2_grant_description"}}</p>
|
||||
<p>{{.locale.Tr "settings.revoke_oauth2_grant_description"}}</p>
|
||||
</div>
|
||||
{{template "base/delete_modal_actions" .}}
|
||||
</div>
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "settings.manage_gpg_keys"}}
|
||||
{{.locale.Tr "settings.manage_gpg_keys"}}
|
||||
<div class="ui right">
|
||||
<div class="ui primary tiny show-panel button" data-panel="#add-gpg-key-panel">{{.i18n.Tr "settings.add_key"}}</div>
|
||||
<div class="ui primary tiny show-panel button" data-panel="#add-gpg-key-panel">{{.locale.Tr "settings.add_key"}}</div>
|
||||
</div>
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
@@ -10,47 +10,47 @@
|
||||
{{.CsrfTokenHtml}}
|
||||
<input type="hidden" name="title" value="none">
|
||||
<div class="field {{if .Err_Content}}error{{end}}">
|
||||
<label for="content">{{.i18n.Tr "settings.key_content"}}</label>
|
||||
<textarea id="gpg-key-content" name="content" placeholder="{{.i18n.Tr "settings.key_content_gpg_placeholder"}}" required>{{.content}}</textarea>
|
||||
<label for="content">{{.locale.Tr "settings.key_content"}}</label>
|
||||
<textarea id="gpg-key-content" name="content" placeholder="{{.locale.Tr "settings.key_content_gpg_placeholder"}}" required>{{.content}}</textarea>
|
||||
</div>
|
||||
{{if .Err_Signature}}
|
||||
<div class="ui error message">
|
||||
<p>{{.i18n.Tr "settings.gpg_token_required"}}</p>
|
||||
<p>{{.locale.Tr "settings.gpg_token_required"}}</p>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="token">{{.i18n.Tr "setting.gpg_token"}}
|
||||
<label for="token">{{.locale.Tr "setting.gpg_token"}}
|
||||
<input readonly="" value="{{.TokenToSign}}">
|
||||
<div class="help">
|
||||
<p>{{.i18n.Tr "settings.gpg_token_help"}}</p>
|
||||
<p><code>{{$.i18n.Tr "settings.gpg_token_code" .TokenToSign .KeyID}}</code></p>
|
||||
<p>{{.locale.Tr "settings.gpg_token_help"}}</p>
|
||||
<p><code>{{$.locale.Tr "settings.gpg_token_code" .TokenToSign .KeyID}}</code></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="signature">{{.i18n.Tr "settings.gpg_token_signature"}}</label>
|
||||
<textarea id="gpg-key-signature" name="signature" placeholder="{{.i18n.Tr "settings.key_signature_gpg_placeholder"}}" required>{{.signature}}</textarea>
|
||||
<label for="signature">{{.locale.Tr "settings.gpg_token_signature"}}</label>
|
||||
<textarea id="gpg-key-signature" name="signature" placeholder="{{.locale.Tr "settings.key_signature_gpg_placeholder"}}" required>{{.signature}}</textarea>
|
||||
</div>
|
||||
{{end}}
|
||||
<input name="type" type="hidden" value="gpg">
|
||||
<button class="ui green button">
|
||||
{{.i18n.Tr "settings.add_key"}}
|
||||
{{.locale.Tr "settings.add_key"}}
|
||||
</button>
|
||||
<button class="ui hide-panel button" data-panel="#add-gpg-key-panel">
|
||||
{{.i18n.Tr "cancel"}}
|
||||
{{.locale.Tr "cancel"}}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="ui key list mt-0">
|
||||
<div class="item">
|
||||
{{.i18n.Tr "settings.gpg_desc"}}
|
||||
{{.locale.Tr "settings.gpg_desc"}}
|
||||
</div>
|
||||
{{range .GPGKeys}}
|
||||
<div class="item">
|
||||
<div class="right floated content">
|
||||
<button class="ui red tiny button delete-button" data-modal-id="delete-gpg" data-url="{{$.Link}}/delete?type=gpg" data-id="{{.ID}}">
|
||||
{{$.i18n.Tr "settings.delete_key"}}
|
||||
{{$.locale.Tr "settings.delete_key"}}
|
||||
</button>
|
||||
{{if and (not .Verified) (ne $.VerifyingID .KeyID)}}
|
||||
<a class="ui primary tiny show-panel button" href="{{$.Link}}?verify_gpg={{.KeyID}}">{{$.i18n.Tr "settings.gpg_key_verify"}}</a>
|
||||
<a class="ui primary tiny show-panel button" href="{{$.Link}}?verify_gpg={{.KeyID}}">{{$.locale.Tr "settings.gpg_key_verify"}}</a>
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="left floated content">
|
||||
@@ -58,49 +58,49 @@
|
||||
</div>
|
||||
<div class="content">
|
||||
{{if .Verified}}
|
||||
<span class="tooltip" data-content="{{$.i18n.Tr "settings.gpg_key_verified_long"}}">{{svg "octicon-shield-check"}} <strong>{{$.i18n.Tr "settings.gpg_key_verified"}}</strong></span>
|
||||
<span class="tooltip" data-content="{{$.locale.Tr "settings.gpg_key_verified_long"}}">{{svg "octicon-shield-check"}} <strong>{{$.locale.Tr "settings.gpg_key_verified"}}</strong></span>
|
||||
{{end}}
|
||||
{{if gt (len .Emails) 0}}
|
||||
<span class="tooltip" data-content="{{$.i18n.Tr "settings.gpg_key_matched_identities_long"}}">{{svg "octicon-mail"}} {{$.i18n.Tr "settings.gpg_key_matched_identities"}} {{range .Emails}}<strong>{{.Email}} </strong>{{end}}</span>
|
||||
<span class="tooltip" data-content="{{$.locale.Tr "settings.gpg_key_matched_identities_long"}}">{{svg "octicon-mail"}} {{$.locale.Tr "settings.gpg_key_matched_identities"}} {{range .Emails}}<strong>{{.Email}} </strong>{{end}}</span>
|
||||
{{end}}
|
||||
<div class="print meta">
|
||||
<b>{{$.i18n.Tr "settings.key_id"}}:</b> {{.KeyID}}
|
||||
<b>{{$.i18n.Tr "settings.subkeys"}}:</b> {{range .SubsKey}} {{.KeyID}} {{end}}
|
||||
<b>{{$.locale.Tr "settings.key_id"}}:</b> {{.KeyID}}
|
||||
<b>{{$.locale.Tr "settings.subkeys"}}:</b> {{range .SubsKey}} {{.KeyID}} {{end}}
|
||||
</div>
|
||||
<div class="activity meta">
|
||||
<i>{{$.i18n.Tr "settings.add_on"}} <span>{{.AddedUnix.FormatShort}}</span></i>
|
||||
<i>{{$.locale.Tr "settings.add_on"}} <span>{{.AddedUnix.FormatShort}}</span></i>
|
||||
-
|
||||
<i>{{if not .ExpiredUnix.IsZero}}{{$.i18n.Tr "settings.valid_until"}} <span>{{.ExpiredUnix.FormatShort}}</span>{{else}}{{$.i18n.Tr "settings.valid_forever"}}{{end}}</i>
|
||||
<i>{{if not .ExpiredUnix.IsZero}}{{$.locale.Tr "settings.valid_until"}} <span>{{.ExpiredUnix.FormatShort}}</span>{{else}}{{$.locale.Tr "settings.valid_forever"}}{{end}}</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{if and (not .Verified) (eq $.VerifyingID .KeyID)}}
|
||||
<div class="ui segment">
|
||||
<h4>{{$.i18n.Tr "settings.gpg_token_required"}}</h4>
|
||||
<h4>{{$.locale.Tr "settings.gpg_token_required"}}</h4>
|
||||
<form class="ui form{{if $.HasGPGVerifyError}} error{{end}}" action="{{$.Link}}" method="post">
|
||||
{{$.CsrfTokenHtml}}
|
||||
<input type="hidden" name="title" value="none">
|
||||
<input type="hidden" name="content" value="{{.KeyID}}">
|
||||
<input type="hidden" name="key_id" value="{{.KeyID}}">
|
||||
<div class="field">
|
||||
<label for="token">{{$.i18n.Tr "settings.gpg_token"}}</label>
|
||||
<label for="token">{{$.locale.Tr "settings.gpg_token"}}</label>
|
||||
<input readonly="" value="{{$.TokenToSign}}">
|
||||
<div class="help">
|
||||
<p>{{$.i18n.Tr "settings.gpg_token_help"}}</p>
|
||||
<p><code>{{$.i18n.Tr "settings.gpg_token_code" $.TokenToSign .KeyID}}</code></p>
|
||||
<p>{{$.locale.Tr "settings.gpg_token_help"}}</p>
|
||||
<p><code>{{$.locale.Tr "settings.gpg_token_code" $.TokenToSign .KeyID}}</code></p>
|
||||
</div>
|
||||
<br>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="signature">{{$.i18n.Tr "settings.gpg_token_signature"}}</label>
|
||||
<textarea id="gpg-key-signature" name="signature" placeholder="{{$.i18n.Tr "settings.key_signature_gpg_placeholder"}}" required>{{$.signature}}</textarea>
|
||||
<label for="signature">{{$.locale.Tr "settings.gpg_token_signature"}}</label>
|
||||
<textarea id="gpg-key-signature" name="signature" placeholder="{{$.locale.Tr "settings.key_signature_gpg_placeholder"}}" required>{{$.signature}}</textarea>
|
||||
</div>
|
||||
<input name="type" type="hidden" value="verify_gpg">
|
||||
<button class="ui green button">
|
||||
{{$.i18n.Tr "settings.gpg_key_verify"}}
|
||||
{{$.locale.Tr "settings.gpg_key_verify"}}
|
||||
</button>
|
||||
<a class="ui red button" href="{{$.Link}}">
|
||||
{{$.i18n.Tr "settings.cancel"}}
|
||||
{{$.locale.Tr "settings.cancel"}}
|
||||
</a>
|
||||
</form>
|
||||
</div>
|
||||
@@ -109,15 +109,15 @@
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<p>{{.i18n.Tr "settings.gpg_helper" "https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/about-commit-signature-verification#gpg-commit-signature-verification" | Str2html}}</p>
|
||||
<p>{{.locale.Tr "settings.gpg_helper" "https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/about-commit-signature-verification#gpg-commit-signature-verification" | Str2html}}</p>
|
||||
|
||||
<div class="ui small basic delete modal" id="delete-gpg">
|
||||
<div class="ui icon header">
|
||||
{{svg "octicon-trash"}}
|
||||
{{.i18n.Tr "settings.gpg_key_deletion"}}
|
||||
{{.locale.Tr "settings.gpg_key_deletion"}}
|
||||
</div>
|
||||
<div class="content">
|
||||
<p>{{.i18n.Tr "settings.gpg_key_deletion_desc"}}</p>
|
||||
<p>{{.locale.Tr "settings.gpg_key_deletion_desc"}}</p>
|
||||
</div>
|
||||
{{template "base/delete_modal_actions" .}}
|
||||
</div>
|
||||
|
@@ -1,31 +1,31 @@
|
||||
{{if .AllowPrincipals}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "settings.manage_ssh_principals"}}
|
||||
{{.locale.Tr "settings.manage_ssh_principals"}}
|
||||
<div class="ui right">
|
||||
{{if not .DisableSSH}}
|
||||
<div class="ui primary tiny show-panel button" data-panel="#add-ssh-principal-panel">{{.i18n.Tr "settings.add_new_principal"}}</div>
|
||||
<div class="ui primary tiny show-panel button" data-panel="#add-ssh-principal-panel">{{.locale.Tr "settings.add_new_principal"}}</div>
|
||||
{{else}}
|
||||
<div class="ui primary tiny button disabled">{{.i18n.Tr "settings.ssh_disabled"}}</div>
|
||||
<div class="ui primary tiny button disabled">{{.locale.Tr "settings.ssh_disabled"}}</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<div class="ui key list">
|
||||
<div class="item">
|
||||
{{.i18n.Tr "settings.principal_desc"}}
|
||||
{{.locale.Tr "settings.principal_desc"}}
|
||||
</div>
|
||||
{{range .Principals}}
|
||||
<div class="item">
|
||||
<div class="right floated content">
|
||||
<button class="ui red tiny button delete-button" data-modal-id="delete-principal" data-url="{{$.Link}}/delete?type=principal" data-id="{{.ID}}">
|
||||
{{$.i18n.Tr "settings.delete_key"}}
|
||||
{{$.locale.Tr "settings.delete_key"}}
|
||||
</button>
|
||||
</div>
|
||||
<i class="big send icon {{if .HasRecentActivity}}green{{end}}" {{if .HasRecentActivity}}data-content="{{$.i18n.Tr "settings.principal_state_desc"}}" data-variation="inverted tiny"{{end}}></i>
|
||||
<i class="big send icon {{if .HasRecentActivity}}green{{end}}" {{if .HasRecentActivity}}data-content="{{$.locale.Tr "settings.principal_state_desc"}}" data-variation="inverted tiny"{{end}}></i>
|
||||
<div class="content">
|
||||
<strong>{{.Name}}</strong>
|
||||
<div class="activity meta">
|
||||
<i>{{$.i18n.Tr "settings.add_on"}} <span>{{.CreatedUnix.FormatShort}}</span> — {{svg "octicon-info" 16}} {{if .HasUsed}}{{$.i18n.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="green"{{end}}>{{.UpdatedUnix.FormatShort}}</span>{{else}}{{$.i18n.Tr "settings.no_activity"}}{{end}}</i>
|
||||
<i>{{$.locale.Tr "settings.add_on"}} <span>{{.CreatedUnix.FormatShort}}</span> — {{svg "octicon-info" 16}} {{if .HasUsed}}{{$.locale.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="green"{{end}}>{{.UpdatedUnix.FormatShort}}</span>{{else}}{{$.locale.Tr "settings.no_activity"}}{{end}}</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -36,19 +36,19 @@
|
||||
|
||||
<div {{if not .HasPrincipalError}}class="hide"{{end}} id="add-ssh-principal-panel">
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "settings.add_new_principal"}}
|
||||
{{.locale.Tr "settings.add_new_principal"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<form class="ui form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="field {{if .Err_Content}}error{{end}}">
|
||||
<label for="content">{{.i18n.Tr "settings.principal_content"}}</label>
|
||||
<label for="content">{{.locale.Tr "settings.principal_content"}}</label>
|
||||
<input id="ssh-principal-content" name="content" value="{{.content}}" autofocus required>
|
||||
</div>
|
||||
<input name="title" type="hidden" value="principal">
|
||||
<input name="type" type="hidden" value="principal">
|
||||
<button class="ui green button">
|
||||
{{.i18n.Tr "settings.add_new_principal"}}
|
||||
{{.locale.Tr "settings.add_new_principal"}}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
@@ -57,10 +57,10 @@
|
||||
<div class="ui small basic delete modal" id="delete-principal">
|
||||
<div class="ui icon header">
|
||||
{{svg "octicon-trash"}}
|
||||
{{.i18n.Tr "settings.ssh_principal_deletion"}}
|
||||
{{.locale.Tr "settings.ssh_principal_deletion"}}
|
||||
</div>
|
||||
<div class="content">
|
||||
<p>{{.i18n.Tr "settings.ssh_principal_deletion_desc"}}</p>
|
||||
<p>{{.locale.Tr "settings.ssh_principal_deletion_desc"}}</p>
|
||||
</div>
|
||||
{{template "base/delete_modal_actions" .}}
|
||||
</div>
|
||||
|
@@ -1,12 +1,12 @@
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "settings.manage_ssh_keys"}}
|
||||
{{.locale.Tr "settings.manage_ssh_keys"}}
|
||||
<div class="ui right">
|
||||
{{if not .DisableSSH }}
|
||||
<div id="add-ssh-button" class="ui primary tiny show-panel button" data-panel="#add-ssh-key-panel">
|
||||
{{.i18n.Tr "settings.add_key"}}
|
||||
{{.locale.Tr "settings.add_key"}}
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="ui primary tiny button disabled">{{.i18n.Tr "settings.ssh_disabled"}}</div>
|
||||
<div class="ui primary tiny button disabled">{{.locale.Tr "settings.ssh_disabled"}}</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</h4>
|
||||
@@ -15,80 +15,80 @@
|
||||
<form class="ui form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="field {{if .Err_Title}}error{{end}}">
|
||||
<label for="title">{{.i18n.Tr "settings.key_name"}}</label>
|
||||
<label for="title">{{.locale.Tr "settings.key_name"}}</label>
|
||||
<input id="ssh-key-title" name="title" value="{{.title}}" autofocus required>
|
||||
</div>
|
||||
<div class="field {{if .Err_Content}}error{{end}}">
|
||||
<label for="content">{{.i18n.Tr "settings.key_content"}}</label>
|
||||
<textarea id="ssh-key-content" name="content" class="js-quick-submit" placeholder="{{.i18n.Tr "settings.key_content_ssh_placeholder"}}" required>{{.content}}</textarea>
|
||||
<label for="content">{{.locale.Tr "settings.key_content"}}</label>
|
||||
<textarea id="ssh-key-content" name="content" class="js-quick-submit" placeholder="{{.locale.Tr "settings.key_content_ssh_placeholder"}}" required>{{.content}}</textarea>
|
||||
</div>
|
||||
<input name="type" type="hidden" value="ssh">
|
||||
<button class="ui green button">
|
||||
{{.i18n.Tr "settings.add_key"}}
|
||||
{{.locale.Tr "settings.add_key"}}
|
||||
</button>
|
||||
<button id="cancel-ssh-button" class="ui hide-panel button" data-panel="#add-ssh-key-panel">
|
||||
{{.i18n.Tr "cancel"}}
|
||||
{{.locale.Tr "cancel"}}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="ui key list mt-0">
|
||||
<div class="item">
|
||||
{{.i18n.Tr "settings.ssh_desc"}}
|
||||
{{.locale.Tr "settings.ssh_desc"}}
|
||||
</div>
|
||||
{{range $index, $key := .Keys}}
|
||||
<div class="item">
|
||||
<div class="right floated content">
|
||||
<button class="ui red tiny button delete-button{{if index $.ExternalKeys $index}} disabled{{end}}" data-modal-id="delete-ssh" data-url="{{$.Link}}/delete?type=ssh" data-id="{{.ID}}"{{if index $.ExternalKeys $index}} title="{{$.i18n.Tr "settings.ssh_externally_managed"}}"{{end}}>
|
||||
{{$.i18n.Tr "settings.delete_key"}}
|
||||
<button class="ui red tiny button delete-button{{if index $.ExternalKeys $index}} disabled{{end}}" data-modal-id="delete-ssh" data-url="{{$.Link}}/delete?type=ssh" data-id="{{.ID}}"{{if index $.ExternalKeys $index}} title="{{$.locale.Tr "settings.ssh_externally_managed"}}"{{end}}>
|
||||
{{$.locale.Tr "settings.delete_key"}}
|
||||
</button>
|
||||
{{if and (not .Verified) (ne $.VerifyingFingerprint .Fingerprint)}}
|
||||
<a class="ui primary tiny show-panel button" href="{{$.Link}}?verify_ssh={{.Fingerprint}}">{{$.i18n.Tr "settings.ssh_key_verify"}}</a>
|
||||
<a class="ui primary tiny show-panel button" href="{{$.Link}}?verify_ssh={{.Fingerprint}}">{{$.locale.Tr "settings.ssh_key_verify"}}</a>
|
||||
{{end}}
|
||||
|
||||
</div>
|
||||
<div class="left floated content">
|
||||
<span class="{{if .HasRecentActivity}}green{{end}}" {{if .HasRecentActivity}}data-content="{{$.i18n.Tr "settings.key_state_desc"}}" data-variation="inverted tiny"{{end}}>{{svg "octicon-key" 32}}</span>
|
||||
<span class="{{if .HasRecentActivity}}green{{end}}" {{if .HasRecentActivity}}data-content="{{$.locale.Tr "settings.key_state_desc"}}" data-variation="inverted tiny"{{end}}>{{svg "octicon-key" 32}}</span>
|
||||
</div>
|
||||
<div class="content">
|
||||
{{if .Verified}}
|
||||
<span class="tooltip" data-content="{{$.i18n.Tr "settings.ssh_key_verified_long"}}">{{svg "octicon-shield-check"}} <strong>{{$.i18n.Tr "settings.ssh_key_verified"}}</strong></span>
|
||||
<span class="tooltip" data-content="{{$.locale.Tr "settings.ssh_key_verified_long"}}">{{svg "octicon-shield-check"}} <strong>{{$.locale.Tr "settings.ssh_key_verified"}}</strong></span>
|
||||
{{end}}
|
||||
<strong>{{.Name}}</strong>
|
||||
<div class="print meta">
|
||||
{{.Fingerprint}}
|
||||
</div>
|
||||
<div class="activity meta">
|
||||
<i>{{$.i18n.Tr "settings.add_on"}} <span>{{.CreatedUnix.FormatShort}}</span> — {{svg "octicon-info"}} {{if .HasUsed}}{{$.i18n.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="green"{{end}}>{{.UpdatedUnix.FormatShort}}</span>{{else}}{{$.i18n.Tr "settings.no_activity"}}{{end}}</i>
|
||||
<i>{{$.locale.Tr "settings.add_on"}} <span>{{.CreatedUnix.FormatShort}}</span> — {{svg "octicon-info"}} {{if .HasUsed}}{{$.locale.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="green"{{end}}>{{.UpdatedUnix.FormatShort}}</span>{{else}}{{$.locale.Tr "settings.no_activity"}}{{end}}</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{if and (not .Verified) (eq $.VerifyingFingerprint .Fingerprint)}}
|
||||
<div class="ui segment">
|
||||
<h4>{{$.i18n.Tr "settings.ssh_token_required"}}</h4>
|
||||
<h4>{{$.locale.Tr "settings.ssh_token_required"}}</h4>
|
||||
<form class="ui form{{if $.HasSSHVerifyError}} error{{end}}" action="{{$.Link}}" method="post">
|
||||
{{$.CsrfTokenHtml}}
|
||||
<input type="hidden" name="title" value="none">
|
||||
<input type="hidden" name="content" value="{{.Content}}">
|
||||
<input type="hidden" name="fingerprint" value="{{.Fingerprint}}">
|
||||
<div class="field">
|
||||
<label for="token">{{$.i18n.Tr "settings.ssh_token"}}</label>
|
||||
<label for="token">{{$.locale.Tr "settings.ssh_token"}}</label>
|
||||
<input readonly="" value="{{$.TokenToSign}}">
|
||||
<div class="help">
|
||||
<p>{{$.i18n.Tr "settings.ssh_token_help"}}</p>
|
||||
<p>{{$.locale.Tr "settings.ssh_token_help"}}</p>
|
||||
<p><code>{{printf "echo -n '%s' | ssh-keygen -Y sign -n gitea -f /path_to_your_privkey" $.TokenToSign}}</code></p>
|
||||
</div>
|
||||
<br>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="signature">{{$.i18n.Tr "settings.ssh_token_signature"}}</label>
|
||||
<textarea id="ssh-key-signature" name="signature" class="js-quick-submit" placeholder="{{$.i18n.Tr "settings.key_signature_ssh_placeholder"}}" required>{{$.signature}}</textarea>
|
||||
<label for="signature">{{$.locale.Tr "settings.ssh_token_signature"}}</label>
|
||||
<textarea id="ssh-key-signature" name="signature" class="js-quick-submit" placeholder="{{$.locale.Tr "settings.key_signature_ssh_placeholder"}}" required>{{$.signature}}</textarea>
|
||||
</div>
|
||||
<input name="type" type="hidden" value="verify_ssh">
|
||||
<button class="ui green button">
|
||||
{{$.i18n.Tr "settings.ssh_key_verify"}}
|
||||
{{$.locale.Tr "settings.ssh_key_verify"}}
|
||||
</button>
|
||||
<a class="ui red button" href="{{$.Link}}">
|
||||
{{$.i18n.Tr "settings.cancel"}}
|
||||
{{$.locale.Tr "settings.cancel"}}
|
||||
</a>
|
||||
</form>
|
||||
</div>
|
||||
@@ -97,15 +97,15 @@
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<p>{{.i18n.Tr "settings.ssh_helper" "https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/connecting-to-github-with-ssh" "https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/troubleshooting-ssh" | Str2html}}</p>
|
||||
<p>{{.locale.Tr "settings.ssh_helper" "https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/connecting-to-github-with-ssh" "https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/troubleshooting-ssh" | Str2html}}</p>
|
||||
|
||||
<div class="ui small basic delete modal" id="delete-ssh">
|
||||
<div class="ui icon header">
|
||||
{{svg "octicon-trash"}}
|
||||
{{.i18n.Tr "settings.ssh_key_deletion"}}
|
||||
{{.locale.Tr "settings.ssh_key_deletion"}}
|
||||
</div>
|
||||
<div class="content">
|
||||
<p>{{.i18n.Tr "settings.ssh_key_deletion_desc"}}</p>
|
||||
<p>{{.locale.Tr "settings.ssh_key_deletion_desc"}}</p>
|
||||
</div>
|
||||
{{template "base/delete_modal_actions" .}}
|
||||
</div>
|
||||
|
@@ -1,28 +1,28 @@
|
||||
<div class="ui secondary pointing tabular top attached borderless menu stackable new-menu navbar">
|
||||
<div class="new-menu-inner">
|
||||
<a class="{{if .PageIsSettingsProfile}}active{{end}} item" href="{{AppSubUrl}}/user/settings">
|
||||
{{.i18n.Tr "settings.profile"}}
|
||||
{{.locale.Tr "settings.profile"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsSettingsAccount}}active{{end}} item" href="{{AppSubUrl}}/user/settings/account">
|
||||
{{.i18n.Tr "settings.account"}}
|
||||
{{.locale.Tr "settings.account"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsSettingsAppearance}}active{{end}} item" href="{{AppSubUrl}}/user/settings/appearance">
|
||||
{{.i18n.Tr "settings.appearance"}}
|
||||
{{.locale.Tr "settings.appearance"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsSettingsSecurity}}active{{end}} item" href="{{AppSubUrl}}/user/settings/security">
|
||||
{{.i18n.Tr "settings.security"}}
|
||||
{{.locale.Tr "settings.security"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsSettingsApplications}}active{{end}} item" href="{{AppSubUrl}}/user/settings/applications">
|
||||
{{.i18n.Tr "settings.applications"}}
|
||||
{{.locale.Tr "settings.applications"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsSettingsKeys}}active{{end}} item" href="{{AppSubUrl}}/user/settings/keys">
|
||||
{{.i18n.Tr "settings.ssh_gpg_keys"}}
|
||||
{{.locale.Tr "settings.ssh_gpg_keys"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsSettingsOrganization}}active{{end}} item" href="{{AppSubUrl}}/user/settings/organization">
|
||||
{{.i18n.Tr "settings.organization"}}
|
||||
{{.locale.Tr "settings.organization"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsSettingsRepos}}active{{end}} item" href="{{AppSubUrl}}/user/settings/repos">
|
||||
{{.i18n.Tr "settings.repos"}}
|
||||
{{.locale.Tr "settings.repos"}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -4,10 +4,10 @@
|
||||
<div class="ui container">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "settings.orgs"}}
|
||||
{{.locale.Tr "settings.orgs"}}
|
||||
{{if .SignedUser.CanCreateOrganization}}
|
||||
<div class="ui right">
|
||||
<a class="ui primary tiny button" href="{{AppSubUrl}}/org/create">{{.i18n.Tr "admin.orgs.new_orga"}}</a>
|
||||
<a class="ui primary tiny button" href="{{AppSubUrl}}/org/create">{{.locale.Tr "admin.orgs.new_orga"}}</a>
|
||||
</div>
|
||||
{{end}}
|
||||
</h4>
|
||||
@@ -19,7 +19,7 @@
|
||||
<div class="right floated content">
|
||||
<form method="post" action="{{.OrganisationLink}}/members/action/leave">
|
||||
{{$.CsrfTokenHtml}}
|
||||
<button type="submit" class="ui primary small button" name="uid" value="{{.ID}}">{{$.i18n.Tr "org.members.leave"}}</button>
|
||||
<button type="submit" class="ui primary small button" name="uid" value="{{.ID}}">{{$.locale.Tr "org.members.leave"}}</button>
|
||||
</form>
|
||||
</div>
|
||||
{{avatar . 28 "mini"}}
|
||||
@@ -31,7 +31,7 @@
|
||||
</div>
|
||||
{{template "base/paginate" .}}
|
||||
{{else}}
|
||||
{{.i18n.Tr "settings.orgs_none"}}
|
||||
{{.locale.Tr "settings.orgs_none"}}
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -4,46 +4,46 @@
|
||||
<div class="ui container">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "settings.public_profile"}}
|
||||
{{.locale.Tr "settings.public_profile"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<p>{{.i18n.Tr "settings.profile_desc"}}</p>
|
||||
<p>{{.locale.Tr "settings.profile_desc"}}</p>
|
||||
<form class="ui form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="required field {{if .Err_Name}}error{{end}}">
|
||||
<label for="username">{{.i18n.Tr "username"}}
|
||||
<span class="text red hide" id="name-change-prompt"> {{.i18n.Tr "settings.change_username_prompt"}}</span>
|
||||
<span class="text red hide" id="name-change-redirect-prompt"> {{.i18n.Tr "settings.change_username_redirect_prompt"}}</span>
|
||||
<label for="username">{{.locale.Tr "username"}}
|
||||
<span class="text red hide" id="name-change-prompt"> {{.locale.Tr "settings.change_username_prompt"}}</span>
|
||||
<span class="text red hide" id="name-change-redirect-prompt"> {{.locale.Tr "settings.change_username_redirect_prompt"}}</span>
|
||||
</label>
|
||||
<input id="username" name="name" value="{{.SignedUser.Name}}" data-name="{{.SignedUser.Name}}" autofocus required {{if or (not .SignedUser.IsLocal) .IsReverseProxy}}disabled{{end}}>
|
||||
{{if or (not .SignedUser.IsLocal) .IsReverseProxy}}
|
||||
<p class="help text blue">{{$.i18n.Tr "settings.password_username_disabled"}}</p>
|
||||
<p class="help text blue">{{$.locale.Tr "settings.password_username_disabled"}}</p>
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="field {{if .Err_FullName}}error{{end}}">
|
||||
<label for="full_name">{{.i18n.Tr "settings.full_name"}}</label>
|
||||
<label for="full_name">{{.locale.Tr "settings.full_name"}}</label>
|
||||
<input id="full_name" name="full_name" value="{{.SignedUser.FullName}}">
|
||||
</div>
|
||||
<div class="field {{if .Err_Email}}error{{end}}">
|
||||
<label for="email">{{.i18n.Tr "email"}}</label>
|
||||
<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 class="tooltip" data-content="{{.i18n.Tr "settings.keep_email_private_popup"}}"><strong>{{.i18n.Tr "settings.keep_email_private"}}</strong></label>
|
||||
<label class="tooltip" data-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">{{$.i18n.Tr "user.user_bio"}}</label>
|
||||
<textarea id="description" name="description" rows="2" placeholder="{{.i18n.Tr "settings.biography_placeholder"}}">{{.SignedUser.Description}}</textarea>
|
||||
<label for="description">{{$.locale.Tr "user.user_bio"}}</label>
|
||||
<textarea id="description" name="description" rows="2" placeholder="{{.locale.Tr "settings.biography_placeholder"}}">{{.SignedUser.Description}}</textarea>
|
||||
</div>
|
||||
<div class="field {{if .Err_Website}}error{{end}}">
|
||||
<label for="website">{{.i18n.Tr "settings.website"}}</label>
|
||||
<label for="website">{{.locale.Tr "settings.website"}}</label>
|
||||
<input id="website" name="website" type="url" value="{{.SignedUser.Website}}">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="location">{{.i18n.Tr "settings.location"}}</label>
|
||||
<label for="location">{{.locale.Tr "settings.location"}}</label>
|
||||
<input id="location" name="location" value="{{.SignedUser.Location}}">
|
||||
</div>
|
||||
|
||||
@@ -51,29 +51,29 @@
|
||||
<!-- private block -->
|
||||
|
||||
<div class="field">
|
||||
<label for="security-private"><strong>{{.i18n.Tr "settings.privacy"}}</strong></label>
|
||||
<label for="security-private"><strong>{{.locale.Tr "settings.privacy"}}</strong></label>
|
||||
</div>
|
||||
|
||||
<div class="inline field {{if .Err_Visibility}}error{{end}}">
|
||||
<span class="inline required field"><label for="visibility">{{.i18n.Tr "settings.visibility"}}</label></span>
|
||||
<span class="inline required field"><label for="visibility">{{.locale.Tr "settings.visibility"}}</label></span>
|
||||
<div class="ui selection type dropdown">
|
||||
{{if .SignedUser.Visibility.IsPublic}}<input type="hidden" id="visibility" name="visibility" value="0">{{end}}
|
||||
{{if .SignedUser.Visibility.IsLimited}}<input type="hidden" id="visibility" name="visibility" value="1">{{end}}
|
||||
{{if .SignedUser.Visibility.IsPrivate}}<input type="hidden" id="visibility" name="visibility" value="2">{{end}}
|
||||
<div class="text">
|
||||
{{if .SignedUser.Visibility.IsPublic}}{{.i18n.Tr "settings.visibility.public"}}{{end}}
|
||||
{{if .SignedUser.Visibility.IsLimited}}{{.i18n.Tr "settings.visibility.limited"}}{{end}}
|
||||
{{if .SignedUser.Visibility.IsPrivate}}{{.i18n.Tr "settings.visibility.private"}}{{end}}
|
||||
{{if .SignedUser.Visibility.IsPublic}}{{.locale.Tr "settings.visibility.public"}}{{end}}
|
||||
{{if .SignedUser.Visibility.IsLimited}}{{.locale.Tr "settings.visibility.limited"}}{{end}}
|
||||
{{if .SignedUser.Visibility.IsPrivate}}{{.locale.Tr "settings.visibility.private"}}{{end}}
|
||||
</div>
|
||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||
<div class="menu">
|
||||
{{range $mode := .AllowedUserVisibilityModes}}
|
||||
{{if $mode.IsPublic}}
|
||||
<div class="item tooltip" data-content="{{$.i18n.Tr "settings.visibility.public_tooltip"}}" data-value="0">{{$.i18n.Tr "settings.visibility.public"}}</div>
|
||||
<div class="item tooltip" data-content="{{$.locale.Tr "settings.visibility.public_tooltip"}}" data-value="0">{{$.locale.Tr "settings.visibility.public"}}</div>
|
||||
{{else if $mode.IsLimited}}
|
||||
<div class="item tooltip" data-content="{{$.i18n.Tr "settings.visibility.limited_tooltip"}}" data-value="1">{{$.i18n.Tr "settings.visibility.limited"}}</div>
|
||||
<div class="item tooltip" data-content="{{$.locale.Tr "settings.visibility.limited_tooltip"}}" data-value="1">{{$.locale.Tr "settings.visibility.limited"}}</div>
|
||||
{{else if $mode.IsPrivate}}
|
||||
<div class="item tooltip" data-content="{{$.i18n.Tr "settings.visibility.private_tooltip"}}" data-value="2">{{$.i18n.Tr "settings.visibility.private"}}</div>
|
||||
<div class="item tooltip" data-content="{{$.locale.Tr "settings.visibility.private_tooltip"}}" data-value="2">{{$.locale.Tr "settings.visibility.private"}}</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
@@ -82,7 +82,7 @@
|
||||
|
||||
<div class="field">
|
||||
<div class="ui checkbox" id="keep-activity-private">
|
||||
<label class="tooltip" data-content="{{.i18n.Tr "settings.keep_activity_private_popup"}}"><strong>{{.i18n.Tr "settings.keep_activity_private"}}</strong></label>
|
||||
<label class="tooltip" data-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}}>
|
||||
</div>
|
||||
</div>
|
||||
@@ -90,13 +90,13 @@
|
||||
<div class="ui divider"></div>
|
||||
|
||||
<div class="field">
|
||||
<button class="ui green button">{{$.i18n.Tr "settings.update_profile"}}</button>
|
||||
<button class="ui green button">{{$.locale.Tr "settings.update_profile"}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "settings.avatar"}}
|
||||
{{.locale.Tr "settings.avatar"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<form class="ui form" action="{{.Link}}/avatar" method="post" enctype="multipart/form-data">
|
||||
@@ -105,11 +105,11 @@
|
||||
<div class="inline field">
|
||||
<div class="ui radio checkbox">
|
||||
<input name="source" value="lookup" type="radio" {{if not .SignedUser.UseCustomAvatar}}checked{{end}}>
|
||||
<label>{{.i18n.Tr "settings.lookup_avatar_by_mail"}}</label>
|
||||
<label>{{.locale.Tr "settings.lookup_avatar_by_mail"}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field {{if .Err_Gravatar}}error{{end}}">
|
||||
<label for="gravatar">Avatar {{.i18n.Tr "email"}}</label>
|
||||
<label for="gravatar">Avatar {{.locale.Tr "email"}}</label>
|
||||
<input id="gravatar" name="gravatar" value="{{.SignedUser.AvatarEmail}}" />
|
||||
</div>
|
||||
{{end}}
|
||||
@@ -117,18 +117,18 @@
|
||||
<div class="inline field">
|
||||
<div class="ui radio checkbox">
|
||||
<input name="source" value="local" type="radio" {{if .SignedUser.UseCustomAvatar}}checked{{end}}>
|
||||
<label>{{.i18n.Tr "settings.enable_custom_avatar"}}</label>
|
||||
<label>{{.locale.Tr "settings.enable_custom_avatar"}}</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="inline field">
|
||||
<label for="avatar">{{.i18n.Tr "settings.choose_new_avatar"}}</label>
|
||||
<label for="avatar">{{.locale.Tr "settings.choose_new_avatar"}}</label>
|
||||
<input name="avatar" type="file" >
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<button class="ui green button">{{$.i18n.Tr "settings.update_avatar"}}</button>
|
||||
<a class="ui red button delete-post" data-request-url="{{.Link}}/avatar/delete" data-done-url="{{.Link}}">{{$.i18n.Tr "settings.delete_current_avatar"}}</a>
|
||||
<button class="ui green button">{{$.locale.Tr "settings.update_avatar"}}</button>
|
||||
<a class="ui red button delete-post" data-request-url="{{.Link}}/avatar/delete" data-done-url="{{.Link}}">{{$.locale.Tr "settings.delete_current_avatar"}}</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
@@ -4,7 +4,7 @@
|
||||
<div class="ui container">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "settings.repos"}}
|
||||
{{.locale.Tr "settings.repos"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
{{if or .allowAdopt .allowDelete}}
|
||||
@@ -29,7 +29,7 @@
|
||||
<a class="name" href="{{$repo.Link}}">{{$repo.OwnerName}}/{{$repo.Name}}</a>
|
||||
<span>{{FileSize $repo.Size}}</span>
|
||||
{{if $repo.IsFork}}
|
||||
{{$.i18n.Tr "repo.forked_from"}}
|
||||
{{$.locale.Tr "repo.forked_from"}}
|
||||
<span><a href="{{$repo.BaseRepo.Link}}">{{$repo.BaseRepo.OwnerName}}/{{$repo.BaseRepo.Name}}</a></span>
|
||||
{{end}}
|
||||
{{else}}
|
||||
@@ -37,14 +37,14 @@
|
||||
<span class="name">{{$.Owner.Name}}/{{$dir}}</span>
|
||||
<div class="right floated content">
|
||||
{{if $.allowAdopt}}
|
||||
<button class="ui button submit tiny green adopt show-modal" data-modal="#adopt-unadopted-modal-{{$dirI}}"><span class="icon">{{svg "octicon-plus"}}</span><span class="label">{{$.i18n.Tr "repo.adopt_preexisting_label"}}</span></button>
|
||||
<button class="ui button submit tiny green adopt show-modal" data-modal="#adopt-unadopted-modal-{{$dirI}}"><span class="icon">{{svg "octicon-plus"}}</span><span class="label">{{$.locale.Tr "repo.adopt_preexisting_label"}}</span></button>
|
||||
<div class="ui basic modal" id="adopt-unadopted-modal-{{$dirI}}">
|
||||
{{svg "octicon-x" 16 "close inside"}}
|
||||
<div class="header">
|
||||
<span class="label">{{$.i18n.Tr "repo.adopt_preexisting"}}</span>
|
||||
<span class="label">{{$.locale.Tr "repo.adopt_preexisting"}}</span>
|
||||
</div>
|
||||
<div class="content">
|
||||
<p>{{$.i18n.Tr "repo.adopt_preexisting_content" $dir}}</p>
|
||||
<p>{{$.locale.Tr "repo.adopt_preexisting_content" $dir}}</p>
|
||||
</div>
|
||||
<form class="ui form" method="POST" action="{{AppSubUrl}}/user/settings/repos/unadopted">
|
||||
{{$.CsrfTokenHtml}}
|
||||
@@ -53,25 +53,25 @@
|
||||
<div class="actions">
|
||||
<div class="ui red basic inverted cancel button">
|
||||
<i class="remove icon"></i>
|
||||
{{$.i18n.Tr "modal.no"}}
|
||||
{{$.locale.Tr "modal.no"}}
|
||||
</div>
|
||||
<button class="ui green basic inverted ok button">
|
||||
<i class="checkmark icon"></i>
|
||||
{{$.i18n.Tr "modal.yes"}}
|
||||
{{$.locale.Tr "modal.yes"}}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{{end}}
|
||||
{{if $.allowDelete}}
|
||||
<button class="ui button submit tiny red delete show-modal" data-modal="#delete-unadopted-modal-{{$dirI}}"><span class="icon">{{svg "octicon-x"}}</span><span class="label">{{$.i18n.Tr "repo.delete_preexisting_label"}}</span></button>
|
||||
<button class="ui button submit tiny red delete show-modal" data-modal="#delete-unadopted-modal-{{$dirI}}"><span class="icon">{{svg "octicon-x"}}</span><span class="label">{{$.locale.Tr "repo.delete_preexisting_label"}}</span></button>
|
||||
<div class="ui basic modal" id="delete-unadopted-modal-{{$dirI}}">
|
||||
{{svg "octicon-x" 16 "close inside"}}
|
||||
<div class="header">
|
||||
<span class="label">{{$.i18n.Tr "repo.delete_preexisting"}}</span>
|
||||
<span class="label">{{$.locale.Tr "repo.delete_preexisting"}}</span>
|
||||
</div>
|
||||
<div class="content">
|
||||
<p>{{$.i18n.Tr "repo.delete_preexisting_content" $dir}}</p>
|
||||
<p>{{$.locale.Tr "repo.delete_preexisting_content" $dir}}</p>
|
||||
</div>
|
||||
<form class="ui form" method="POST" action="{{AppSubUrl}}/user/settings/repos/unadopted">
|
||||
{{$.CsrfTokenHtml}}
|
||||
@@ -80,11 +80,11 @@
|
||||
<div class="actions">
|
||||
<div class="ui red basic inverted cancel button">
|
||||
<i class="remove icon"></i>
|
||||
{{$.i18n.Tr "modal.no"}}
|
||||
{{$.locale.Tr "modal.no"}}
|
||||
</div>
|
||||
<button class="ui green basic inverted ok button">
|
||||
<i class="checkmark icon"></i>
|
||||
{{$.i18n.Tr "modal.yes"}}
|
||||
{{$.locale.Tr "modal.yes"}}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
@@ -99,7 +99,7 @@
|
||||
{{template "base/paginate" .}}
|
||||
{{else}}
|
||||
<div class="item">
|
||||
{{.i18n.Tr "settings.repos_none"}}
|
||||
{{.locale.Tr "settings.repos_none"}}
|
||||
</div>
|
||||
{{end}}
|
||||
{{else}}
|
||||
@@ -122,7 +122,7 @@
|
||||
<a class="name" href="{{.Link}}">{{.OwnerName}}/{{.Name}}</a>
|
||||
<span>{{FileSize .Size}}</span>
|
||||
{{if .IsFork}}
|
||||
{{$.i18n.Tr "repo.forked_from"}}
|
||||
{{$.locale.Tr "repo.forked_from"}}
|
||||
<span><a href="{{.BaseRepo.Link}}">{{.BaseRepo.OwnerName}}/{{.BaseRepo.Name}}</a></span>
|
||||
{{end}}
|
||||
</div>
|
||||
@@ -132,7 +132,7 @@
|
||||
{{template "base/paginate" .}}
|
||||
{{else}}
|
||||
<div class="item">
|
||||
{{.i18n.Tr "settings.repos_none"}}
|
||||
{{.locale.Tr "settings.repos_none"}}
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
@@ -143,10 +143,10 @@
|
||||
<div class="ui small basic delete modal">
|
||||
<div class="ui icon header">
|
||||
{{svg "octicon-trash"}}
|
||||
{{.i18n.Tr "settings.remove_account_link"}}
|
||||
{{.locale.Tr "settings.remove_account_link"}}
|
||||
</div>
|
||||
<div class="content">
|
||||
<p>{{.i18n.Tr "settings.remove_account_link_desc"}}</p>
|
||||
<p>{{.locale.Tr "settings.remove_account_link_desc"}}</p>
|
||||
</div>
|
||||
{{template "base/delete_modal_actions" .}}
|
||||
</div>
|
||||
|
@@ -1,9 +1,9 @@
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "settings.manage_account_links"}}
|
||||
{{.locale.Tr "settings.manage_account_links"}}
|
||||
{{if .OrderedOAuth2Names}}
|
||||
<div class="ui right">
|
||||
<div class="ui dropdown">
|
||||
<div class="ui primary tiny button">{{.i18n.Tr "settings.link_account"}}</div>
|
||||
<div class="ui primary tiny button">{{.locale.Tr "settings.link_account"}}</div>
|
||||
<div class="menu">
|
||||
{{range $key := .OrderedOAuth2Names}}
|
||||
{{$provider := index $.OAuth2Providers $key}}
|
||||
@@ -21,19 +21,19 @@
|
||||
<div class="ui attached segment">
|
||||
<div class="ui key list">
|
||||
<div class="item">
|
||||
{{.i18n.Tr "settings.manage_account_links_desc"}}
|
||||
{{.locale.Tr "settings.manage_account_links_desc"}}
|
||||
</div>
|
||||
{{if .AccountLinks}}
|
||||
{{range $loginSource, $provider := .AccountLinks}}
|
||||
<div class="item">
|
||||
<div class="right floated content">
|
||||
<button class="ui red tiny button delete-button" data-modal-id="delete-account-link" data-url="{{AppSubUrl}}/user/settings/security/account_link" data-id="{{$loginSource.ID}}">
|
||||
{{$.i18n.Tr "settings.delete_key"}}
|
||||
{{$.locale.Tr "settings.delete_key"}}
|
||||
</button>
|
||||
</div>
|
||||
<div class="content">
|
||||
<strong>{{$provider}}</strong>
|
||||
{{if $loginSource.IsActive}}<span class="text red">{{$.i18n.Tr "settings.active"}}</span>{{end}}
|
||||
{{if $loginSource.IsActive}}<span class="text red">{{$.locale.Tr "settings.active"}}</span>{{end}}
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
@@ -44,10 +44,10 @@
|
||||
<div class="ui small basic delete modal" id="delete-account-link">
|
||||
<div class="ui icon header">
|
||||
{{svg "octicon-trash"}}
|
||||
{{.i18n.Tr "settings.remove_account_link"}}
|
||||
{{.locale.Tr "settings.remove_account_link"}}
|
||||
</div>
|
||||
<div class="content">
|
||||
<p>{{.i18n.Tr "settings.remove_account_link_desc"}}</p>
|
||||
<p>{{.locale.Tr "settings.remove_account_link_desc"}}</p>
|
||||
</div>
|
||||
{{template "base/delete_modal_actions" .}}
|
||||
</div>
|
||||
|
@@ -1,16 +1,16 @@
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "settings.manage_openid"}}
|
||||
{{.locale.Tr "settings.manage_openid"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<div class="ui openid list">
|
||||
<div class="item">
|
||||
{{.i18n.Tr "settings.openid_desc"}}
|
||||
{{.locale.Tr "settings.openid_desc"}}
|
||||
</div>
|
||||
{{range .OpenIDs}}
|
||||
<div class="item">
|
||||
<div class="right floated content">
|
||||
<button class="ui red tiny button delete-button" data-modal-id="delete-openid" data-url="{{AppSubUrl}}/user/settings/security/openid/delete" data-id="{{.ID}}">
|
||||
{{$.i18n.Tr "settings.delete_key"}}
|
||||
{{$.locale.Tr "settings.delete_key"}}
|
||||
</button>
|
||||
</div>
|
||||
<div class="right floated content">
|
||||
@@ -20,12 +20,12 @@
|
||||
{{if .Show}}
|
||||
<button class="ui tiny button">
|
||||
{{svg "octicon-eye" 16 "icon"}}
|
||||
{{$.i18n.Tr "settings.hide_openid"}}
|
||||
{{$.locale.Tr "settings.hide_openid"}}
|
||||
</button>
|
||||
{{else}}
|
||||
<button class="ui tiny button">
|
||||
{{svg "octicon-eye-closed" 16 "icon"}}
|
||||
{{$.i18n.Tr "settings.show_openid"}}
|
||||
{{$.locale.Tr "settings.show_openid"}}
|
||||
</button>
|
||||
{{end}}
|
||||
</button>
|
||||
@@ -42,11 +42,11 @@
|
||||
<form class="ui form" action="{{AppSubUrl}}/user/settings/security/openid" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="required field {{if .Err_OpenID}}error{{end}}">
|
||||
<label for="openid">{{.i18n.Tr "settings.add_new_openid"}}</label>
|
||||
<label for="openid">{{.locale.Tr "settings.add_new_openid"}}</label>
|
||||
<input id="openid" name="openid" type="text" required>
|
||||
</div>
|
||||
<button class="ui green button">
|
||||
{{.i18n.Tr "settings.add_openid"}}
|
||||
{{.locale.Tr "settings.add_openid"}}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
@@ -54,10 +54,10 @@
|
||||
<div class="ui small basic delete modal" id="delete-openid">
|
||||
<div class="ui icon header">
|
||||
{{svg "octicon-trash"}}
|
||||
{{.i18n.Tr "settings.openid_deletion"}}
|
||||
{{.locale.Tr "settings.openid_deletion"}}
|
||||
</div>
|
||||
<div class="content">
|
||||
<p>{{.i18n.Tr "settings.openid_deletion_desc"}}</p>
|
||||
<p>{{.locale.Tr "settings.openid_deletion_desc"}}</p>
|
||||
</div>
|
||||
{{template "base/delete_modal_actions" .}}
|
||||
</div>
|
||||
|
@@ -1,24 +1,24 @@
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "settings.twofa"}}
|
||||
{{.locale.Tr "settings.twofa"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<p>{{.i18n.Tr "settings.twofa_desc"}}</p>
|
||||
<p>{{.locale.Tr "settings.twofa_desc"}}</p>
|
||||
{{if .TOTPEnrolled}}
|
||||
<p>{{$.i18n.Tr "settings.twofa_is_enrolled" | Str2html }}</p>
|
||||
<p>{{$.locale.Tr "settings.twofa_is_enrolled" | Str2html }}</p>
|
||||
<form class="ui form" action="{{AppSubUrl}}/user/settings/security/two_factor/regenerate_scratch" method="post" enctype="multipart/form-data">
|
||||
{{.CsrfTokenHtml}}
|
||||
<p>{{.i18n.Tr "settings.regenerate_scratch_token_desc"}}</p>
|
||||
<button class="ui primary button">{{$.i18n.Tr "settings.twofa_scratch_token_regenerate"}}</button>
|
||||
<p>{{.locale.Tr "settings.regenerate_scratch_token_desc"}}</p>
|
||||
<button class="ui primary button">{{$.locale.Tr "settings.twofa_scratch_token_regenerate"}}</button>
|
||||
</form>
|
||||
<form class="ui form" action="{{AppSubUrl}}/user/settings/security/two_factor/disable" method="post" enctype="multipart/form-data" id="disable-form">
|
||||
{{.CsrfTokenHtml}}
|
||||
<p>{{.i18n.Tr "settings.twofa_disable_note"}}</p>
|
||||
<div class="ui red button delete-button" data-modal-id="disable-twofa" data-type="form" data-form="#disable-form">{{$.i18n.Tr "settings.twofa_disable"}}</div>
|
||||
<p>{{.locale.Tr "settings.twofa_disable_note"}}</p>
|
||||
<div class="ui red button delete-button" data-modal-id="disable-twofa" data-type="form" data-form="#disable-form">{{$.locale.Tr "settings.twofa_disable"}}</div>
|
||||
</form>
|
||||
{{else}}
|
||||
<p>{{.i18n.Tr "settings.twofa_not_enrolled"}}</p>
|
||||
<p>{{.locale.Tr "settings.twofa_not_enrolled"}}</p>
|
||||
<div class="inline field">
|
||||
<a class="ui green button" href="{{AppSubUrl}}/user/settings/security/two_factor/enroll">{{$.i18n.Tr "settings.twofa_enroll"}}</a>
|
||||
<a class="ui green button" href="{{AppSubUrl}}/user/settings/security/two_factor/enroll">{{$.locale.Tr "settings.twofa_enroll"}}</a>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
@@ -26,10 +26,10 @@
|
||||
<div class="ui small basic delete modal" id="disable-twofa">
|
||||
<div class="ui icon header">
|
||||
{{svg "octicon-trash"}}
|
||||
{{.i18n.Tr "settings.twofa_disable"}}
|
||||
{{.locale.Tr "settings.twofa_disable"}}
|
||||
</div>
|
||||
<div class="content">
|
||||
<p>{{.i18n.Tr "settings.twofa_disable_desc"}}</p>
|
||||
<p>{{.locale.Tr "settings.twofa_disable_desc"}}</p>
|
||||
</div>
|
||||
{{template "base/delete_modal_actions" .}}
|
||||
</div>
|
||||
|
@@ -4,22 +4,22 @@
|
||||
<div class="ui container">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "settings.twofa_enroll"}}
|
||||
{{.locale.Tr "settings.twofa_enroll"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<p>{{.i18n.Tr "settings.scan_this_image"}}</p>
|
||||
<p>{{.locale.Tr "settings.scan_this_image"}}</p>
|
||||
<img src="{{.QrUri}}" alt="{{.TwofaSecret}}">
|
||||
<p>{{.i18n.Tr "settings.or_enter_secret" .TwofaSecret}}
|
||||
<p>{{.i18n.Tr "settings.then_enter_passcode"}}
|
||||
<p>{{.locale.Tr "settings.or_enter_secret" .TwofaSecret}}
|
||||
<p>{{.locale.Tr "settings.then_enter_passcode"}}
|
||||
<form class="ui form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="inline required field {{if .Err_Passcode}}error{{end}}">
|
||||
<label for="passcode">{{.i18n.Tr "passcode"}}</label>
|
||||
<label for="passcode">{{.locale.Tr "passcode"}}</label>
|
||||
<input id="passcode" name="passcode" autofocus required>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<label></label>
|
||||
<button class="ui green button">{{.i18n.Tr "auth.verify"}}</button>
|
||||
<button class="ui green button">{{.locale.Tr "auth.verify"}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
@@ -1,30 +1,30 @@
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "settings.webauthn"}}
|
||||
{{.locale.Tr "settings.webauthn"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<p>{{.i18n.Tr "settings.webauthn_desc" | Str2html}}</p>
|
||||
<p>{{.locale.Tr "settings.webauthn_desc" | Str2html}}</p>
|
||||
<div class="ui key list">
|
||||
{{range .WebAuthnCredentials}}
|
||||
<div class="item">
|
||||
<div class="right floated content">
|
||||
<button class="ui red tiny button delete-button" data-modal-id="delete-registration" data-url="{{$.Link}}/webauthn/delete" data-id="{{.ID}}">
|
||||
{{$.i18n.Tr "settings.delete_key"}}
|
||||
{{$.locale.Tr "settings.delete_key"}}
|
||||
</button>
|
||||
</div>
|
||||
<div class="content">
|
||||
<strong>{{.Name}}</strong>
|
||||
</div>
|
||||
<span class="time">{{TimeSinceUnix .CreatedUnix $.i18n}}</span>
|
||||
<span class="time">{{TimeSinceUnix .CreatedUnix $.locale}}</span>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="ui form">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="required field">
|
||||
<label for="nickname">{{.i18n.Tr "settings.webauthn_nickname"}}</label>
|
||||
<label for="nickname">{{.locale.Tr "settings.webauthn_nickname"}}</label>
|
||||
<input id="nickname" name="nickname" type="text" required>
|
||||
</div>
|
||||
<button id="register-webauthn" class="ui green button">{{svg "octicon-key"}} {{.i18n.Tr "settings.webauthn_register_key"}}</button>
|
||||
<button id="register-webauthn" class="ui green button">{{svg "octicon-key"}} {{.locale.Tr "settings.webauthn_register_key"}}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -33,10 +33,10 @@
|
||||
<div class="ui small basic delete modal" id="delete-registration">
|
||||
<div class="ui icon header">
|
||||
{{svg "octicon-trash"}}
|
||||
{{.i18n.Tr "settings.webauthn_delete_key"}}
|
||||
{{.locale.Tr "settings.webauthn_delete_key"}}
|
||||
</div>
|
||||
<div class="content">
|
||||
<p>{{.i18n.Tr "settings.webauthn_delete_key_desc"}}</p>
|
||||
<p>{{.locale.Tr "settings.webauthn_delete_key_desc"}}</p>
|
||||
</div>
|
||||
{{template "base/delete_modal_actions" .}}
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user