From e68b9d00a6e05b3a941f63ffb696f91e554ac5ec Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 18 Oct 2024 20:33:49 +0200 Subject: Adding upstream version 9.0.3. Signed-off-by: Daniel Baumann --- templates/user/auth/activate.tmpl | 61 +++++++ templates/user/auth/captcha.tmpl | 30 ++++ templates/user/auth/change_passwd.tmpl | 7 + templates/user/auth/change_passwd_inner.tmpl | 22 +++ templates/user/auth/finalize_openid.tmpl | 47 +++++ templates/user/auth/forgot_passwd.tmpl | 39 +++++ templates/user/auth/grant.tmpl | 34 ++++ templates/user/auth/grant_error.tmpl | 16 ++ templates/user/auth/link_account.tmpl | 34 ++++ templates/user/auth/oauth_container.tmpl | 29 +++ templates/user/auth/oidc_wellknown.tmpl | 49 ++++++ templates/user/auth/prohibit_login.tmpl | 16 ++ templates/user/auth/reset_passwd.tmpl | 65 +++++++ templates/user/auth/signin.tmpl | 9 + templates/user/auth/signin_inner.tmpl | 65 +++++++ templates/user/auth/signin_openid.tmpl | 51 ++++++ templates/user/auth/signup.tmpl | 9 + templates/user/auth/signup_inner.tmpl | 64 +++++++ templates/user/auth/signup_openid_connect.tmpl | 36 ++++ templates/user/auth/signup_openid_navbar.tmpl | 12 ++ templates/user/auth/signup_openid_register.tmpl | 37 ++++ templates/user/auth/twofa.tmpl | 26 +++ templates/user/auth/twofa_scratch.tmpl | 25 +++ templates/user/auth/webauthn.tmpl | 25 +++ templates/user/auth/webauthn_error.tmpl | 13 ++ templates/user/code.tmpl | 24 +++ templates/user/dashboard/dashboard.tmpl | 13 ++ templates/user/dashboard/feeds.tmpl | 127 ++++++++++++++ templates/user/dashboard/issues.tmpl | 91 ++++++++++ templates/user/dashboard/milestones.tmpl | 155 ++++++++++++++++ templates/user/dashboard/navbar.tmpl | 102 +++++++++++ templates/user/dashboard/repolist.tmpl | 55 ++++++ templates/user/heatmap.tmpl | 13 ++ templates/user/notification/notification.tmpl | 3 + templates/user/notification/notification_div.tmpl | 130 ++++++++++++++ .../notification/notification_subscriptions.tmpl | 84 +++++++++ templates/user/overview/header.tmpl | 58 ++++++ templates/user/overview/package_versions.tmpl | 24 +++ templates/user/overview/packages.tmpl | 24 +++ templates/user/profile.tmpl | 76 ++++++++ templates/user/settings/account.tmpl | 180 +++++++++++++++++++ templates/user/settings/actions.tmpl | 12 ++ templates/user/settings/appearance.tmpl | 195 +++++++++++++++++++++ templates/user/settings/applications.tmpl | 113 ++++++++++++ templates/user/settings/applications_oauth2.tmpl | 6 + .../user/settings/applications_oauth2_edit.tmpl | 6 + .../settings/applications_oauth2_edit_form.tmpl | 54 ++++++ .../user/settings/applications_oauth2_list.tmpl | 74 ++++++++ templates/user/settings/blocked_users.tmpl | 10 ++ templates/user/settings/grants_oauth2.tmpl | 40 +++++ templates/user/settings/hook_new.tmpl | 7 + templates/user/settings/hooks.tmpl | 5 + templates/user/settings/keys.tmpl | 11 ++ templates/user/settings/keys_gpg.tmpl | 129 ++++++++++++++ templates/user/settings/keys_principal.tmpl | 69 ++++++++ templates/user/settings/keys_ssh.tmpl | 111 ++++++++++++ templates/user/settings/layout_footer.tmpl | 11 ++ templates/user/settings/layout_head.tmpl | 13 ++ templates/user/settings/navbar.tmpl | 58 ++++++ templates/user/settings/organization.tmpl | 55 ++++++ templates/user/settings/packages.tmpl | 24 +++ .../user/settings/packages_cleanup_rules_edit.tmpl | 5 + .../settings/packages_cleanup_rules_preview.tmpl | 5 + templates/user/settings/profile.tmpl | 166 ++++++++++++++++++ templates/user/settings/repos.tmpl | 130 ++++++++++++++ templates/user/settings/runner_edit.tmpl | 5 + templates/user/settings/security/accountlinks.tmpl | 62 +++++++ templates/user/settings/security/openid.tmpl | 63 +++++++ templates/user/settings/security/security.tmpl | 11 ++ templates/user/settings/security/twofa.tmpl | 37 ++++ templates/user/settings/security/twofa_enroll.tmpl | 25 +++ templates/user/settings/security/webauthn.tmpl | 43 +++++ 72 files changed, 3535 insertions(+) create mode 100644 templates/user/auth/activate.tmpl create mode 100644 templates/user/auth/captcha.tmpl create mode 100644 templates/user/auth/change_passwd.tmpl create mode 100644 templates/user/auth/change_passwd_inner.tmpl create mode 100644 templates/user/auth/finalize_openid.tmpl create mode 100644 templates/user/auth/forgot_passwd.tmpl create mode 100644 templates/user/auth/grant.tmpl create mode 100644 templates/user/auth/grant_error.tmpl create mode 100644 templates/user/auth/link_account.tmpl create mode 100644 templates/user/auth/oauth_container.tmpl create mode 100644 templates/user/auth/oidc_wellknown.tmpl create mode 100644 templates/user/auth/prohibit_login.tmpl create mode 100644 templates/user/auth/reset_passwd.tmpl create mode 100644 templates/user/auth/signin.tmpl create mode 100644 templates/user/auth/signin_inner.tmpl create mode 100644 templates/user/auth/signin_openid.tmpl create mode 100644 templates/user/auth/signup.tmpl create mode 100644 templates/user/auth/signup_inner.tmpl create mode 100644 templates/user/auth/signup_openid_connect.tmpl create mode 100644 templates/user/auth/signup_openid_navbar.tmpl create mode 100644 templates/user/auth/signup_openid_register.tmpl create mode 100644 templates/user/auth/twofa.tmpl create mode 100644 templates/user/auth/twofa_scratch.tmpl create mode 100644 templates/user/auth/webauthn.tmpl create mode 100644 templates/user/auth/webauthn_error.tmpl create mode 100644 templates/user/code.tmpl create mode 100644 templates/user/dashboard/dashboard.tmpl create mode 100644 templates/user/dashboard/feeds.tmpl create mode 100644 templates/user/dashboard/issues.tmpl create mode 100644 templates/user/dashboard/milestones.tmpl create mode 100644 templates/user/dashboard/navbar.tmpl create mode 100644 templates/user/dashboard/repolist.tmpl create mode 100644 templates/user/heatmap.tmpl create mode 100644 templates/user/notification/notification.tmpl create mode 100644 templates/user/notification/notification_div.tmpl create mode 100644 templates/user/notification/notification_subscriptions.tmpl create mode 100644 templates/user/overview/header.tmpl create mode 100644 templates/user/overview/package_versions.tmpl create mode 100644 templates/user/overview/packages.tmpl create mode 100644 templates/user/profile.tmpl create mode 100644 templates/user/settings/account.tmpl create mode 100644 templates/user/settings/actions.tmpl create mode 100644 templates/user/settings/appearance.tmpl create mode 100644 templates/user/settings/applications.tmpl create mode 100644 templates/user/settings/applications_oauth2.tmpl create mode 100644 templates/user/settings/applications_oauth2_edit.tmpl create mode 100644 templates/user/settings/applications_oauth2_edit_form.tmpl create mode 100644 templates/user/settings/applications_oauth2_list.tmpl create mode 100644 templates/user/settings/blocked_users.tmpl create mode 100644 templates/user/settings/grants_oauth2.tmpl create mode 100644 templates/user/settings/hook_new.tmpl create mode 100644 templates/user/settings/hooks.tmpl create mode 100644 templates/user/settings/keys.tmpl create mode 100644 templates/user/settings/keys_gpg.tmpl create mode 100644 templates/user/settings/keys_principal.tmpl create mode 100644 templates/user/settings/keys_ssh.tmpl create mode 100644 templates/user/settings/layout_footer.tmpl create mode 100644 templates/user/settings/layout_head.tmpl create mode 100644 templates/user/settings/navbar.tmpl create mode 100644 templates/user/settings/organization.tmpl create mode 100644 templates/user/settings/packages.tmpl create mode 100644 templates/user/settings/packages_cleanup_rules_edit.tmpl create mode 100644 templates/user/settings/packages_cleanup_rules_preview.tmpl create mode 100644 templates/user/settings/profile.tmpl create mode 100644 templates/user/settings/repos.tmpl create mode 100644 templates/user/settings/runner_edit.tmpl create mode 100644 templates/user/settings/security/accountlinks.tmpl create mode 100644 templates/user/settings/security/openid.tmpl create mode 100644 templates/user/settings/security/security.tmpl create mode 100644 templates/user/settings/security/twofa.tmpl create mode 100644 templates/user/settings/security/twofa_enroll.tmpl create mode 100644 templates/user/settings/security/webauthn.tmpl (limited to 'templates/user') diff --git a/templates/user/auth/activate.tmpl b/templates/user/auth/activate.tmpl new file mode 100644 index 0000000..9ae811b --- /dev/null +++ b/templates/user/auth/activate.tmpl @@ -0,0 +1,61 @@ +{{template "base/head" .}} +
+
+
+
+ {{.CsrfTokenHtml}} +

+ {{ctx.Locale.Tr "auth.active_your_account"}} +

+
+ {{template "base/alert" .}} + {{if .IsActivatePage}} + {{if .ServiceNotEnabled}} +

{{ctx.Locale.Tr "auth.disable_register_mail"}}

+ {{else if .ResendLimited}} +

{{ctx.Locale.Tr "auth.resent_limit_prompt"}}

+ {{else}} +

{{ctx.Locale.Tr "auth.confirmation_mail_sent_prompt" .SignedUser.Email .ActiveCodeLives}}

+ {{end}} + {{else}} + {{if .NeedsPassword}} +
+ + +
+
+ +
+ + {{else if .IsSendRegisterMail}} +

{{ctx.Locale.Tr "auth.confirmation_mail_sent_prompt" .Email .ActiveCodeLives}}

+ {{else if .IsCodeInvalid}} +

{{ctx.Locale.Tr "auth.invalid_code"}}

+ {{else if .IsPasswordInvalid}} +

{{ctx.Locale.Tr "auth.invalid_password"}}

+ {{else if .ManualActivationOnly}} +

{{ctx.Locale.Tr "auth.manual_activation_only"}}

+ {{else}} +

{{ctx.Locale.Tr "auth.has_unconfirmed_mail" .SignedUser.Name .SignedUser.Email}}

+
+
+ {{ctx.Locale.Tr "auth.change_unconfirmed_email_summary"}} + +

{{ctx.Locale.Tr "auth.change_unconfirmed_email"}}

+
+ + +
+
+ +
+ +
+ {{end}} + {{end}} +
+
+
+
+
+{{template "base/footer" .}} diff --git a/templates/user/auth/captcha.tmpl b/templates/user/auth/captcha.tmpl new file mode 100644 index 0000000..03e3607 --- /dev/null +++ b/templates/user/auth/captcha.tmpl @@ -0,0 +1,30 @@ +{{if .EnableCaptcha}}{{if eq .CaptchaType "image"}} +
+ + +
+
+ + +
+{{else if eq .CaptchaType "recaptcha"}} +
+
+
+ +{{else if eq .CaptchaType "hcaptcha"}} +
+
+
+ +{{else if eq .CaptchaType "mcaptcha"}} +
+
+
+
+{{else if eq .CaptchaType "cfturnstile"}} +
+
+
+ +{{end}}{{end}} diff --git a/templates/user/auth/change_passwd.tmpl b/templates/user/auth/change_passwd.tmpl new file mode 100644 index 0000000..e05f46f --- /dev/null +++ b/templates/user/auth/change_passwd.tmpl @@ -0,0 +1,7 @@ +{{template "base/head" .}} +
+
+ {{template "user/auth/change_passwd_inner" .}} +
+
+{{template "base/footer" .}} diff --git a/templates/user/auth/change_passwd_inner.tmpl b/templates/user/auth/change_passwd_inner.tmpl new file mode 100644 index 0000000..601f036 --- /dev/null +++ b/templates/user/auth/change_passwd_inner.tmpl @@ -0,0 +1,22 @@ + {{if or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeSignIn)}} + {{template "base/alert" .}} + {{end}} +

+ {{ctx.Locale.Tr "settings.update_password"}} +

+
+
+ {{.CsrfTokenHtml}} +
+ + +
+
+ + +
+
+ +
+
+
diff --git a/templates/user/auth/finalize_openid.tmpl b/templates/user/auth/finalize_openid.tmpl new file mode 100644 index 0000000..f84f860 --- /dev/null +++ b/templates/user/auth/finalize_openid.tmpl @@ -0,0 +1,47 @@ +{{template "base/head" .}} + +{{template "base/footer" .}} diff --git a/templates/user/auth/forgot_passwd.tmpl b/templates/user/auth/forgot_passwd.tmpl new file mode 100644 index 0000000..55bcf63 --- /dev/null +++ b/templates/user/auth/forgot_passwd.tmpl @@ -0,0 +1,39 @@ +{{template "base/head" .}} +
+
+
+
+ {{.CsrfTokenHtml}} +

+ {{ctx.Locale.Tr "auth.forgot_password_title"}} +

+
+ {{template "base/alert" .}} + {{if .IsResetSent}} +

{{ctx.Locale.Tr "auth.reset_password_mail_sent_prompt" .Email .ResetPwdCodeLives}}

+ {{else if .IsResetRequest}} +
+ + +
+
+
+ +
+ {{else if .IsResetDisable}} +

+ {{if $.IsAdmin}} + {{ctx.Locale.Tr "auth.disable_forgot_password_mail_admin"}} + {{else}} + {{ctx.Locale.Tr "auth.disable_forgot_password_mail"}} + {{end}} +

+ {{else if .ResendLimited}} +

{{ctx.Locale.Tr "auth.resent_limit_prompt"}}

+ {{end}} +
+
+
+
+
+{{template "base/footer" .}} diff --git a/templates/user/auth/grant.tmpl b/templates/user/auth/grant.tmpl new file mode 100644 index 0000000..1a1b72b --- /dev/null +++ b/templates/user/auth/grant.tmpl @@ -0,0 +1,34 @@ +{{template "base/head" .}} +
+
+
+

+ {{ctx.Locale.Tr "auth.authorize_title" .Application.Name}} +

+
+ {{template "base/alert" .}} +

+ {{ctx.Locale.Tr "auth.authorize_application_description"}}
+ {{ctx.Locale.Tr "auth.authorize_application_created_by" .ApplicationCreatorLinkHTML}} +

+

With scopes: {{.Scope}}.

+
+
+

{{ctx.Locale.Tr "auth.authorize_redirect_notice" .ApplicationRedirectDomainHTML}}

+
+
+
+ {{.CsrfTokenHtml}} + + + + + + + +
+
+
+
+
+{{template "base/footer" .}} diff --git a/templates/user/auth/grant_error.tmpl b/templates/user/auth/grant_error.tmpl new file mode 100644 index 0000000..b2e0779 --- /dev/null +++ b/templates/user/auth/grant_error.tmpl @@ -0,0 +1,16 @@ +{{template "base/head" .}} +
+ {{if .IsRepo}}{{template "repo/header" .}}{{end}} +
+
+

+ {{ctx.Locale.Tr "auth.authorization_failed"}} +

+

{{.Error.ErrorDescription}}

+
+

{{ctx.Locale.Tr "auth.authorization_failed_desc"}}

+
+
+
+
+{{template "base/footer" .}} diff --git a/templates/user/auth/link_account.tmpl b/templates/user/auth/link_account.tmpl new file mode 100644 index 0000000..e8bb3d4 --- /dev/null +++ b/templates/user/auth/link_account.tmpl @@ -0,0 +1,34 @@ +{{template "base/head" .}} + + +{{template "base/footer" .}} diff --git a/templates/user/auth/oauth_container.tmpl b/templates/user/auth/oauth_container.tmpl new file mode 100644 index 0000000..bb6a10d --- /dev/null +++ b/templates/user/auth/oauth_container.tmpl @@ -0,0 +1,29 @@ +{{if or .OAuth2Providers .EnableOpenIDSignIn}} +
+ {{ctx.Locale.Tr "sign_in_or"}} +
+ +{{end}} diff --git a/templates/user/auth/oidc_wellknown.tmpl b/templates/user/auth/oidc_wellknown.tmpl new file mode 100644 index 0000000..54bb4a7 --- /dev/null +++ b/templates/user/auth/oidc_wellknown.tmpl @@ -0,0 +1,49 @@ +{ + "issuer": "{{AppUrl | JSEscape}}", + "authorization_endpoint": "{{AppUrl | JSEscape}}login/oauth/authorize", + "token_endpoint": "{{AppUrl | JSEscape}}login/oauth/access_token", + "jwks_uri": "{{AppUrl | JSEscape}}login/oauth/keys", + "userinfo_endpoint": "{{AppUrl | JSEscape}}login/oauth/userinfo", + "introspection_endpoint": "{{AppUrl | JSEscape}}login/oauth/introspect", + "response_types_supported": [ + "code", + "id_token" + ], + "id_token_signing_alg_values_supported": [ + "{{.SigningKey.SigningMethod.Alg | JSEscape}}" + ], + "subject_types_supported": [ + "public" + ], + "scopes_supported": [ + "openid", + "profile", + "email", + "groups" + ], + "claims_supported": [ + "aud", + "exp", + "iat", + "iss", + "sub", + "name", + "preferred_username", + "profile", + "picture", + "website", + "locale", + "updated_at", + "email", + "email_verified", + "groups" + ], + "code_challenge_methods_supported": [ + "plain", + "S256" + ], + "grant_types_supported": [ + "authorization_code", + "refresh_token" + ] +} diff --git a/templates/user/auth/prohibit_login.tmpl b/templates/user/auth/prohibit_login.tmpl new file mode 100644 index 0000000..962ddfa --- /dev/null +++ b/templates/user/auth/prohibit_login.tmpl @@ -0,0 +1,16 @@ +{{template "base/head" .}} +
+
+
+
+

+ {{ctx.Locale.Tr "auth.prohibit_login"}} +

+
+

{{ctx.Locale.Tr "auth.prohibit_login_desc"}}

+
+
+
+
+
+{{template "base/footer" .}} diff --git a/templates/user/auth/reset_passwd.tmpl b/templates/user/auth/reset_passwd.tmpl new file mode 100644 index 0000000..f8303fe --- /dev/null +++ b/templates/user/auth/reset_passwd.tmpl @@ -0,0 +1,65 @@ +{{template "base/head" .}} +
+
+
+
+ {{.CsrfTokenHtml}} + +

+ {{ctx.Locale.Tr "auth.reset_password"}} +

+
+ {{template "base/alert" .}} + {{if .user_email}} +
+ + +
+ {{end}} + {{if .IsResetForm}} +
+ + +
+ {{if not .user_signed_in}} +
+
+ + +
+
+ {{end}} + {{if .has_two_factor}} +

+ {{ctx.Locale.Tr "twofa"}} +

+
{{ctx.Locale.Tr "settings.twofa_is_enrolled"}}
+ {{if .scratch_code}} +
+ + +
+ + {{else}} +
+ + +
+ {{end}} + {{end}} +
+
+ + {{if and .has_two_factor (not .scratch_code)}} + {{ctx.Locale.Tr "auth.use_scratch_code"}} + {{end}} +
+ {{else}} +

{{ctx.Locale.Tr "auth.invalid_code_forgot_password" (printf "%s/user/forgot_password" AppSubUrl)}}

+ {{end}} +
+
+
+
+
+{{template "base/footer" .}} diff --git a/templates/user/auth/signin.tmpl b/templates/user/auth/signin.tmpl new file mode 100644 index 0000000..54cc82d --- /dev/null +++ b/templates/user/auth/signin.tmpl @@ -0,0 +1,9 @@ +{{template "base/head" .}} +
+
+
+ {{template "user/auth/signin_inner" .}} +
+
+
+{{template "base/footer" .}} diff --git a/templates/user/auth/signin_inner.tmpl b/templates/user/auth/signin_inner.tmpl new file mode 100644 index 0000000..56532f4 --- /dev/null +++ b/templates/user/auth/signin_inner.tmpl @@ -0,0 +1,65 @@ +
+ {{if or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeSignIn)}} + {{template "base/alert" .}} + {{end}} +

+ {{if .LinkAccountMode}} + {{ctx.Locale.Tr "auth.oauth_signin_title"}} + {{else}} + {{ctx.Locale.Tr "auth.login_userpass"}} + {{end}} +

+
+
+ {{.CsrfTokenHtml}} +
+ + +
+ {{if or (not .DisablePassword) .LinkAccountMode}} +
+ + +
+ {{end}} + {{if not .LinkAccountMode}} +
+
+ + +
+
+ {{end}} + + {{template "user/auth/captcha" .}} + +
+ +
+
+ + {{template "user/auth/oauth_container" .}} +
+
+ +
+ {{template "user/auth/webauthn_error" .}} + +
+ {{if .ShowRegistrationButton}} +
+ {{ctx.Locale.Tr "auth.hint_register" (printf "%s/user/sign_up" AppSubUrl)}} +
+
+ {{end}} + +
+
diff --git a/templates/user/auth/signin_openid.tmpl b/templates/user/auth/signin_openid.tmpl new file mode 100644 index 0000000..20c7bdc --- /dev/null +++ b/templates/user/auth/signin_openid.tmpl @@ -0,0 +1,51 @@ +{{template "base/head" .}} + +{{template "base/footer" .}} diff --git a/templates/user/auth/signup.tmpl b/templates/user/auth/signup.tmpl new file mode 100644 index 0000000..1ce3934 --- /dev/null +++ b/templates/user/auth/signup.tmpl @@ -0,0 +1,9 @@ +{{template "base/head" .}} +
+
+
+ {{template "user/auth/signup_inner" .}} +
+
+
+{{template "base/footer" .}} diff --git a/templates/user/auth/signup_inner.tmpl b/templates/user/auth/signup_inner.tmpl new file mode 100644 index 0000000..6c5ac67 --- /dev/null +++ b/templates/user/auth/signup_inner.tmpl @@ -0,0 +1,64 @@ +
+

+ {{if .LinkAccountMode}} + {{ctx.Locale.Tr "auth.oauth_signup_title"}} + {{else}} + {{ctx.Locale.Tr "sign_up"}} + {{end}} +

+
+
+ {{.CsrfTokenHtml}} + {{if or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister)}} + {{template "base/alert" .}} + {{end}} + {{if .DisableRegistration}} +

{{ctx.Locale.Tr "auth.disable_register_prompt"}}

+ {{else}} +
+ + +
+
+ + +
+ + {{if not .DisablePassword}} +
+ + +
+
+ + +
+ {{end}} + + {{template "user/auth/captcha" .}} + +
+ +
+ {{end}} + + {{template "user/auth/oauth_container" .}} +
+
+
+ +{{if not .LinkAccountMode}} +
+
+
+ {{ctx.Locale.Tr "auth.hint_login" (printf "%s/user/login" AppSubUrl)}} +
+
+
+{{end}} diff --git a/templates/user/auth/signup_openid_connect.tmpl b/templates/user/auth/signup_openid_connect.tmpl new file mode 100644 index 0000000..e4b7936 --- /dev/null +++ b/templates/user/auth/signup_openid_connect.tmpl @@ -0,0 +1,36 @@ +{{template "base/head" .}} + +{{template "base/footer" .}} diff --git a/templates/user/auth/signup_openid_navbar.tmpl b/templates/user/auth/signup_openid_navbar.tmpl new file mode 100644 index 0000000..89068dd --- /dev/null +++ b/templates/user/auth/signup_openid_navbar.tmpl @@ -0,0 +1,12 @@ + +
+ + {{ctx.Locale.Tr "auth.openid_connect_title"}} + + {{if and .EnableOpenIDSignUp (not .AllowOnlyInternalRegistration)}} + + {{ctx.Locale.Tr "auth.openid_register_title"}} + + {{end}} +
+
diff --git a/templates/user/auth/signup_openid_register.tmpl b/templates/user/auth/signup_openid_register.tmpl new file mode 100644 index 0000000..c017a0e --- /dev/null +++ b/templates/user/auth/signup_openid_register.tmpl @@ -0,0 +1,37 @@ +{{template "base/head" .}} + +{{template "base/footer" .}} diff --git a/templates/user/auth/twofa.tmpl b/templates/user/auth/twofa.tmpl new file mode 100644 index 0000000..d245239 --- /dev/null +++ b/templates/user/auth/twofa.tmpl @@ -0,0 +1,26 @@ +{{template "base/head" .}} + +{{template "base/footer" .}} diff --git a/templates/user/auth/twofa_scratch.tmpl b/templates/user/auth/twofa_scratch.tmpl new file mode 100644 index 0000000..23ad77f --- /dev/null +++ b/templates/user/auth/twofa_scratch.tmpl @@ -0,0 +1,25 @@ +{{template "base/head" .}} + +{{template "base/footer" .}} diff --git a/templates/user/auth/webauthn.tmpl b/templates/user/auth/webauthn.tmpl new file mode 100644 index 0000000..1b84765 --- /dev/null +++ b/templates/user/auth/webauthn.tmpl @@ -0,0 +1,25 @@ +{{template "base/head" .}} + +{{template "base/footer" .}} diff --git a/templates/user/auth/webauthn_error.tmpl b/templates/user/auth/webauthn_error.tmpl new file mode 100644 index 0000000..511ff7c --- /dev/null +++ b/templates/user/auth/webauthn_error.tmpl @@ -0,0 +1,13 @@ +
+
{{ctx.Locale.Tr "webauthn_error"}}
+
+
+
{{ctx.Locale.Tr "webauthn_unsupported_browser"}}
+
{{ctx.Locale.Tr "webauthn_error_unknown"}}
+
{{ctx.Locale.Tr "webauthn_error_insecure"}}
+
{{ctx.Locale.Tr "webauthn_error_unable_to_process"}}
+
{{ctx.Locale.Tr "webauthn_error_duplicated"}}
+
{{ctx.Locale.Tr "webauthn_error_empty"}}
+
{{ctx.Locale.Tr "webauthn_error_timeout"}}
+
+
diff --git a/templates/user/code.tmpl b/templates/user/code.tmpl new file mode 100644 index 0000000..ff6c69d --- /dev/null +++ b/templates/user/code.tmpl @@ -0,0 +1,24 @@ +{{template "base/head" .}} +{{if .ContextUser.IsOrganization}} +
+ {{template "org/header" .}} +
+ {{template "shared/search/code/search" .}} +
+
+{{else}} +
+
+
+
+ {{template "shared/user/profile_big_avatar" .}} +
+
+ {{template "user/overview/header" .}} + {{template "shared/search/code/search" .}} +
+
+
+
+{{end}} +{{template "base/footer" .}} diff --git a/templates/user/dashboard/dashboard.tmpl b/templates/user/dashboard/dashboard.tmpl new file mode 100644 index 0000000..5dc46dc --- /dev/null +++ b/templates/user/dashboard/dashboard.tmpl @@ -0,0 +1,13 @@ +{{template "base/head" .}} +
+ {{template "user/dashboard/navbar" .}} +
+
+ {{template "base/alert" .}} + {{template "user/heatmap" .}} + {{template "user/dashboard/feeds" .}} +
+ {{template "user/dashboard/repolist" .}} +
+
+{{template "base/footer" .}} diff --git a/templates/user/dashboard/feeds.tmpl b/templates/user/dashboard/feeds.tmpl new file mode 100644 index 0000000..60aa194 --- /dev/null +++ b/templates/user/dashboard/feeds.tmpl @@ -0,0 +1,127 @@ +
+ {{range .Feeds}} +
+
+ {{ctx.AvatarUtils.AvatarByAction .}} +
+
+
+ {{if gt .ActUser.ID 0}} + {{.GetActDisplayName ctx}} + {{else}} + {{.ShortActUserName ctx}} + {{end}} + {{if .GetOpType.InActions "create_repo"}} + {{ctx.Locale.Tr "action.create_repo" (.GetRepoLink ctx) (.ShortRepoPath ctx)}} + {{else if .GetOpType.InActions "rename_repo"}} + {{ctx.Locale.Tr "action.rename_repo" .GetContent (.GetRepoLink ctx) (.ShortRepoPath ctx)}} + {{else if .GetOpType.InActions "commit_repo"}} + {{if .Content}} + {{ctx.Locale.Tr "action.commit_repo" (.GetRepoLink ctx) (.GetRefLink ctx) .GetBranch (.ShortRepoPath ctx)}} + {{else}} + {{ctx.Locale.Tr "action.create_branch" (.GetRepoLink ctx) (.GetRefLink ctx) .GetBranch (.ShortRepoPath ctx)}} + {{end}} + {{else if .GetOpType.InActions "create_issue"}} + {{$index := index .GetIssueInfos 0}} + {{ctx.Locale.Tr "action.create_issue" (printf "%s/issues/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx)}} + {{else if .GetOpType.InActions "create_pull_request"}} + {{$index := index .GetIssueInfos 0}} + {{ctx.Locale.Tr "action.create_pull_request" (printf "%s/pulls/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx)}} + {{else if .GetOpType.InActions "transfer_repo"}} + {{ctx.Locale.Tr "action.transfer_repo" .GetContent (.GetRepoLink ctx) (.ShortRepoPath ctx)}} + {{else if .GetOpType.InActions "push_tag"}} + {{ctx.Locale.Tr "action.push_tag" (.GetRepoLink ctx) (.GetRefLink ctx) .GetTag (.ShortRepoPath ctx)}} + {{else if .GetOpType.InActions "comment_issue"}} + {{$index := index .GetIssueInfos 0}} + {{ctx.Locale.Tr "action.comment_issue" (printf "%s/issues/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx)}} + {{else if .GetOpType.InActions "merge_pull_request"}} + {{$index := index .GetIssueInfos 0}} + {{ctx.Locale.Tr "action.merge_pull_request" (printf "%s/pulls/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx)}} + {{else if .GetOpType.InActions "close_issue"}} + {{$index := index .GetIssueInfos 0}} + {{ctx.Locale.Tr "action.close_issue" (printf "%s/issues/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx)}} + {{else if .GetOpType.InActions "reopen_issue"}} + {{$index := index .GetIssueInfos 0}} + {{ctx.Locale.Tr "action.reopen_issue" (printf "%s/issues/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx)}} + {{else if .GetOpType.InActions "close_pull_request"}} + {{$index := index .GetIssueInfos 0}} + {{ctx.Locale.Tr "action.close_pull_request" (printf "%s/pulls/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx)}} + {{else if .GetOpType.InActions "reopen_pull_request"}} + {{$index := index .GetIssueInfos 0}} + {{ctx.Locale.Tr "action.reopen_pull_request" (printf "%s/pulls/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx)}} + {{else if .GetOpType.InActions "delete_tag"}} + {{$index := index .GetIssueInfos 0}} + {{ctx.Locale.Tr "action.delete_tag" (.GetRepoLink ctx) .GetTag (.ShortRepoPath ctx)}} + {{else if .GetOpType.InActions "delete_branch"}} + {{$index := index .GetIssueInfos 0}} + {{ctx.Locale.Tr "action.delete_branch" (.GetRepoLink ctx) .GetBranch (.ShortRepoPath ctx)}} + {{else if .GetOpType.InActions "mirror_sync_push"}} + {{ctx.Locale.Tr "action.mirror_sync_push" (.GetRepoLink ctx) (.GetRefLink ctx) .GetBranch (.ShortRepoPath ctx)}} + {{else if .GetOpType.InActions "mirror_sync_create"}} + {{ctx.Locale.Tr "action.mirror_sync_create" (.GetRepoLink ctx) (.GetRefLink ctx) .GetBranch (.ShortRepoPath ctx)}} + {{else if .GetOpType.InActions "mirror_sync_delete"}} + {{ctx.Locale.Tr "action.mirror_sync_delete" (.GetRepoLink ctx) .GetBranch (.ShortRepoPath ctx)}} + {{else if .GetOpType.InActions "approve_pull_request"}} + {{$index := index .GetIssueInfos 0}} + {{ctx.Locale.Tr "action.approve_pull_request" (printf "%s/pulls/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx)}} + {{else if .GetOpType.InActions "reject_pull_request"}} + {{$index := index .GetIssueInfos 0}} + {{ctx.Locale.Tr "action.reject_pull_request" (printf "%s/pulls/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx)}} + {{else if .GetOpType.InActions "comment_pull"}} + {{$index := index .GetIssueInfos 0}} + {{ctx.Locale.Tr "action.comment_pull" (printf "%s/pulls/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx)}} + {{else if .GetOpType.InActions "publish_release"}} + {{$linkText := .Content | RenderEmoji $.Context}} + {{ctx.Locale.Tr "action.publish_release" (.GetRepoLink ctx) (printf "%s/releases/tag/%s" (.GetRepoLink ctx) .GetTag) (.ShortRepoPath ctx) $linkText}} + {{else if .GetOpType.InActions "review_dismissed"}} + {{$index := index .GetIssueInfos 0}} + {{$reviewer := index .GetIssueInfos 1}} + {{ctx.Locale.Tr "action.review_dismissed" (printf "%s/pulls/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx) $reviewer}} + {{end}} + {{TimeSince .GetCreate ctx.Locale}} +
+ {{if .GetOpType.InActions "commit_repo" "mirror_sync_push"}} + {{$push := ActionContent2Commits .}} + {{$repoLink := (.GetRepoLink ctx)}} + {{$repo := .Repo}} +
+ {{range $push.Commits}} + {{$commitLink := printf "%s/commit/%s" $repoLink .Sha1}} +
+ + {{ShortSha .Sha1}} + + {{RenderCommitMessage $.Context .Message ($repo.ComposeMetas ctx)}} + +
+ {{end}} +
+ {{if and (gt $push.Len 1) $push.CompareURL}} + {{ctx.Locale.Tr "action.compare_commits" $push.Len}} ยป + {{end}} + {{else if .GetOpType.InActions "create_issue"}} + {{index .GetIssueInfos 1 | RenderEmoji $.Context | RenderCodeBlock}} + {{else if .GetOpType.InActions "create_pull_request"}} + {{index .GetIssueInfos 1 | RenderEmoji $.Context | RenderCodeBlock}} + {{else if .GetOpType.InActions "comment_issue" "approve_pull_request" "reject_pull_request" "comment_pull"}} + {{(.GetIssueTitle ctx) | RenderEmoji $.Context | RenderCodeBlock}} + {{$comment := index .GetIssueInfos 1}} + {{if $comment}} +
{{RenderMarkdownToHtml ctx $comment}}
+ {{end}} + {{else if .GetOpType.InActions "merge_pull_request"}} +
{{index .GetIssueInfos 1}}
+ {{else if .GetOpType.InActions "close_issue" "reopen_issue" "close_pull_request" "reopen_pull_request"}} + {{(.GetIssueTitle ctx) | RenderEmoji $.Context | RenderCodeBlock}} + {{else if .GetOpType.InActions "pull_review_dismissed"}} +
{{ctx.Locale.Tr "action.review_dismissed_reason"}}
+
{{index .GetIssueInfos 2 | RenderEmoji $.Context}}
+ {{end}} +
+
+ {{svg (printf "octicon-%s" (ActionIcon .GetOpType)) 32 "text grey tw-mr-1"}} +
+
+ {{end}} + {{template "base/paginate" .}} +
diff --git a/templates/user/dashboard/issues.tmpl b/templates/user/dashboard/issues.tmpl new file mode 100644 index 0000000..09d282b --- /dev/null +++ b/templates/user/dashboard/issues.tmpl @@ -0,0 +1,91 @@ +{{template "base/head" .}} +
+ {{template "user/dashboard/navbar" .}} +
+ {{template "base/alert" .}} +
+ + + +
+ {{template "shared/issuelist" dict "." . "listType" "dashboard"}} +
+
+{{template "base/footer" .}} diff --git a/templates/user/dashboard/milestones.tmpl b/templates/user/dashboard/milestones.tmpl new file mode 100644 index 0000000..fe8e246 --- /dev/null +++ b/templates/user/dashboard/milestones.tmpl @@ -0,0 +1,155 @@ +{{template "base/head" .}} +
+ {{template "user/dashboard/navbar" .}} +
+
+
+ +
+
+ +
+ {{range .Milestones}} +
  • +
    +

    + + {{.Repo.FullName}} + + {{svg "octicon-milestone" 16}} + {{.Name}} +

    +
    + {{.Completeness}}% + +
    +
    +
    +
    +
    + {{svg "octicon-issue-opened" 14}} + {{ctx.Locale.PrettyNumber .NumOpenIssues}} {{ctx.Locale.Tr "repo.issues.open_title"}} +
    +
    + {{svg "octicon-check" 14}} + {{ctx.Locale.PrettyNumber .NumClosedIssues}} {{ctx.Locale.Tr "repo.issues.closed_title"}} +
    + {{if .TotalTrackedTime}} +
    + {{svg "octicon-clock"}} + {{.TotalTrackedTime|Sec2Time}} +
    + {{end}} + {{if .UpdatedUnix}} +
    + {{svg "octicon-clock"}} + {{ctx.Locale.Tr "repo.milestones.update_ago" (TimeSinceUnix .UpdatedUnix ctx.Locale)}} +
    + {{end}} +
    + {{if .IsClosed}} + {{$closedDate:= TimeSinceUnix .ClosedDateUnix ctx.Locale}} + {{svg "octicon-clock" 14}} + {{ctx.Locale.Tr "repo.milestones.closed" $closedDate}} + {{else}} + {{if .DeadlineString}} + + {{svg "octicon-calendar" 14}} + {{DateTime "short" .DeadlineString}} + + {{else}} + {{svg "octicon-calendar" 14}} + {{ctx.Locale.Tr "repo.milestones.no_due_date"}} + {{end}} + {{end}} +
    +
    + {{if and (or $.CanWriteIssues $.CanWritePulls) (not $.Repository.IsArchived)}} + + {{end}} +
    + {{if .Content}} +
    + {{.RenderedContent}} +
    + {{end}} +
  • + {{end}} + + {{template "base/paginate" .}} +
    + +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/templates/user/dashboard/navbar.tmpl b/templates/user/dashboard/navbar.tmpl new file mode 100644 index 0000000..1fa356f --- /dev/null +++ b/templates/user/dashboard/navbar.tmpl @@ -0,0 +1,102 @@ +
    + +
    diff --git a/templates/user/dashboard/repolist.tmpl b/templates/user/dashboard/repolist.tmpl new file mode 100644 index 0000000..2781f71 --- /dev/null +++ b/templates/user/dashboard/repolist.tmpl @@ -0,0 +1,55 @@ + + +
    diff --git a/templates/user/heatmap.tmpl b/templates/user/heatmap.tmpl new file mode 100644 index 0000000..05403e3 --- /dev/null +++ b/templates/user/heatmap.tmpl @@ -0,0 +1,13 @@ +{{if .HeatmapData}} +
    +
    +{{end}} diff --git a/templates/user/notification/notification.tmpl b/templates/user/notification/notification.tmpl new file mode 100644 index 0000000..b483c15 --- /dev/null +++ b/templates/user/notification/notification.tmpl @@ -0,0 +1,3 @@ +{{template "base/head" .}} +{{template "user/notification/notification_div" .}} +{{template "base/footer" .}} diff --git a/templates/user/notification/notification_div.tmpl b/templates/user/notification/notification_div.tmpl new file mode 100644 index 0000000..5c27ba8 --- /dev/null +++ b/templates/user/notification/notification_div.tmpl @@ -0,0 +1,130 @@ +
    +
    + {{$notificationUnreadCount := call .NotificationUnreadCount}} +
    + +
    + + {{ctx.Locale.Tr "notification.subscriptions"}} + + {{if and (eq .Status 1)}} +
    + {{$.CsrfTokenHtml}} +
    + +
    +
    + {{end}} +
    +
    +
    +
    + {{if not .Notifications}} +
    + {{svg "octicon-inbox" 56 "tw-mb-4"}} + {{if eq .Status 1}} + {{ctx.Locale.Tr "notification.no_unread"}} + {{else}} + {{ctx.Locale.Tr "notification.no_read"}} + {{end}} +
    + {{else}} + {{range $notification := .Notifications}} +
    +
    + {{if .Issue}} + {{template "shared/issueicon" .Issue}} + {{else}} + {{svg "octicon-repo" 16 "text grey"}} + {{end}} +
    + +
    + {{.Repository.FullName}} {{if .Issue}}#{{.Issue.Index}}{{end}} + {{if eq .Status 3}} + {{svg "octicon-pin" 13 "text blue tw-mt-0.5 tw-ml-1"}} + {{end}} +
    +
    + + {{if .Issue}} + {{RenderRefIssueTitle $.Context .Issue.Title}} + {{else}} + {{.Repository.FullName}} + {{end}} + +
    +
    +
    + {{if .Issue}} + {{TimeSinceUnix .Issue.UpdatedUnix ctx.Locale}} + {{else}} + {{TimeSinceUnix .UpdatedUnix ctx.Locale}} + {{end}} +
    +
    + {{if ne .Status 3}} +
    + {{$.CsrfTokenHtml}} + + + +
    + {{end}} + {{if or (eq .Status 1) (eq .Status 3)}} +
    + {{$.CsrfTokenHtml}} + + + + +
    + {{else if eq .Status 2}} +
    + {{$.CsrfTokenHtml}} + + + + +
    + {{end}} +
    +
    + {{end}} + {{end}} +
    +
    + {{template "base/paginate" .}} +
    +
    diff --git a/templates/user/notification/notification_subscriptions.tmpl b/templates/user/notification/notification_subscriptions.tmpl new file mode 100644 index 0000000..0a3ae99 --- /dev/null +++ b/templates/user/notification/notification_subscriptions.tmpl @@ -0,0 +1,84 @@ +{{template "base/head" .}} +
    +
    + +
    + {{if eq .Status 1}} + +
    + {{if not .Issues}} + {{ctx.Locale.Tr "notification.no_subscriptions"}} + {{else}} + {{template "shared/issuelist" dict "." . "listType" "dashboard"}} + {{end}} + {{else}} + {{template "shared/repo_search" .}} + {{template "explore/repo_list" .}} + {{template "base/paginate" .}} + {{end}} +
    +
    +
    +{{template "base/footer" .}} diff --git a/templates/user/overview/header.tmpl b/templates/user/overview/header.tmpl new file mode 100644 index 0000000..ea5d805 --- /dev/null +++ b/templates/user/overview/header.tmpl @@ -0,0 +1,58 @@ + +
    + {{if and .HasProfileReadme .ContextUser.IsIndividual}} + + {{svg "octicon-info"}} {{ctx.Locale.Tr "user.overview"}} + + {{end}} + + {{svg "octicon-repo"}} {{ctx.Locale.Tr "user.repositories"}} + {{if .RepoCount}} +
    {{.RepoCount}}
    + {{end}} + +
    + {{if or .ContextUser.IsIndividual .CanReadProjects}} + + {{svg "octicon-project-symlink"}} {{ctx.Locale.Tr "user.projects"}} + {{if .ProjectCount}} +
    {{.ProjectCount}}
    + {{end}} + +
    + {{end}} + {{if and .IsPackageEnabled (or .ContextUser.IsIndividual .CanReadPackages)}} + + {{svg "octicon-package"}} {{ctx.Locale.Tr "packages.title"}} + {{if .PackageCount}} +
    {{.PackageCount}}
    + {{end}} + +
    + {{end}} + {{if and .IsRepoIndexerEnabled (or .ContextUser.IsIndividual .CanReadCode)}} + + {{svg "octicon-code"}} {{ctx.Locale.Tr "user.code"}} + + {{end}} + {{if .ContextUser.IsIndividual}} + {{if or (eq .TabName "activity") .IsAdmin (eq .SignedUserID .ContextUser.ID) (not .ContextUser.KeepActivityPrivate)}} + + {{svg "octicon-rss"}} {{ctx.Locale.Tr "user.activity"}} + + {{end}} + {{if not .DisableStars}} + + {{svg "octicon-star"}} {{ctx.Locale.Tr "user.starred"}} + {{if .ContextUser.NumStars}} +
    {{.ContextUser.NumStars}}
    + {{end}} +
    + {{else}} + + {{svg "octicon-eye"}} {{ctx.Locale.Tr "user.watched"}} + + {{end}} + {{end}} +
    +
    diff --git a/templates/user/overview/package_versions.tmpl b/templates/user/overview/package_versions.tmpl new file mode 100644 index 0000000..0ac2db0 --- /dev/null +++ b/templates/user/overview/package_versions.tmpl @@ -0,0 +1,24 @@ +{{template "base/head" .}} +{{if .ContextUser.IsOrganization}} +
    + {{template "org/header" .}} +
    + {{template "package/shared/versionlist" .}} +
    +
    +{{else}} +
    +
    +
    +
    + {{template "shared/user/profile_big_avatar" .}} +
    +
    + {{template "user/overview/header" .}} + {{template "package/shared/versionlist" .}} +
    +
    +
    +
    +{{end}} +{{template "base/footer" .}} diff --git a/templates/user/overview/packages.tmpl b/templates/user/overview/packages.tmpl new file mode 100644 index 0000000..bb2238b --- /dev/null +++ b/templates/user/overview/packages.tmpl @@ -0,0 +1,24 @@ +{{template "base/head" .}} +{{if .ContextUser.IsOrganization}} +
    + {{template "org/header" .}} +
    + {{template "package/shared/list" .}} +
    +
    +{{else}} +
    +
    +
    +
    + {{template "shared/user/profile_big_avatar" .}} +
    +
    + {{template "user/overview/header" .}} + {{template "package/shared/list" .}} +
    +
    +
    +
    +{{end}} +{{template "base/footer" .}} diff --git a/templates/user/profile.tmpl b/templates/user/profile.tmpl new file mode 100644 index 0000000..477b838 --- /dev/null +++ b/templates/user/profile.tmpl @@ -0,0 +1,76 @@ +{{template "base/head" .}} +
    +
    + {{template "base/alert" .}} +
    +
    + {{template "shared/user/profile_big_avatar" .}} +
    +
    + {{template "user/overview/header" .}} + {{if eq .TabName "activity"}} + {{if eq .SignedUserID .ContextUser.ID}} +

    + {{if .ContextUser.KeepActivityPrivate}} + {{ctx.Locale.Tr "user.public_activity.visibility_hint.self_private" "/user/settings#keep-activity-private"}} + {{else}} + {{ctx.Locale.Tr "user.public_activity.visibility_hint.self_public" "/user/settings#keep-activity-private"}} + {{end}} +

    + {{else}} + {{if .IsAdmin}} +
    + {{if .ContextUser.KeepActivityPrivate}} + {{ctx.Locale.Tr "user.public_activity.visibility_hint.admin_private"}} + {{else}} + {{ctx.Locale.Tr "user.public_activity.visibility_hint.admin_public"}} + {{end}} +
    + {{else}} + {{if .ContextUser.KeepActivityPrivate}} +

    {{ctx.Locale.Tr "user.disabled_public_activity"}}

    + {{end}} + {{end}} + {{end}} + {{if or .IsAdmin (eq .SignedUserID .ContextUser.ID) (not .ContextUser.KeepActivityPrivate)}} + {{template "user/heatmap" .}} + {{template "user/dashboard/feeds" .}} + {{end}} + {{else if eq .TabName "stars"}} +
    + {{template "shared/repo_search" .}} + {{template "explore/repo_list" .}} + {{template "base/paginate" .}} +
    + {{else if eq .TabName "following"}} + {{template "repo/user_cards" .}} + {{else if eq .TabName "followers"}} + {{template "repo/user_cards" .}} + {{else if eq .TabName "overview"}} +
    {{.ProfileReadme}}
    + {{else}} + {{template "shared/repo_search" .}} + {{template "explore/repo_list" .}} + {{template "base/paginate" .}} + {{end}} +
    +
    +
    +
    + + + +{{template "base/footer" .}} diff --git a/templates/user/settings/account.tmpl b/templates/user/settings/account.tmpl new file mode 100644 index 0000000..a97136f --- /dev/null +++ b/templates/user/settings/account.tmpl @@ -0,0 +1,180 @@ +{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings account")}} +
    +

    + {{ctx.Locale.Tr "settings.change_password"}} +

    +
    + {{if or (.SignedUser.IsLocal) (.SignedUser.IsOAuth2)}} +
    + {{template "base/disable_form_autofill"}} + {{.CsrfTokenHtml}} + {{if .SignedUser.IsPasswordSet}} +
    + + +
    + {{end}} +
    + + +
    +
    + + +
    + +
    + + {{ctx.Locale.Tr "auth.forgot_password"}} +
    +
    + {{else}} +
    +

    {{ctx.Locale.Tr "settings.password_change_disabled"}}

    +
    + {{end}} +
    + +

    + {{ctx.Locale.Tr "settings.manage_emails"}} +

    +
    +
    + {{if $.EnableNotifyMail}} +
    +
    {{ctx.Locale.Tr "settings.email_desc"}}
    +
    + {{$.CsrfTokenHtml}} + +
    + + +
    +
    +
    + {{end}} + {{range .Emails}} +
    + {{if not .IsPrimary}} +
    + +
    + {{if .CanBePrimary}} +
    +
    + {{$.CsrfTokenHtml}} + + + +
    +
    + {{end}} + {{end}} + {{if not .IsActivated}} +
    +
    + {{$.CsrfTokenHtml}} + + + {{if $.ActivationsPending}} + + {{else}} + + {{end}} +
    +
    + {{end}} +
    + {{.Email}} + {{if .IsPrimary}} +
    {{ctx.Locale.Tr "settings.primary"}}
    + {{end}} + {{if .IsActivated}} +
    {{ctx.Locale.Tr "settings.activated"}}
    + {{else}} +
    {{ctx.Locale.Tr "settings.requires_activation"}}
    + {{end}} +
    +
    + {{end}} +
    +
    +
    +
    + {{.CsrfTokenHtml}} +
    + + +
    + +
    + {{/* if ActivationsPending is false, then CanAddEmails must be true, so if CanAddEmails is false, ActivationsPending must be true */}} + {{if not .CanAddEmails}} +
    {{ctx.Locale.Tr "settings.can_not_add_email_activations_pending"}}
    + {{end}} +
    + + {{if not ($.UserDisabledFeatures.Contains "deletion")}} +

    + {{ctx.Locale.Tr "settings.delete_account"}} +

    +
    +
    +

    {{svg "octicon-alert"}} {{ctx.Locale.Tr "settings.delete_prompt"}}

    + {{if .UserDeleteWithComments}} +

    {{ctx.Locale.Tr "settings.delete_with_all_comments" .UserDeleteWithCommentsMaxTime}}

    + {{end}} +
    +
    + {{template "base/disable_form_autofill"}} + {{.CsrfTokenHtml}} +
    + + +
    +
    + +
    +
    + +
    + {{end}} +
    + + + +{{template "user/settings/layout_footer" .}} diff --git a/templates/user/settings/actions.tmpl b/templates/user/settings/actions.tmpl new file mode 100644 index 0000000..abc5443 --- /dev/null +++ b/templates/user/settings/actions.tmpl @@ -0,0 +1,12 @@ +{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings actions")}} +
    + {{if eq .PageType "secrets"}} + {{template "shared/secrets/add_list" .}} + {{else if eq .PageType "runners"}} + {{template "shared/actions/runner_list" .}} + {{else if eq .PageType "variables"}} + {{template "shared/variables/variable_list" .}} + {{end}} +
    + +{{template "user/settings/layout_footer" .}} diff --git a/templates/user/settings/appearance.tmpl b/templates/user/settings/appearance.tmpl new file mode 100644 index 0000000..2aaf24a --- /dev/null +++ b/templates/user/settings/appearance.tmpl @@ -0,0 +1,195 @@ +{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings sshkeys")}} +
    + + +

    + {{ctx.Locale.Tr "settings.manage_themes"}} +

    +
    + +
    + + +

    + {{ctx.Locale.Tr "settings.language.title"}} +

    +
    +
    +
    + {{ctx.Locale.Tr "settings.language.description"}} +
    + {{.CsrfTokenHtml}} +
    + +
    +
    + {{ctx.Locale.Tr "settings.language.localization_project" "https://forgejo.org/docs/next/contributor/localization/"}} +
    +
    + +
    +
    +
    + + +

    + {{ctx.Locale.Tr "settings.hints"}} +

    +
    +
    + {{.CsrfTokenHtml}} +
    +
    + + +
    +
    +
    + +
    +
    +
    + + +

    + {{ctx.Locale.Tr "settings.hidden_comment_types"}} +

    +
    +

    + {{ctx.Locale.Tr "settings.hidden_comment_types_description"}} +

    +
    + {{.CsrfTokenHtml}} +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    + +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    + +
    +
    +
    +
    +{{template "user/settings/layout_footer" .}} diff --git a/templates/user/settings/applications.tmpl b/templates/user/settings/applications.tmpl new file mode 100644 index 0000000..04d4dcd --- /dev/null +++ b/templates/user/settings/applications.tmpl @@ -0,0 +1,113 @@ +{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings applications")}} +
    +

    + {{ctx.Locale.Tr "settings.manage_access_token"}} +

    +
    +
    +
    + {{ctx.Locale.Tr "settings.tokens_desc"}} +
    + {{range .Tokens}} +
    +
    + + {{svg "fontawesome-send" 32}} + +
    +
    +
    + {{.Name}} +

    + {{ctx.Locale.Tr "settings.repo_and_org_access"}}: + {{if .DisplayPublicOnly}} + {{ctx.Locale.Tr "settings.permissions_public_only"}} + {{else}} + {{ctx.Locale.Tr "settings.permissions_access_all"}} + {{end}} +

    +

    {{ctx.Locale.Tr "settings.permissions_list"}}

    +
      + {{range .Scope.StringSlice}} + {{if (ne . $.AccessTokenScopePublicOnly)}} +
    • {{.}}
    • + {{end}} + {{end}} +
    +
    +
    +

    {{ctx.Locale.Tr "settings.added_on" (DateTime "short" .CreatedUnix)}} โ€” {{svg "octicon-info"}} {{if .HasUsed}}{{ctx.Locale.Tr "settings.last_used"}} {{DateTime "short" .UpdatedUnix}}{{else}}{{ctx.Locale.Tr "settings.no_activity"}}{{end}}

    +
    +
    +
    + +
    +
    + {{end}} +
    +
    +
    +
    + {{ctx.Locale.Tr "settings.generate_new_token"}} +
    +
    + {{.CsrfTokenHtml}} +
    + + +
    +
    + + + +
    +
    + + {{ctx.Locale.Tr "settings.select_permissions"}} + +

    +

    {{ctx.Locale.Tr "settings.access_token_desc" (HTMLFormat `href="%s/api/swagger" target="_blank"` AppSubUrl) (`href="https://forgejo.org/docs/latest/user/token-scope/" target="_blank"`|SafeHTML)}}

    +

    +
    +
    + +
    {{/* Fomantic ".ui.form .warning.message" is hidden by default, so put the warning message out of the form*/}} +
    + {{ctx.Locale.Tr "settings.at_least_one_permission"}} +
    +
    + + {{if .EnableOAuth2}} + {{template "user/settings/grants_oauth2" .}} + {{template "user/settings/applications_oauth2" .}} + {{end}} +
    + + + +{{template "user/settings/layout_footer" .}} diff --git a/templates/user/settings/applications_oauth2.tmpl b/templates/user/settings/applications_oauth2.tmpl new file mode 100644 index 0000000..866a1f8 --- /dev/null +++ b/templates/user/settings/applications_oauth2.tmpl @@ -0,0 +1,6 @@ +

    + {{ctx.Locale.Tr "settings.manage_oauth2_applications"}} +

    + +{{template "user/settings/applications_oauth2_list" .}} + diff --git a/templates/user/settings/applications_oauth2_edit.tmpl b/templates/user/settings/applications_oauth2_edit.tmpl new file mode 100644 index 0000000..2858ecd --- /dev/null +++ b/templates/user/settings/applications_oauth2_edit.tmpl @@ -0,0 +1,6 @@ +{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings applications")}} +
    + + {{template "user/settings/applications_oauth2_edit_form" .}} +
    +{{template "user/settings/layout_footer" .}} diff --git a/templates/user/settings/applications_oauth2_edit_form.tmpl b/templates/user/settings/applications_oauth2_edit_form.tmpl new file mode 100644 index 0000000..199d43a --- /dev/null +++ b/templates/user/settings/applications_oauth2_edit_form.tmpl @@ -0,0 +1,54 @@ +

    + {{ctx.Locale.Tr "settings.edit_oauth2_application"}} +

    +
    +

    {{ctx.Locale.Tr "settings.oauth2_application_create_description"}}

    +
    +
    + {{.CsrfTokenHtml}} +
    + + +
    + {{if .ClientSecret}} +
    + + +
    + {{else}} +
    + + +
    + {{end}} +
    + +
    + {{.CsrfTokenHtml}} + {{ctx.Locale.Tr "settings.oauth2_regenerate_secret_hint"}} + +
    +
    +
    +
    +
    + {{.CsrfTokenHtml}} +
    + + +
    +
    + + +
    +
    +
    + + +
    +
    + +
    +
    diff --git a/templates/user/settings/applications_oauth2_list.tmpl b/templates/user/settings/applications_oauth2_list.tmpl new file mode 100644 index 0000000..74cdac4 --- /dev/null +++ b/templates/user/settings/applications_oauth2_list.tmpl @@ -0,0 +1,74 @@ +
    +
    +
    + {{ctx.Locale.Tr "settings.oauth2_application_create_description"}} +
    + {{range .Applications}} +
    +
    + {{svg "octicon-apps" 32}} +
    +
    +
    {{.Name}}
    +
    + {{ctx.Locale.Tr "settings.oauth2_client_id"}} + {{.ClientID}} +
    +
    + {{$isBuiltin := and $.BuiltinApplications (index $.BuiltinApplications .ClientID)}} +
    + {{if $isBuiltin}} + {{ctx.Locale.Tr "locked"}} + {{else}} + + {{svg "octicon-pencil" 16 "tw-mr-1"}} + {{ctx.Locale.Tr "settings.oauth2_application_edit"}} + + + {{end}} +
    +
    + {{end}} +
    + + +
    + +
    +
    + {{ctx.Locale.Tr "settings.create_oauth2_application"}} +
    +
    + {{.CsrfTokenHtml}} +
    + + +
    +
    + + +
    +
    +
    + + +
    +
    + +
    +
    diff --git a/templates/user/settings/blocked_users.tmpl b/templates/user/settings/blocked_users.tmpl new file mode 100644 index 0000000..5256503 --- /dev/null +++ b/templates/user/settings/blocked_users.tmpl @@ -0,0 +1,10 @@ +{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings blocked-users")}} +
    +

    + {{ctx.Locale.Tr "settings.blocked_users"}} +

    +
    + {{template "shared/blocked_users_list" .}} +
    +
    +{{template "user/settings/layout_footer" .}} diff --git a/templates/user/settings/grants_oauth2.tmpl b/templates/user/settings/grants_oauth2.tmpl new file mode 100644 index 0000000..e89d275 --- /dev/null +++ b/templates/user/settings/grants_oauth2.tmpl @@ -0,0 +1,40 @@ +

    + {{ctx.Locale.Tr "settings.authorized_oauth2_applications"}} +

    +
    +
    +
    + {{ctx.Locale.Tr "settings.authorized_oauth2_applications_description"}} +
    + {{range .Grants}} +
    +
    + {{svg "octicon-key" 32}} +
    +
    +
    {{.Application.Name}}
    +
    +

    {{ctx.Locale.Tr "settings.added_on" (DateTime "short" .CreatedUnix)}}

    +
    +
    +
    + +
    +
    + {{end}} +
    + + +
    diff --git a/templates/user/settings/hook_new.tmpl b/templates/user/settings/hook_new.tmpl new file mode 100644 index 0000000..be21f59 --- /dev/null +++ b/templates/user/settings/hook_new.tmpl @@ -0,0 +1,7 @@ +{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings new webhook")}} +
    + {{$CustomHeaderTitle := ctx.Locale.Tr "repo.settings.update_webhook"}} + {{if .PageIsSettingsHooksNew}}{{$CustomHeaderTitle = ctx.Locale.Tr "repo.settings.add_webhook"}}{{end}} + {{template "webhook/new" (dict "ctxData" . "CustomHeaderTitle" $CustomHeaderTitle)}} +
    +{{template "user/settings/layout_footer" .}} diff --git a/templates/user/settings/hooks.tmpl b/templates/user/settings/hooks.tmpl new file mode 100644 index 0000000..477c333 --- /dev/null +++ b/templates/user/settings/hooks.tmpl @@ -0,0 +1,5 @@ +{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings webhooks")}} +
    + {{template "repo/settings/webhook/list" .}} +
    +{{template "user/settings/layout_footer" .}} diff --git a/templates/user/settings/keys.tmpl b/templates/user/settings/keys.tmpl new file mode 100644 index 0000000..e0f5e42 --- /dev/null +++ b/templates/user/settings/keys.tmpl @@ -0,0 +1,11 @@ +{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings sshkeys")}} +
    + {{if not ($.UserDisabledFeatures.Contains "manage_ssh_keys")}} + {{template "user/settings/keys_ssh" .}} + {{end}} + {{template "user/settings/keys_principal" .}} + {{if not ($.UserDisabledFeatures.Contains "manage_gpg_keys")}} + {{template "user/settings/keys_gpg" .}} + {{end}} +
    +{{template "user/settings/layout_footer" .}} diff --git a/templates/user/settings/keys_gpg.tmpl b/templates/user/settings/keys_gpg.tmpl new file mode 100644 index 0000000..f5e91ce --- /dev/null +++ b/templates/user/settings/keys_gpg.tmpl @@ -0,0 +1,129 @@ +

    + {{ctx.Locale.Tr "settings.manage_gpg_keys"}} +
    + +
    +

    +
    +
    +
    + {{.CsrfTokenHtml}} + +
    + + +
    + {{if .Err_Signature}} +
    +

    {{ctx.Locale.Tr "settings.gpg_token_required"}}

    +
    +
    + + +
    +

    {{ctx.Locale.Tr "settings.gpg_token_help"}}

    +

    {{printf `echo "%s" | gpg -a --default-key %s --detach-sig` .TokenToSign .PaddedKeyID}}

    +
    +
    +
    + + +
    + {{end}} + + + +
    +
    +
    +
    +

    + {{ctx.Locale.Tr "settings.gpg_desc"}}
    + {{ctx.Locale.Tr "settings.gpg_helper" "https://docs.codeberg.org/security/gpg-key/"}} +

    +
    + {{range .GPGKeys}} +
    +
    + {{svg "octicon-key" 32}} +
    +
    + {{if .Verified}} + {{svg "octicon-verified"}} {{ctx.Locale.Tr "settings.gpg_key_verified"}} + {{end}} + {{if .Emails}} + {{svg "octicon-mail"}} {{ctx.Locale.Tr "settings.gpg_key_matched_identities"}} {{range .Emails}}{{.Email}} {{end}} + {{end}} +
    + {{ctx.Locale.Tr "settings.key_id"}}: {{.PaddedKeyID}} + {{ctx.Locale.Tr "settings.subkeys"}}: {{range .SubsKey}} {{.PaddedKeyID}} {{end}} +
    +
    +

    + {{ctx.Locale.Tr "settings.added_on" (DateTime "short" .AddedUnix)}} + - + {{if not .ExpiredUnix.IsZero}} + {{ctx.Locale.Tr "settings.valid_until_date" (DateTime "short" .ExpiredUnix)}} + {{else}} + {{ctx.Locale.Tr "settings.valid_forever"}} + {{end}} +

    +
    +
    +
    + + {{if and (not .Verified) (ne $.VerifyingID .KeyID)}} + {{ctx.Locale.Tr "settings.gpg_key_verify"}} + {{end}} +
    +
    + {{if and (not .Verified) (eq $.VerifyingID .KeyID)}} +
    +

    {{ctx.Locale.Tr "settings.gpg_token_required"}}

    +
    + {{$.CsrfTokenHtml}} + + + +
    + + +
    +

    {{ctx.Locale.Tr "settings.gpg_token_help"}}

    +

    {{printf `echo "%s" | gpg -a --default-key %s --detach-sig` $.TokenToSign .PaddedKeyID}}

    +
    +
    +
    +
    + + +
    + + + + {{ctx.Locale.Tr "settings.cancel"}} + +
    +
    + {{end}} + {{end}} +
    + +
    diff --git a/templates/user/settings/keys_principal.tmpl b/templates/user/settings/keys_principal.tmpl new file mode 100644 index 0000000..94b1b2c --- /dev/null +++ b/templates/user/settings/keys_principal.tmpl @@ -0,0 +1,69 @@ +{{if .AllowPrincipals}} +

    + {{ctx.Locale.Tr "settings.manage_ssh_principals"}} +
    + {{if not .DisableSSH}} + + {{else}} + + {{end}} +
    +

    +
    +
    +
    + {{ctx.Locale.Tr "settings.principal_desc"}} +
    + {{range .Principals}} +
    +
    + {{svg "octicon-key" 32}} +
    +
    +
    {{.Name}}
    +
    +

    {{ctx.Locale.Tr "settings.added_on" (DateTime "short" .CreatedUnix)}} โ€” {{svg "octicon-info" 16}} {{if .HasUsed}}{{ctx.Locale.Tr "settings.last_used"}} {{DateTime "short" .UpdatedUnix}}{{else}}{{ctx.Locale.Tr "settings.no_activity"}}{{end}}

    +
    +
    +
    + +
    +
    + {{end}} +
    +
    +
    + +
    +

    + {{ctx.Locale.Tr "settings.add_new_principal"}} +

    +
    +
    + {{.CsrfTokenHtml}} +
    + + +
    + + + +
    +
    +
    + + +{{end}} diff --git a/templates/user/settings/keys_ssh.tmpl b/templates/user/settings/keys_ssh.tmpl new file mode 100644 index 0000000..058dc9c --- /dev/null +++ b/templates/user/settings/keys_ssh.tmpl @@ -0,0 +1,111 @@ +

    + {{ctx.Locale.Tr "settings.manage_ssh_keys"}} +
    + +
    +

    +
    +
    +
    + {{.CsrfTokenHtml}} +
    + + +
    +
    + + +
    + + + +
    +
    +
    +
    +

    + {{ctx.Locale.Tr "settings.ssh_desc"}}
    + {{ctx.Locale.Tr "settings.ssh_helper" "https://docs.codeberg.org/security/ssh-key/" "https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/troubleshooting-ssh"}} +

    +
    + {{if .DisableSSH}} +
    + {{ctx.Locale.Tr "settings.ssh_signonly"}} +
    + {{end}} + {{range $index, $key := .Keys}} +
    +
    + {{svg "octicon-key" 32}} +
    +
    + {{if .Verified}} +
    {{svg "octicon-verified"}}{{ctx.Locale.Tr "settings.ssh_key_verified"}}
    + {{end}} +
    {{.Name}}
    +
    + {{.Fingerprint}} +
    +
    +

    {{ctx.Locale.Tr "settings.added_on" (DateTime "short" .CreatedUnix)}} โ€” {{svg "octicon-info"}} {{if .HasUsed}}{{ctx.Locale.Tr "settings.last_used"}} {{DateTime "short" .UpdatedUnix}}{{else}}{{ctx.Locale.Tr "settings.no_activity"}}{{end}}

    +
    +
    +
    + + {{if and (not .Verified) (ne $.VerifyingFingerprint .Fingerprint)}} + {{ctx.Locale.Tr "settings.ssh_key_verify"}} + {{end}} +
    +
    + {{if and (not .Verified) (eq $.VerifyingFingerprint .Fingerprint)}} +
    +

    {{ctx.Locale.Tr "settings.ssh_token_required"}}

    +
    + {{$.CsrfTokenHtml}} + + + +
    + + +
    +

    {{ctx.Locale.Tr "settings.ssh_token_help"}}

    +

    {{printf "echo -n '%s' | ssh-keygen -Y sign -n gitea -f /path_to_PrivateKey_or_RelatedPublicKey" $.TokenToSign}}

    +
    +
    +
    +
    + + +
    + + + + {{ctx.Locale.Tr "settings.cancel"}} + +
    +
    + {{end}} + {{end}} +
    + +
    diff --git a/templates/user/settings/layout_footer.tmpl b/templates/user/settings/layout_footer.tmpl new file mode 100644 index 0000000..46120d5 --- /dev/null +++ b/templates/user/settings/layout_footer.tmpl @@ -0,0 +1,11 @@ +{{if false}}{{/* to make html structure "likely" complete to prevent IDE warnings */}} +
    +
    +
    + {{/* block: user-setting-content */}} +{{end}} + +
    +
    +
    +{{template "base/footer" .}} diff --git a/templates/user/settings/layout_head.tmpl b/templates/user/settings/layout_head.tmpl new file mode 100644 index 0000000..dce496e --- /dev/null +++ b/templates/user/settings/layout_head.tmpl @@ -0,0 +1,13 @@ +{{template "base/head" .ctxData}} +
    +
    + {{template "user/settings/navbar" .ctxData}} +
    + {{template "base/alert" .ctxData}} + {{/* block: user-setting-content */}} + +{{if false}}{{/* to make html structure "likely" complete to prevent IDE warnings */}} +
    +
    +
    +{{end}} diff --git a/templates/user/settings/navbar.tmpl b/templates/user/settings/navbar.tmpl new file mode 100644 index 0000000..d45d89e --- /dev/null +++ b/templates/user/settings/navbar.tmpl @@ -0,0 +1,58 @@ + diff --git a/templates/user/settings/organization.tmpl b/templates/user/settings/organization.tmpl new file mode 100644 index 0000000..16c27b5 --- /dev/null +++ b/templates/user/settings/organization.tmpl @@ -0,0 +1,55 @@ +{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings organization")}} +
    +

    + {{ctx.Locale.Tr "settings.orgs"}} + {{if .SignedUser.CanCreateOrganization}} + + {{end}} +

    +
    + {{if .Orgs}} +
    + {{range .Orgs}} +
    +
    + {{ctx.AvatarUtils.Avatar . 28 "mini"}} +
    +
    +
    {{template "shared/user/name" .}}
    +
    + {{.Description}} +
    +
    +
    +
    + {{$.CsrfTokenHtml}} + +
    +
    +
    + {{end}} +
    + {{template "base/paginate" .}} + {{else}} + {{ctx.Locale.Tr "settings.orgs_none"}} + {{end}} +
    +
    + + + +{{template "user/settings/layout_footer" .}} diff --git a/templates/user/settings/packages.tmpl b/templates/user/settings/packages.tmpl new file mode 100644 index 0000000..bd7d69b --- /dev/null +++ b/templates/user/settings/packages.tmpl @@ -0,0 +1,24 @@ +{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings packages")}} +
    + {{template "package/shared/cleanup_rules/list" .}} + {{template "package/shared/cargo" .}} + +

    + {{ctx.Locale.Tr "packages.owner.settings.chef.title"}} +

    +
    +
    +
    + +
    +
    + {{.CsrfTokenHtml}} + +
    +
    + +
    +
    +
    +
    +{{template "user/settings/layout_footer" .}} diff --git a/templates/user/settings/packages_cleanup_rules_edit.tmpl b/templates/user/settings/packages_cleanup_rules_edit.tmpl new file mode 100644 index 0000000..522b524 --- /dev/null +++ b/templates/user/settings/packages_cleanup_rules_edit.tmpl @@ -0,0 +1,5 @@ +{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings packages")}} +
    + {{template "package/shared/cleanup_rules/edit" .}} +
    +{{template "user/settings/layout_footer" .}} diff --git a/templates/user/settings/packages_cleanup_rules_preview.tmpl b/templates/user/settings/packages_cleanup_rules_preview.tmpl new file mode 100644 index 0000000..d99aee4 --- /dev/null +++ b/templates/user/settings/packages_cleanup_rules_preview.tmpl @@ -0,0 +1,5 @@ +{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user packages admin")}} +
    + {{template "package/shared/cleanup_rules/preview" .}} +
    +{{template "user/settings/layout_footer" .}} diff --git a/templates/user/settings/profile.tmpl b/templates/user/settings/profile.tmpl new file mode 100644 index 0000000..a092a42 --- /dev/null +++ b/templates/user/settings/profile.tmpl @@ -0,0 +1,166 @@ +{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings profile")}} +
    +

    + {{ctx.Locale.Tr "settings.public_profile"}} +

    +
    +

    {{ctx.Locale.Tr "settings.profile_desc"}}

    +
    + {{.CsrfTokenHtml}} +
    + + + {{if or (not .SignedUser.IsLocal) .IsReverseProxy}} +

    {{ctx.Locale.Tr "settings.password_username_disabled"}}

    + {{end}} +
    +
    + + +
    +
    + + + +
    +
    + +

    {{.SignedUser.Email}}

    +
    +
    + + +
    +
    + + +
    +
    + + +
    + +
    + + +
    + +
    + +
    + + +
    + +
    +
    + + +
    + {{ctx.Locale.Tr "settings.keep_email_private_popup" .SignedUser.GetPlaceholderEmail}} +
    + +
    +
    + + +
    + {{ctx.Locale.Tr "settings.keep_activity_private.description" (printf "/%s?tab=activity" .SignedUser.Name)}} +
    + +
    + +
    + +
    +
    +
    + +

    + {{ctx.Locale.Tr "settings.avatar"}} +

    +
    +
    + {{.CsrfTokenHtml}} + {{if not .DisableGravatar}} +
    +
    + + +
    +
    +
    + + +
    + {{end}} + +
    +
    + + +
    +
    + +
    + + +
    + +
    + + +
    +
    +
    +
    +{{template "user/settings/layout_footer" .}} diff --git a/templates/user/settings/repos.tmpl b/templates/user/settings/repos.tmpl new file mode 100644 index 0000000..09b00f0 --- /dev/null +++ b/templates/user/settings/repos.tmpl @@ -0,0 +1,130 @@ +{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings repos")}} +
    +

    + {{ctx.Locale.Tr "settings.repos"}} +

    +
    + {{if or .allowAdopt .allowDelete}} + {{if .Dirs}} +
    + {{range $dirI, $dir := .Dirs}} + {{$repo := index $.ReposMap $dir}} +
    {{/* if not repo, then there are "adapt" buttons, so the padding shouldn't be that default large*/}} +
    + {{if $repo}} + {{if $repo.IsPrivate}} + {{svg "octicon-lock"}} + {{else if $repo.IsFork}} + {{svg "octicon-repo-forked"}} + {{else if $repo.IsMirror}} + {{svg "octicon-mirror"}} + {{else if $repo.IsTemplate}} + {{svg "octicon-repo-template"}} + {{else}} + {{svg "octicon-repo"}} + {{end}} + {{$repo.OwnerName}}/{{$repo.Name}} + {{ctx.Locale.TrSize $repo.Size}} + {{if $repo.IsFork}} + {{ctx.Locale.Tr "repo.forked_from"}} + {{$repo.BaseRepo.OwnerName}}/{{$repo.BaseRepo.Name}} + {{end}} + {{else}} + {{svg "octicon-file-directory-fill"}} + {{$.ContextUser.Name}}/{{$dir}} +
    + {{if $.allowAdopt}} + + + {{end}} + {{if $.allowDelete}} + + + {{end}} +
    + {{end}} +
    +
    + {{end}} +
    + {{template "base/paginate" .}} + {{else}} +
    + {{ctx.Locale.Tr "settings.repos_none"}} +
    + {{end}} + {{else}} + {{if .Repos}} +
    + {{range .Repos}} +
    +
    + {{if .IsPrivate}} + {{svg "octicon-lock" 16 "tw-mr-1 iconFloat text gold"}} + {{else if .IsFork}} + {{svg "octicon-repo-forked" 16 "tw-mr-1 iconFloat"}} + {{else if .IsMirror}} + {{svg "octicon-mirror" 16 "tw-mr-1 iconFloat"}} + {{else if .IsTemplate}} + {{svg "octicon-repo-template" 16 "tw-mr-1 iconFloat"}} + {{else}} + {{svg "octicon-repo" 16 "tw-mr-1 iconFloat"}} + {{end}} + {{.OwnerName}}/{{.Name}} + {{ctx.Locale.TrSize .Size}} + {{if .IsFork}} + {{ctx.Locale.Tr "repo.forked_from"}} + {{.BaseRepo.OwnerName}}/{{.BaseRepo.Name}} + {{end}} +
    +
    + {{end}} +
    + {{template "base/paginate" .}} + {{else}} +
    + {{ctx.Locale.Tr "settings.repos_none"}} +
    + {{end}} + {{end}} +
    +
    + + + +{{template "user/settings/layout_footer" .}} diff --git a/templates/user/settings/runner_edit.tmpl b/templates/user/settings/runner_edit.tmpl new file mode 100644 index 0000000..90c58c1 --- /dev/null +++ b/templates/user/settings/runner_edit.tmpl @@ -0,0 +1,5 @@ +{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings runners")}} +
    + {{template "shared/actions/runner_edit" .}} +
    +{{template "user/settings/layout_footer" .}} diff --git a/templates/user/settings/security/accountlinks.tmpl b/templates/user/settings/security/accountlinks.tmpl new file mode 100644 index 0000000..0820844 --- /dev/null +++ b/templates/user/settings/security/accountlinks.tmpl @@ -0,0 +1,62 @@ +{{/* No account links, no way to add account links: Menu will not be shown. */}} +{{if or .AccountLinks .OrderedOAuth2Names}} +

    + {{ctx.Locale.Tr "settings.manage_account_links"}} + {{if .OrderedOAuth2Names}} +
    + +
    + {{end}} +

    + +
    +
    +
    + {{ctx.Locale.Tr "settings.manage_account_links_desc"}} +
    + {{range $loginSource, $provider := .AccountLinks}} +
    + {{$providerData := index $.OAuth2Providers $loginSource.Name}} +
    + {{$providerData.IconHTML 20}} +
    +
    + + {{$loginSource.Name}} + + {{if $loginSource.IsActive}} + {{ctx.Locale.Tr "repo.settings.active"}} + {{end}} +
    +
    + +
    +
    + {{end}} +
    + + +
    +{{end}} diff --git a/templates/user/settings/security/openid.tmpl b/templates/user/settings/security/openid.tmpl new file mode 100644 index 0000000..b0473c9 --- /dev/null +++ b/templates/user/settings/security/openid.tmpl @@ -0,0 +1,63 @@ +

    + {{ctx.Locale.Tr "settings.manage_openid"}} +

    +
    +
    +
    + {{ctx.Locale.Tr "settings.openid_desc"}} +
    + {{range .OpenIDs}} +
    +
    + {{svg "fontawesome-openid" 20}} +
    +
    +
    {{.URI}}
    +
    +
    +
    + {{$.CsrfTokenHtml}} + + {{if .Show}} + + {{else}} + + {{end}} +
    + +
    +
    + {{end}} +
    +
    +
    +
    + {{.CsrfTokenHtml}} +
    + + +
    + +
    + + +
    diff --git a/templates/user/settings/security/security.tmpl b/templates/user/settings/security/security.tmpl new file mode 100644 index 0000000..aee0456 --- /dev/null +++ b/templates/user/settings/security/security.tmpl @@ -0,0 +1,11 @@ +{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings security")}} +
    + {{template "user/settings/security/twofa" .}} + {{template "user/settings/security/webauthn" .}} + {{template "user/settings/security/accountlinks" .}} + {{if .EnableOpenIDSignIn}} + {{template "user/settings/security/openid" .}} + {{end}} +
    + +{{template "user/settings/layout_footer" .}} diff --git a/templates/user/settings/security/twofa.tmpl b/templates/user/settings/security/twofa.tmpl new file mode 100644 index 0000000..adebce4 --- /dev/null +++ b/templates/user/settings/security/twofa.tmpl @@ -0,0 +1,37 @@ +

    + {{ctx.Locale.Tr "settings.twofa"}} +

    +
    +

    {{ctx.Locale.Tr "settings.twofa_desc"}}

    + {{if .TOTPEnrolled}} +

    {{ctx.Locale.Tr "settings.twofa_is_enrolled"}}

    +
    + {{.CsrfTokenHtml}} +

    {{ctx.Locale.Tr "settings.regenerate_scratch_token_desc"}}

    + +
    +
    + {{.CsrfTokenHtml}} +

    {{ctx.Locale.Tr "settings.twofa_disable_note"}}

    + +
    + {{else}} + {{/* The recovery tip is there as a means of encouraging a user to enroll */}} +

    {{ctx.Locale.Tr "settings.twofa_recovery_tip"}}

    +

    {{ctx.Locale.Tr "settings.twofa_not_enrolled"}}

    + + {{end}} + + +
    diff --git a/templates/user/settings/security/twofa_enroll.tmpl b/templates/user/settings/security/twofa_enroll.tmpl new file mode 100644 index 0000000..d6bfadf --- /dev/null +++ b/templates/user/settings/security/twofa_enroll.tmpl @@ -0,0 +1,25 @@ +{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings twofa")}} +
    +

    + {{ctx.Locale.Tr "settings.twofa_enroll"}} +

    +
    +

    {{ctx.Locale.Tr "settings.scan_this_image"}}

    + {{.TwofaSecret}} +

    {{ctx.Locale.Tr "settings.or_enter_secret" .TwofaSecret}}

    +

    {{ctx.Locale.Tr "settings.then_enter_passcode"}}

    +
    + {{.CsrfTokenHtml}} +
    + + +
    +
    + + +
    +
    +
    +
    + +{{template "user/settings/layout_footer" .}} diff --git a/templates/user/settings/security/webauthn.tmpl b/templates/user/settings/security/webauthn.tmpl new file mode 100644 index 0000000..346f61c --- /dev/null +++ b/templates/user/settings/security/webauthn.tmpl @@ -0,0 +1,43 @@ +

    {{ctx.Locale.Tr "settings.webauthn"}}

    +
    +

    {{ctx.Locale.Tr "settings.webauthn_desc" "https://w3c.github.io/webauthn/#webauthn-authenticator"}}

    +

    {{ctx.Locale.Tr "settings.webauthn_key_loss_warning"}} {{ctx.Locale.Tr "settings.webauthn_alternative_tip"}}

    + {{template "user/auth/webauthn_error" .}} +
    + {{range .WebAuthnCredentials}} +
    +
    + {{svg "octicon-key" 32}} +
    +
    +
    {{.Name}}
    +
    +

    {{ctx.Locale.Tr "settings.added_on" (DateTime "short" .CreatedUnix)}}

    +
    +
    +
    + +
    +
    + {{end}} +
    +
    +
    + + +
    + +
    + +
    -- cgit v1.2.3