mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-03 21:08:25 +00:00 
			
		
		
		
	Make SVG size argument optional (#12814)
Now defaults to 16 on both frontend and backend. Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
		@@ -5,17 +5,17 @@
 | 
			
		||||
			<td class="lines-num lines-num-old" data-line-num="{{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}">
 | 
			
		||||
				{{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 5) }}
 | 
			
		||||
					<a role="button" class="blob-excerpt" data-url="{{$.RepoLink}}/blob_excerpt/{{$.AfterCommitID}}" data-query="{{$line.GetBlobExcerptQuery}}&style=split&direction=down" data-anchor="{{$.Anchor}}">
 | 
			
		||||
						{{svg "octicon-fold-down" 16}}
 | 
			
		||||
						{{svg "octicon-fold-down"}}
 | 
			
		||||
					</a>
 | 
			
		||||
				{{end}}
 | 
			
		||||
				{{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 4) }}
 | 
			
		||||
					<a role="button" class="blob-excerpt" data-url="{{$.RepoLink}}/blob_excerpt/{{$.AfterCommitID}}" data-query="{{$line.GetBlobExcerptQuery}}&style=split&direction=up" data-anchor="{{$.Anchor}}">
 | 
			
		||||
						{{svg "octicon-fold-up" 16}}
 | 
			
		||||
						{{svg "octicon-fold-up"}}
 | 
			
		||||
					</a>
 | 
			
		||||
				{{end}}
 | 
			
		||||
				{{if eq $line.GetExpandDirection 2}}
 | 
			
		||||
					<a role="button" class="blob-excerpt" data-url="{{$.RepoLink}}/blob_excerpt/{{$.AfterCommitID}}" data-query="{{$line.GetBlobExcerptQuery}}&style=split&direction=" data-anchor="{{$.Anchor}}">
 | 
			
		||||
						{{svg "octicon-fold" 16}}
 | 
			
		||||
						{{svg "octicon-fold"}}
 | 
			
		||||
					</a>
 | 
			
		||||
				{{end}}
 | 
			
		||||
			</td>
 | 
			
		||||
@@ -37,17 +37,17 @@
 | 
			
		||||
			<td colspan="2" class="lines-num">
 | 
			
		||||
				{{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 5) }}
 | 
			
		||||
					<a role="button" class="blob-excerpt" data-url="{{$.RepoLink}}/blob_excerpt/{{$.AfterCommitID}}" data-query="{{$line.GetBlobExcerptQuery}}&style=unified&direction=down" data-anchor="{{$.Anchor}}">
 | 
			
		||||
						{{svg "octicon-fold-down" 16}}
 | 
			
		||||
						{{svg "octicon-fold-down"}}
 | 
			
		||||
					</a>
 | 
			
		||||
				{{end}}
 | 
			
		||||
				{{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 4) }}
 | 
			
		||||
					<a role="button" class="blob-excerpt" data-url="{{$.RepoLink}}/blob_excerpt/{{$.AfterCommitID}}" data-query="{{$line.GetBlobExcerptQuery}}&style=unified&direction=up" data-anchor="{{$.Anchor}}">
 | 
			
		||||
						{{svg "octicon-fold-up" 16}}
 | 
			
		||||
						{{svg "octicon-fold-up"}}
 | 
			
		||||
					</a>
 | 
			
		||||
				{{end}}
 | 
			
		||||
				{{if eq $line.GetExpandDirection 2}}
 | 
			
		||||
					<a role="button" class="blob-excerpt" data-url="{{$.RepoLink}}/blob_excerpt/{{$.AfterCommitID}}" data-query="{{$line.GetBlobExcerptQuery}}&style=unified&direction=" data-anchor="{{$.Anchor}}">
 | 
			
		||||
						{{svg "octicon-fold" 16}}
 | 
			
		||||
						{{svg "octicon-fold"}}
 | 
			
		||||
					</a>
 | 
			
		||||
				{{end}}
 | 
			
		||||
			</td>
 | 
			
		||||
 
 | 
			
		||||
@@ -18,7 +18,7 @@
 | 
			
		||||
{{else}}
 | 
			
		||||
	<div>
 | 
			
		||||
		<div class="diff-detail-box diff-box sticky">
 | 
			
		||||
			{{svg "octicon-diff" 16}} {{.i18n.Tr "repo.diff.stats_desc" .Diff.NumFiles .Diff.TotalAddition .Diff.TotalDeletion | Str2html}}
 | 
			
		||||
			{{svg "octicon-diff"}} {{.i18n.Tr "repo.diff.stats_desc" .Diff.NumFiles .Diff.TotalAddition .Diff.TotalDeletion | Str2html}}
 | 
			
		||||
			<div class="ui right">
 | 
			
		||||
				{{if .PageIsPullFiles}}
 | 
			
		||||
					{{template "repo/diff/whitespace_dropdown" .}}
 | 
			
		||||
@@ -128,17 +128,17 @@
 | 
			
		||||
																<td class="lines-num lines-num-old">
 | 
			
		||||
																	{{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 5) }}
 | 
			
		||||
																		<a role="button" class="blob-excerpt" data-url="{{$.RepoLink}}/blob_excerpt/{{$.AfterCommitID}}" data-query="{{$line.GetBlobExcerptQuery}}&style=split&direction=down" data-anchor="diff-{{Sha1 $file.Name}}K{{$line.SectionInfo.RightIdx}}">
 | 
			
		||||
																			{{svg "octicon-fold-down" 16}}
 | 
			
		||||
																			{{svg "octicon-fold-down"}}
 | 
			
		||||
																		</a>
 | 
			
		||||
																	{{end}}
 | 
			
		||||
																	{{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 4) }}
 | 
			
		||||
																		<a role="button" class="blob-excerpt" data-url="{{$.RepoLink}}/blob_excerpt/{{$.AfterCommitID}}" data-query="{{$line.GetBlobExcerptQuery}}&style=split&direction=up" data-anchor="diff-{{Sha1 $file.Name}}K{{$line.SectionInfo.RightIdx}}">
 | 
			
		||||
																			{{svg "octicon-fold-up" 16}}
 | 
			
		||||
																			{{svg "octicon-fold-up"}}
 | 
			
		||||
																		</a>
 | 
			
		||||
																	{{end}}
 | 
			
		||||
																	{{if eq $line.GetExpandDirection 2}}
 | 
			
		||||
																		<a role="button" class="blob-excerpt" data-url="{{$.RepoLink}}/blob_excerpt/{{$.AfterCommitID}}" data-query="{{$line.GetBlobExcerptQuery}}&style=split&direction=" data-anchor="diff-{{Sha1 $file.Name}}K{{$line.SectionInfo.RightIdx}}">
 | 
			
		||||
																			{{svg "octicon-fold" 16}}
 | 
			
		||||
																			{{svg "octicon-fold"}}
 | 
			
		||||
																		</a>
 | 
			
		||||
																	{{end}}
 | 
			
		||||
																</td>
 | 
			
		||||
@@ -164,11 +164,11 @@
 | 
			
		||||
																		<div class="ui top attached header">
 | 
			
		||||
																			<span class="ui grey text left"><b>{{$resolveDoer.Name}}</b> {{$.i18n.Tr "repo.issues.review.resolved_by"}}</span>
 | 
			
		||||
																			<button id="show-outdated-{{(index $line.Comments 0).ID}}" data-comment="{{(index $line.Comments 0).ID}}" class="ui compact right labeled button show-outdated">
 | 
			
		||||
																				{{svg "octicon-unfold" 16}}
 | 
			
		||||
																				{{svg "octicon-unfold"}}
 | 
			
		||||
																				{{$.i18n.Tr "repo.issues.review.show_resolved"}}
 | 
			
		||||
																			</button>
 | 
			
		||||
																			<button id="hide-outdated-{{(index $line.Comments 0).ID}}" data-comment="{{(index $line.Comments 0).ID}}" class="hide ui compact right labeled button hide-outdated">
 | 
			
		||||
																				{{svg "octicon-fold" 16}}
 | 
			
		||||
																				{{svg "octicon-fold"}}
 | 
			
		||||
																				{{$.i18n.Tr "repo.issues.review.hide_resolved"}}
 | 
			
		||||
																			</button>
 | 
			
		||||
																		</div>
 | 
			
		||||
@@ -200,11 +200,11 @@
 | 
			
		||||
																		<div class="ui top attached header">
 | 
			
		||||
																			<span class="ui grey text left"><b>{{$resolveDoer.Name}}</b> {{$.i18n.Tr "repo.issues.review.resolved_by"}}</span>
 | 
			
		||||
																			<button id="show-outdated-{{(index $line.Comments 0).ID}}" data-comment="{{(index $line.Comments 0).ID}}" class="ui compact right labeled button show-outdated">
 | 
			
		||||
																				{{svg "octicon-unfold" 16}}
 | 
			
		||||
																				{{svg "octicon-unfold"}}
 | 
			
		||||
																				{{$.i18n.Tr "repo.issues.review.show_resolved"}}
 | 
			
		||||
																			</button>
 | 
			
		||||
																			<button id="hide-outdated-{{(index $line.Comments 0).ID}}" data-comment="{{(index $line.Comments 0).ID}}" class="hide ui compact right labeled button hide-outdated">
 | 
			
		||||
																				{{svg "octicon-fold" 16}}
 | 
			
		||||
																				{{svg "octicon-fold"}}
 | 
			
		||||
																				{{$.i18n.Tr "repo.issues.review.hide_resolved"}}
 | 
			
		||||
																			</button>
 | 
			
		||||
																		</div>
 | 
			
		||||
 
 | 
			
		||||
@@ -24,7 +24,7 @@
 | 
			
		||||
			</div>
 | 
			
		||||
		</div>
 | 
			
		||||
		<div class="field footer">
 | 
			
		||||
			<span class="markdown-info">{{svg "octicon-markdown" 16}} {{$.root.i18n.Tr "repo.diff.comment.markdown_info"}}</span>
 | 
			
		||||
			<span class="markdown-info">{{svg "octicon-markdown"}} {{$.root.i18n.Tr "repo.diff.comment.markdown_info"}}</span>
 | 
			
		||||
			<div class="ui right">
 | 
			
		||||
				{{if $.reply}}
 | 
			
		||||
					<button class="ui submit green tiny button btn-reply" onclick="window.submitReply(this);">{{$.root.i18n.Tr "repo.diff.comment.reply"}}</button>
 | 
			
		||||
 
 | 
			
		||||
@@ -13,7 +13,7 @@
 | 
			
		||||
			{{ end }}
 | 
			
		||||
		</h2>
 | 
			
		||||
		<div class="ui segment choose branch">
 | 
			
		||||
			{{svg "octicon-git-compare" 16}}
 | 
			
		||||
			{{svg "octicon-git-compare"}}
 | 
			
		||||
			<div class="ui floating filter dropdown" data-no-results="{{.i18n.Tr "repo.pulls.no_results"}}">
 | 
			
		||||
				<div class="ui basic small button">
 | 
			
		||||
					<span class="text">{{.i18n.Tr "repo.pulls.compare_base"}}: {{$.BaseName}}:{{$.BaseBranch}}</span>
 | 
			
		||||
 
 | 
			
		||||
@@ -7,17 +7,17 @@
 | 
			
		||||
					<td colspan="2" class="lines-num">
 | 
			
		||||
						{{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 5) }}
 | 
			
		||||
							<a role="button" class="blob-excerpt" data-url="{{$.root.RepoLink}}/blob_excerpt/{{$.root.AfterCommitID}}" data-query="{{$line.GetBlobExcerptQuery}}&style=unified&direction=down" data-anchor="diff-{{Sha1 $file.Name}}K{{$line.SectionInfo.RightIdx}}">
 | 
			
		||||
								{{svg "octicon-fold-down" 16}}
 | 
			
		||||
								{{svg "octicon-fold-down"}}
 | 
			
		||||
							</a>
 | 
			
		||||
						{{end}}
 | 
			
		||||
						{{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 4) }}
 | 
			
		||||
							<a role="button" class="blob-excerpt" data-url="{{$.root.RepoLink}}/blob_excerpt/{{$.root.AfterCommitID}}" data-query="{{$line.GetBlobExcerptQuery}}&style=unified&direction=up" data-anchor="diff-{{Sha1 $file.Name}}K{{$line.SectionInfo.RightIdx}}">
 | 
			
		||||
								{{svg "octicon-fold-up" 16}}
 | 
			
		||||
								{{svg "octicon-fold-up"}}
 | 
			
		||||
							</a>
 | 
			
		||||
						{{end}}
 | 
			
		||||
						{{if eq $line.GetExpandDirection 2}}
 | 
			
		||||
							<a role="button" class="blob-excerpt" data-url="{{$.root.RepoLink}}/blob_excerpt/{{$.root.AfterCommitID}}" data-query="{{$line.GetBlobExcerptQuery}}&style=unified&direction=" data-anchor="diff-{{Sha1 $file.Name}}K{{$line.SectionInfo.RightIdx}}">
 | 
			
		||||
								{{svg "octicon-fold" 16}}
 | 
			
		||||
								{{svg "octicon-fold"}}
 | 
			
		||||
							</a>
 | 
			
		||||
						{{end}}
 | 
			
		||||
					</td>
 | 
			
		||||
@@ -43,11 +43,11 @@
 | 
			
		||||
							<div class = "ui attached header">
 | 
			
		||||
								<span class="ui grey text left"><b>{{$resolveDoer.Name}}</b> {{$.root.i18n.Tr "repo.issues.review.resolved_by"}}</span>
 | 
			
		||||
								<button id="show-outdated-{{(index $line.Comments 0).ID}}" data-comment="{{(index $line.Comments 0).ID}}" class="ui compact right labeled button show-outdated">
 | 
			
		||||
									{{svg "octicon-unfold" 16}}
 | 
			
		||||
									{{svg "octicon-unfold"}}
 | 
			
		||||
									{{$.root.i18n.Tr "repo.issues.review.show_resolved"}}
 | 
			
		||||
								</button>
 | 
			
		||||
								<button id="hide-outdated-{{(index $line.Comments 0).ID}}" data-comment="{{(index $line.Comments 0).ID}}" class="hide ui compact right labeled button hide-outdated">
 | 
			
		||||
									{{svg "octicon-fold" 16}}
 | 
			
		||||
									{{svg "octicon-fold"}}
 | 
			
		||||
									{{$.root.i18n.Tr "repo.issues.review.hide_resolved"}}
 | 
			
		||||
								</button>
 | 
			
		||||
							</div>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user