Skip to content

Commit ffc35fb

Browse files
committed
Merge remote-tracking branch 'go-gitea/main' into split-index-js
2 parents bfaf13c + e18ea9e commit ffc35fb

File tree

10 files changed

+135
-57
lines changed

10 files changed

+135
-57
lines changed

docs/content/doc/usage/reverse-proxies.en-us.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,15 @@ server {
4343
listen 80;
4444
server_name git.example.com;
4545
46-
location /git/ { # Note: Trailing slash
47-
proxy_pass http://localhost:3000/; # Note: Trailing slash
46+
# Note: Trailing slash
47+
location /git/ {
48+
# Note: Trailing slash
49+
proxy_pass http://localhost:3000/;
4850
}
4951
}
5052
```
5153

52-
Then set `[server] ROOT_URL = http://git.example.com/git/` in your configuration.
54+
Then you **MUST** set something like `[server] ROOT_URL = http://git.example.com/git/` correctly in your configuration.
5355

5456
## Nginx and serve static resources directly
5557

@@ -139,11 +141,10 @@ If you want Apache HTTPD to serve your Gitea instance, you can add the following
139141
ProxyRequests off
140142
AllowEncodedSlashes NoDecode
141143
ProxyPass / http://localhost:3000/ nocanon
142-
ProxyPassReverse / http://localhost:3000/
143144
</VirtualHost>
144145
```
145146

146-
Note: The following Apache HTTPD mods must be enabled: `proxy`, `proxy_http`
147+
Note: The following Apache HTTPD mods must be enabled: `proxy`, `proxy_http`.
147148

148149
If you wish to use Let's Encrypt with webroot validation, add the line `ProxyPass /.well-known !` before `ProxyPass` to disable proxying these requests to Gitea.
149150

@@ -161,13 +162,12 @@ In case you already have a site, and you want Gitea to share the domain name, yo
161162
AllowEncodedSlashes NoDecode
162163
# Note: no trailing slash after either /git or port
163164
ProxyPass /git http://localhost:3000 nocanon
164-
ProxyPassReverse /git http://localhost:3000
165165
</VirtualHost>
166166
```
167167

168-
Then set `[server] ROOT_URL = http://git.example.com/git/` in your configuration.
168+
Then you **MUST** set something like `[server] ROOT_URL = http://git.example.com/git/` correctly in your configuration.
169169

170-
Note: The following Apache HTTPD mods must be enabled: `proxy`, `proxy_http`
170+
Note: The following Apache HTTPD mods must be enabled: `proxy`, `proxy_http`.
171171

172172
## Caddy
173173

docs/content/doc/usage/reverse-proxies.zh-cn.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,15 @@ server {
3737
listen 80;
3838
server_name git.example.com;
3939
40-
location /git/ { # Note: Trailing slash
41-
proxy_pass http://localhost:3000/; # Note: Trailing slash
40+
# 注意: /git/ 最后需要有一个路径符号
41+
location /git/ {
42+
# 注意: 反向代理后端 URL 的最后需要有一个路径符号
43+
proxy_pass http://localhost:3000/;
4244
}
4345
}
4446
```
4547

46-
然后在您的 Gitea 配置文件中添加 `[server] ROOT_URL = http://git.example.com/git/`
48+
然后您**必须** Gitea 的配置文件中正确的添加类似 `[server] ROOT_URL = http://git.example.com/git/` 的配置项
4749

4850
## 使用 Apache HTTPD 作为反向代理服务
4951

@@ -56,7 +58,6 @@ server {
5658
ProxyRequests off
5759
AllowEncodedSlashes NoDecode
5860
ProxyPass / http://localhost:3000/ nocanon
59-
ProxyPassReverse / http://localhost:3000/
6061
</VirtualHost>
6162
```
6263

@@ -74,13 +75,12 @@ server {
7475
Allow from all
7576
</Proxy>
7677
AllowEncodedSlashes NoDecode
77-
# Note: no trailing slash after either /git or port
78+
# 注意: 路径和 URL 后面都不要写路径符号 '/'
7879
ProxyPass /git http://localhost:3000 nocanon
79-
ProxyPassReverse /git http://localhost:3000
8080
</VirtualHost>
8181
```
8282

83-
然后在您的 Gitea 配置文件中添加 `[server] ROOT_URL = http://git.example.com/git/`
83+
然后您**必须** Gitea 的配置文件中正确的添加类似 `[server] ROOT_URL = http://git.example.com/git/` 的配置项
8484

8585
注:必须启用以下 Apache HTTPD 组件:`proxy``proxy_http`
8686

@@ -100,8 +100,9 @@ git.example.com {
100100

101101
```
102102
git.example.com {
103-
proxy /git/ http://localhost:3000 # Note: Trailing Slash after /git/
103+
# 注意: 路径 /git/ 最后需要有路径符号
104+
proxy /git/ http://localhost:3000
104105
}
105106
```
106107

107-
然后在您的 Gitea 配置文件中添加 `[server] ROOT_URL = http://git.example.com/git/`
108+
然后您**必须** Gitea 的配置文件中正确的添加类似 `[server] ROOT_URL = http://git.example.com/git/` 的配置项

options/locale/locale_zh-CN.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1198,7 +1198,7 @@ issues.action_milestone_no_select=无里程碑
11981198
issues.action_assignee=指派人筛选
11991199
issues.action_assignee_no_select=未指派
12001200
issues.opened_by=由 <a href="%[2]s">%[3]s</a> 于 %[1]s创建
1201-
pulls.merged_by=由 <a href="%[2]s">%[3]</a> 于 %[1]s 合并
1201+
pulls.merged_by=由 <a href="%[2]s">%[3]s</a> 于 %[1]s 合并
12021202
pulls.merged_by_fake=由 %[2]s 于 %[1]s 合并
12031203
issues.closed_by=由 <a href="%[2]s">%[3]s</a> 于 %[1]s 关闭
12041204
issues.opened_by_fake=由 %[2]s 于 %[1]s 打开

options/locale/locale_zh-TW.ini

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ public_profile=公開的個人資料
509509
biography_placeholder=告訴我們一些關於你的事
510510
profile_desc=您的電子信箱將被用於通知提醒和其他操作。
511511
password_username_disabled=非本地使用者不允許更改他們的帳號。詳細資訊請聯絡您的系統管理員。
512-
full_name=自定義名稱
512+
full_name=全名
513513
website=個人網站
514514
location=所在地區
515515
update_theme=更新佈景主題
@@ -2371,6 +2371,18 @@ users.still_own_repo=這個使用者還擁有一個或更多的儲存庫。請
23712371
users.still_has_org=此使用者是組織的成員。請先將他從組織中移除。
23722372
users.deletion_success=使用者帳戶已被刪除。
23732373
users.reset_2fa=重設兩步驟驗證
2374+
users.list_status_filter.menu_text=篩選
2375+
users.list_status_filter.reset=重設
2376+
users.list_status_filter.is_active=已啟用
2377+
users.list_status_filter.not_active=未啟用
2378+
users.list_status_filter.is_admin=管理員
2379+
users.list_status_filter.not_admin=非管理員
2380+
users.list_status_filter.is_restricted=受限
2381+
users.list_status_filter.not_restricted=未受限
2382+
users.list_status_filter.is_prohibit_login=禁止登入
2383+
users.list_status_filter.not_prohibit_login=允許登入
2384+
users.list_status_filter.is_2fa_enabled=已啟用兩步驟驗證
2385+
users.list_status_filter.not_2fa_enabled=未啟用兩步驟驗證
23742386

23752387
emails.email_manage_panel=使用者電子信箱管理
23762388
emails.primary=主要
@@ -2469,7 +2481,7 @@ auths.oauth2_icon_url=圖示 URL
24692481
auths.oauth2_clientID=客戶端 ID (金鑰)
24702482
auths.oauth2_clientSecret=客戶端密鑰
24712483
auths.openIdConnectAutoDiscoveryURL=OpenID 連接自動探索 URL
2472-
auths.oauth2_use_custom_url=使用自定義 URL 而不是預設 URL
2484+
auths.oauth2_use_custom_url=使用自訂 URL 而不是預設 URL
24732485
auths.oauth2_tokenURL=Token URL
24742486
auths.oauth2_authURL=授權 URL
24752487
auths.oauth2_profileURL=個人資料 URL

routers/api/v1/api.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ func Routes(sessioner func(http.Handler) http.Handler) *web.Route {
576576
// Miscellaneous
577577
if setting.API.EnableSwagger {
578578
m.Get("/swagger", func(ctx *context.APIContext) {
579-
ctx.Redirect("/api/swagger")
579+
ctx.Redirect(setting.AppSubURL + "/api/swagger")
580580
})
581581
}
582582
m.Get("/version", misc.Version)

routers/api/v1/org/member.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ func IsMember(ctx *context.APIContext) {
159159
}
160160
}
161161

162-
redirectURL := setting.AppURL + "api/v1/orgs/" + ctx.Org.Organization.Name + "/public_members/" + userToCheck.Name
162+
redirectURL := setting.AppSubURL + "/api/v1/orgs/" + ctx.Org.Organization.Name + "/public_members/" + userToCheck.Name
163163
ctx.Redirect(redirectURL, 302)
164164
}
165165

routers/web/user/notification.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"errors"
99
"fmt"
1010
"net/http"
11+
"net/url"
1112
"strings"
1213

1314
"code.gitea.io/gitea/models"
@@ -86,7 +87,7 @@ func getNotifications(c *context.Context) {
8687
// redirect to last page if request page is more than total pages
8788
pager := context.NewPagination(int(total), perPage, page, 5)
8889
if pager.Paginater.Current() < page {
89-
c.Redirect(fmt.Sprintf("/notifications?q=%s&page=%d", c.FormString("q"), pager.Paginater.Current()))
90+
c.Redirect(fmt.Sprintf("%s/notifications?q=%s&page=%d", setting.AppSubURL, url.QueryEscape(c.FormString("q")), pager.Paginater.Current()))
9091
return
9192
}
9293

templates/repo/issue/view_content/comments.tmpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@
521521
</div>
522522
</div>
523523
{{end}}
524-
<div id="code-comments-{{(index $comms 0).ID}}" class="comment-code-cloud ui segment{{if $resolved}} hide{{end}} p-3">
524+
<div id="code-comments-{{(index $comms 0).ID}}" class="comment-code-cloud ui segment{{if $resolved}} hide{{end}}">
525525
<div class="ui comments mb-0">
526526
{{range $comms}}
527527
{{ $createdSubStr:= TimeSinceUnix .CreatedUnix $.Lang }}
@@ -590,7 +590,7 @@
590590
</div>
591591
{{end}}
592592
</div>
593-
<div class="df ac fw mt-3 mb-2 mx-3">
593+
<div class="code-comment-buttons df ac fw mt-3 mb-2 mx-3">
594594
<div class="f1">
595595
{{if $resolved}}
596596
<div class="ui grey text">
@@ -599,7 +599,7 @@
599599
</div>
600600
{{end}}
601601
</div>
602-
<div>
602+
<div class="code-comment-buttons-buttons">
603603
{{if and $.CanMarkConversation $isNotPending}}
604604
<button class="ui tiny basic button resolve-conversation" data-origin="timeline" data-action="{{if not $resolved}}Resolve{{else}}UnResolve{{end}}" data-comment-id="{{(index $comms 0).ID}}" data-update-url="{{$.RepoLink}}/issues/resolve_conversation">
605605
{{if $resolved}}

web_src/less/_repository.less

Lines changed: 43 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -702,9 +702,11 @@
702702
margin-left: 10px;
703703
margin-top: 10px;
704704
}
705+
705706
.branch-update.grid {
706707
.row {
707708
padding-bottom: 1rem;
709+
708710
.icon {
709711
margin-top: 1.1rem;
710712
}
@@ -801,6 +803,7 @@
801803
.timeline-avatar {
802804
position: absolute;
803805
left: -72px;
806+
804807
img {
805808
width: 40px !important;
806809
height: 40px !important;
@@ -955,6 +958,10 @@
955958

956959
.ui.comments {
957960
max-width: 100%;
961+
962+
.avatar {
963+
margin-right: .5rem;
964+
}
958965
}
959966

960967
.comment {
@@ -976,43 +983,44 @@
976983
}
977984

978985
.content {
979-
> .merge-section {
980-
background-color: var(--color-box-body);
986+
@media @mediaSm {
987+
.form .button {
988+
width: 100%;
989+
margin: 0;
981990

982-
.item {
983-
padding: .25rem 0;
991+
&:not(:last-child) {
992+
margin-bottom: 1rem;
993+
}
984994
}
995+
}
996+
}
985997

986-
.item-section {
987-
display: flex;
988-
align-items: center;
989-
justify-content: space-between;
990-
padding: 0;
991-
margin-top: -.25rem;
992-
margin-bottom: -.25rem;
993-
}
998+
> .merge-section {
999+
background-color: var(--color-box-body);
9941000

995-
.divider {
996-
margin-left: -1rem;
997-
margin-right: -1rem;
998-
}
1001+
.item {
1002+
padding: .25rem 0;
1003+
}
9991004

1000-
&.no-header {
1001-
#avatar-arrow();
1005+
.item-section {
1006+
display: flex;
1007+
align-items: center;
1008+
justify-content: space-between;
1009+
padding: 0;
1010+
margin-top: -.25rem;
1011+
margin-bottom: -.25rem;
1012+
}
10021013

1003-
&::after {
1004-
border-right-color: var(--color-box-body);
1005-
}
1006-
}
1014+
.divider {
1015+
margin-left: -1rem;
1016+
margin-right: -1rem;
1017+
}
10071018

1008-
@media @mediaSm {
1009-
.form .button {
1010-
width: 100%;
1019+
&.no-header {
1020+
#avatar-arrow();
10111021

1012-
&:not(:last-child) {
1013-
margin-bottom: 1rem;
1014-
}
1015-
}
1022+
&::after {
1023+
border-right-color: var(--color-box-body);
10161024
}
10171025
}
10181026

@@ -1723,6 +1731,7 @@
17231731
padding: 0;
17241732
border-radius: 0;
17251733
}
1734+
17261735
img.emoji {
17271736
padding: 0;
17281737
}
@@ -1950,6 +1959,7 @@
19501959
.wrap_remove {
19511960
height: 38px;
19521961
}
1962+
19531963
.attachment_edit {
19541964
width: 450px !important;
19551965
}
@@ -2777,6 +2787,7 @@ tbody.commit-list {
27772787
tr.commit-list {
27782788
width: 100%;
27792789
}
2790+
27802791
th .message-wrapper {
27812792
display: block;
27822793
max-width: calc(100vw - 70px);
@@ -2787,6 +2798,7 @@ tbody.commit-list {
27872798
tr.commit-list {
27882799
width: 723px;
27892800
}
2801+
27902802
th .message-wrapper {
27912803
max-width: 280px;
27922804
}
@@ -2796,6 +2808,7 @@ tbody.commit-list {
27962808
tr.commit-list {
27972809
width: 933px;
27982810
}
2811+
27992812
th .message-wrapper {
28002813
max-width: 490px;
28012814
}
@@ -2805,6 +2818,7 @@ tbody.commit-list {
28052818
tr.commit-list {
28062819
width: 1127px;
28072820
}
2821+
28082822
th .message-wrapper {
28092823
max-width: 680px;
28102824
}

0 commit comments

Comments
 (0)