1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-26 20:28:40 +00:00

:Merge branch 'main' of github.com:go-gitea/gitea into api-repo-actions

This commit is contained in:
chesterip
2024-04-03 21:34:21 -04:00
8 changed files with 16 additions and 2 deletions

View File

@@ -2315,6 +2315,8 @@ LEVEL = Info
;SHOW_FOOTER_VERSION = true ;SHOW_FOOTER_VERSION = true
;; Show template execution time in the footer ;; Show template execution time in the footer
;SHOW_FOOTER_TEMPLATE_LOAD_TIME = true ;SHOW_FOOTER_TEMPLATE_LOAD_TIME = true
;; Show the "powered by" text in the footer
;SHOW_FOOTER_POWERED_BY = true
;; Generate sitemap. Defaults to `true`. ;; Generate sitemap. Defaults to `true`.
;ENABLE_SITEMAP = true ;ENABLE_SITEMAP = true
;; Enable/Disable RSS/Atom feed ;; Enable/Disable RSS/Atom feed

View File

@@ -1429,5 +1429,6 @@ Like `uses: https://gitea.com/actions/checkout@v4` or `uses: http://your-git-ser
- `SHOW_FOOTER_VERSION`: **true**: Show Gitea and Go version information in the footer. - `SHOW_FOOTER_VERSION`: **true**: Show Gitea and Go version information in the footer.
- `SHOW_FOOTER_TEMPLATE_LOAD_TIME`: **true**: Show time of template execution in the footer. - `SHOW_FOOTER_TEMPLATE_LOAD_TIME`: **true**: Show time of template execution in the footer.
- `SHOW_FOOTER_POWERED_BY`: **true**: Show the "powered by" text in the footer.
- `ENABLE_SITEMAP`: **true**: Generate sitemap. - `ENABLE_SITEMAP`: **true**: Generate sitemap.
- `ENABLE_FEED`: **true**: Enable/Disable RSS/Atom feed. - `ENABLE_FEED`: **true**: Enable/Disable RSS/Atom feed.

View File

@@ -1353,5 +1353,6 @@ PROXY_HOSTS = *.github.com
- `SHOW_FOOTER_VERSION`: **true**: 在页面底部显示Gitea的版本。 - `SHOW_FOOTER_VERSION`: **true**: 在页面底部显示Gitea的版本。
- `SHOW_FOOTER_TEMPLATE_LOAD_TIME`: **true**: 在页脚显示模板执行的时间。 - `SHOW_FOOTER_TEMPLATE_LOAD_TIME`: **true**: 在页脚显示模板执行的时间。
- `SHOW_FOOTER_POWERED_BY`: **true**: 在页脚显示“由...提供动力”的文本。
- `ENABLE_SITEMAP`: **true**: 生成sitemap. - `ENABLE_SITEMAP`: **true**: 生成sitemap.
- `ENABLE_FEED`: **true**: 是否启用RSS/Atom - `ENABLE_FEED`: **true**: 是否启用RSS/Atom

View File

@@ -304,7 +304,8 @@ services:
- GITEA__mailer__ENABLED=true - GITEA__mailer__ENABLED=true
- GITEA__mailer__FROM=${GITEA__mailer__FROM:?GITEA__mailer__FROM not set} - GITEA__mailer__FROM=${GITEA__mailer__FROM:?GITEA__mailer__FROM not set}
- GITEA__mailer__PROTOCOL=smtps - GITEA__mailer__PROTOCOL=smtps
- GITEA__mailer__HOST=${GITEA__mailer__HOST:?GITEA__mailer__HOST not set} - GITEA__mailer__SMTP_ADDR=${GITEA__mailer__SMTP_ADDR:?GITEA__mailer__SMTP_ADDR not set}
- GITEA__mailer__SMTP_PORT=${GITEA__mailer__SMTP_PORT:?GITEA__mailer__SMTP_PORT not set}
- GITEA__mailer__USER=${GITEA__mailer__USER:-apikey} - GITEA__mailer__USER=${GITEA__mailer__USER:-apikey}
- GITEA__mailer__PASSWD="""${GITEA__mailer__PASSWD:?GITEA__mailer__PASSWD not set}""" - GITEA__mailer__PASSWD="""${GITEA__mailer__PASSWD:?GITEA__mailer__PASSWD not set}"""
``` ```

View File

@@ -8,6 +8,7 @@ import "code.gitea.io/gitea/modules/log"
type OtherConfig struct { type OtherConfig struct {
ShowFooterVersion bool ShowFooterVersion bool
ShowFooterTemplateLoadTime bool ShowFooterTemplateLoadTime bool
ShowFooterPoweredBy bool
EnableFeed bool EnableFeed bool
EnableSitemap bool EnableSitemap bool
} }
@@ -15,6 +16,7 @@ type OtherConfig struct {
var Other = OtherConfig{ var Other = OtherConfig{
ShowFooterVersion: true, ShowFooterVersion: true,
ShowFooterTemplateLoadTime: true, ShowFooterTemplateLoadTime: true,
ShowFooterPoweredBy: true,
EnableSitemap: true, EnableSitemap: true,
EnableFeed: true, EnableFeed: true,
} }

View File

@@ -106,6 +106,9 @@ func NewFuncMap() template.FuncMap {
"ShowFooterTemplateLoadTime": func() bool { "ShowFooterTemplateLoadTime": func() bool {
return setting.Other.ShowFooterTemplateLoadTime return setting.Other.ShowFooterTemplateLoadTime
}, },
"ShowFooterPoweredBy": func() bool {
return setting.Other.ShowFooterPoweredBy
},
"AllowedReactions": func() []string { "AllowedReactions": func() []string {
return setting.UI.Reactions return setting.UI.Reactions
}, },

View File

@@ -1233,6 +1233,8 @@ file_view_rendered=Ver resultado processado
file_view_raw=Ver em bruto file_view_raw=Ver em bruto
file_permalink=Ligação permanente file_permalink=Ligação permanente
file_too_large=O ficheiro é demasiado grande para ser apresentado. file_too_large=O ficheiro é demasiado grande para ser apresentado.
code_preview_line_from_to=Linhas %[1]d até %[2]d em %[3]s
code_preview_line_in=Linha %[1]d em %[2]s
invisible_runes_header=`Este ficheiro contém caracteres Unicode invisíveis` invisible_runes_header=`Este ficheiro contém caracteres Unicode invisíveis`
invisible_runes_description=`Este ficheiro contém caracteres Unicode indistinguíveis para humanos mas que podem ser processados de forma diferente por um computador. Se acha que é intencional, pode ignorar este aviso com segurança. Use o botão Revelar para os mostrar.` invisible_runes_description=`Este ficheiro contém caracteres Unicode indistinguíveis para humanos mas que podem ser processados de forma diferente por um computador. Se acha que é intencional, pode ignorar este aviso com segurança. Use o botão Revelar para os mostrar.`
ambiguous_runes_header=`Este ficheiro contém caracteres Unicode ambíguos` ambiguous_runes_header=`Este ficheiro contém caracteres Unicode ambíguos`

View File

@@ -1,6 +1,8 @@
<footer class="page-footer" role="group" aria-label="{{ctx.Locale.Tr "aria.footer"}}"> <footer class="page-footer" role="group" aria-label="{{ctx.Locale.Tr "aria.footer"}}">
<div class="left-links" role="contentinfo" aria-label="{{ctx.Locale.Tr "aria.footer.software"}}"> <div class="left-links" role="contentinfo" aria-label="{{ctx.Locale.Tr "aria.footer.software"}}">
<a target="_blank" rel="noopener noreferrer" href="https://about.gitea.com">{{ctx.Locale.Tr "powered_by" "Gitea"}}</a> {{if ShowFooterPoweredBy}}
<a target="_blank" rel="noopener noreferrer" href="https://about.gitea.com">{{ctx.Locale.Tr "powered_by" "Gitea"}}</a>
{{end}}
{{if (or .ShowFooterVersion .PageIsAdmin)}} {{if (or .ShowFooterVersion .PageIsAdmin)}}
{{ctx.Locale.Tr "version"}}: {{ctx.Locale.Tr "version"}}:
{{if .IsAdmin}} {{if .IsAdmin}}