Skip to content

Commit

Permalink
Add a confirm dialog for "sync fork" (go-gitea#33270)
Browse files Browse the repository at this point in the history
Try to quickly fix go-gitea#33264
  • Loading branch information
wxiaoguang authored Jan 14, 2025
1 parent 5eff19a commit 1299fdb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions options/locale/locale_en-US.ini
Original file line number Diff line number Diff line change
Expand Up @@ -1953,6 +1953,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_base_newer = The base branch %s has new changes
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.agit_documentation = Review documentation about AGit
Expand Down
5 changes: 4 additions & 1 deletion templates/repo/code/upstream_diverging_info.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
{{end}}
</div>
{{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"}}
</button>
{{end}}
Expand Down

0 comments on commit 1299fdb

Please sign in to comment.