1
1
mirror of https://github.com/go-gitea/gitea synced 2025-01-18 21:54:27 +00:00

Add a confirm dialog for "sync fork" (#33270) (#33273)

Backport #33270 by @wxiaoguang

Try to quickly fix #33264

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
Giteabot 2025-01-15 06:51:17 +08:00 committed by GitHub
parent 2984a7c121
commit b4e2d5e8ee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View File

@ -1951,6 +1951,7 @@ pulls.upstream_diverging_prompt_behind_1 = This branch is %[1]d commit behind %[
pulls.upstream_diverging_prompt_behind_n = This branch is %[1]d commits behind %[2]s pulls.upstream_diverging_prompt_behind_n = This branch is %[1]d commits behind %[2]s
pulls.upstream_diverging_prompt_base_newer = The base branch %s has new changes pulls.upstream_diverging_prompt_base_newer = The base branch %s has new changes
pulls.upstream_diverging_merge = Sync fork pulls.upstream_diverging_merge = Sync fork
pulls.upstream_diverging_merge_confirm = Would you like to merge base repository's default branch onto this repository's branch %s?
pull.deleted_branch = (deleted):%s pull.deleted_branch = (deleted):%s
pull.agit_documentation = Review documentation about AGit pull.agit_documentation = Review documentation about AGit

View File

@ -10,7 +10,10 @@
{{end}} {{end}}
</div> </div>
{{if .CanWriteCode}} {{if .CanWriteCode}}
<button class="ui compact primary button tw-m-0 link-action" data-url="{{.Repository.Link}}/branches/merge-upstream?branch={{.BranchName}}"> <button class="ui compact primary button tw-m-0 link-action"
data-modal-confirm-header="{{ctx.Locale.Tr "repo.pulls.upstream_diverging_merge"}}"
data-modal-confirm-content="{{ctx.Locale.Tr "repo.pulls.upstream_diverging_merge_confirm" .BranchName}}"
data-url="{{.Repository.Link}}/branches/merge-upstream?branch={{.BranchName}}">
{{ctx.Locale.Tr "repo.pulls.upstream_diverging_merge"}} {{ctx.Locale.Tr "repo.pulls.upstream_diverging_merge"}}
</button> </button>
{{end}} {{end}}