Skip to content

Commit

Permalink
Merge branch 'main' into fix-nuget-search
Browse files Browse the repository at this point in the history
  • Loading branch information
GiteaBot committed Aug 14, 2023
2 parents c047592 + 56b6b2b commit 6f7092c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 0 additions & 1 deletion routers/web/repo/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,6 @@ func GetPullCommits(ctx *context.Context) {
// Get the needed locale
resp.Locale = map[string]string{
"lang": ctx.Locale.Language(),
"filter_changes_by_commit": ctx.Tr("repo.pulls.filter_changes_by_commit"),
"show_all_commits": ctx.Tr("repo.pulls.show_all_commits"),
"stats_num_commits": ctx.TrN(len(commits), "repo.activity.git_stats_commit_1", "repo.activity.git_stats_commit_n", len(commits)),
"show_changes_since_your_last_review": ctx.Tr("repo.pulls.show_changes_since_your_last_review"),
Expand Down
2 changes: 1 addition & 1 deletion templates/repo/diff/box.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
{{template "repo/diff/whitespace_dropdown" .}}
{{template "repo/diff/options_dropdown" .}}
{{if .PageIsPullFiles}}
<div id="diff-commit-select" data-issuelink="{{$.Issue.Link}}" data-queryparams="?style={{if $.IsSplitStyle}}split{{else}}unified{{end}}&whitespace={{$.WhitespaceBehavior}}&show-outdated={{$.ShowOutdatedComments}}">
<div id="diff-commit-select" data-issuelink="{{$.Issue.Link}}" data-queryparams="?style={{if $.IsSplitStyle}}split{{else}}unified{{end}}&whitespace={{$.WhitespaceBehavior}}&show-outdated={{$.ShowOutdatedComments}}" data-filter_changes_by_commit="{{.locale.Tr "repo.pulls.filter_changes_by_commit"}}">
{{/*
the following will be replaced by vue component
but this avoids any loading artifacts till the vue component is initialized
Expand Down
5 changes: 4 additions & 1 deletion web_src/js/components/DiffCommitSelector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,13 @@ import {SvgIcon} from '../svg.js';
export default {
components: {SvgIcon},
data: () => {
const el = document.getElementById('diff-commit-select');
return {
menuVisible: false,
isLoading: false,
locale: {},
locale: {
filter_changes_by_commit: el.getAttribute('data-filter_changes_by_commit'),
},
commits: [],
hoverActivated: false,
lastReviewCommitSha: null
Expand Down

0 comments on commit 6f7092c

Please sign in to comment.