Improve suppressed diff boxes (#3193)

release/v1.15
silverwind 2017-12-14 19:26:59 +01:00 committed by Lauris BH
parent f94c1b3943
commit 1687aa59e6
4 changed files with 20 additions and 10 deletions

File diff suppressed because one or more lines are too long

View File

@ -9,6 +9,9 @@ body {
img { img {
border-radius: 3px; border-radius: 3px;
} }
.rounded {
border-radius: .28571429rem !important;
}
pre, code { pre, code {
font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace; font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;
&.raw { &.raw {

View File

@ -922,7 +922,7 @@
} }
} }
.file { .file {
flex: 0 1 100%; flex: 1;
color: #888; color: #888;
word-break: break-all; word-break: break-all;
} }

View File

@ -17,8 +17,8 @@
{{if not .IsBin}} {{if not .IsBin}}
<span class="add" data-line="{{.Addition}}">{{.Addition}}</span> <span class="add" data-line="{{.Addition}}">{{.Addition}}</span>
<span class="bar"> <span class="bar">
<span class="pull-left add"></span> <div class="pull-left add"></div>
<span class="pull-left del"></span> <div class="pull-left del"></div>
</span> </span>
<span class="del" data-line="{{.Deletion}}">{{.Deletion}}</span> <span class="del" data-line="{{.Deletion}}">{{.Deletion}}</span>
{{else}} {{else}}
@ -36,19 +36,26 @@
{{range $i, $file := .Diff.Files}} {{range $i, $file := .Diff.Files}}
{{if $file.IsIncomplete}} {{if $file.IsIncomplete}}
<div class="diff-file-box diff-box file-content"> <div class="diff-file-box diff-box file-content">
<h4 class="ui top attached normal header"> <h4 class="ui top attached normal header rounded">
{{$.i18n.Tr "repo.diff.file_suppressed"}}
<div class="diff-counter count ui left"> <div class="diff-counter count ui left">
{{if not $file.IsRenamed}} {{if not $file.IsRenamed}}
<span class="add" data-line="{{.Addition}}">+ {{.Addition}}</span> <span class="add" data-line="{{.Addition}}">+ {{.Addition}}</span>
<span class="bar"> <span class="bar">
<span class="pull-left add"></span> <div class="pull-left add"></div>
<span class="pull-left del"></span> <div class="pull-left del"></div>
</span> </span>
<span class="del" data-line="{{.Deletion}}">- {{.Deletion}}</span> <span class="del" data-line="{{.Deletion}}">- {{.Deletion}}</span>
{{end}} {{end}}
</div> </div>
<span class="file">{{$file.Name}}</span> <span class="file">{{$file.Name}}</span>
<div>{{$.i18n.Tr "repo.diff.file_suppressed"}}</div>
{{if not $file.IsSubmodule}}
{{if $file.IsDeleted}}
<a class="ui basic grey tiny button" rel="nofollow" href="{{EscapePound $.BeforeSourcePath}}/{{EscapePound .Name}}">{{$.i18n.Tr "repo.diff.view_file"}}</a>
{{else}}
<a class="ui basic grey tiny button" rel="nofollow" href="{{EscapePound $.SourcePath}}/{{EscapePound .Name}}">{{$.i18n.Tr "repo.diff.view_file"}}</a>
{{end}}
{{end}}
</h4> </h4>
</div> </div>
{{else}} {{else}}
@ -60,8 +67,8 @@
{{else if not $file.IsRenamed}} {{else if not $file.IsRenamed}}
<span class="add" data-line="{{.Addition}}">+ {{.Addition}}</span> <span class="add" data-line="{{.Addition}}">+ {{.Addition}}</span>
<span class="bar"> <span class="bar">
<span class="pull-left add"></span> <div class="pull-left add"></div>
<span class="pull-left del"></span> <div class="pull-left del"></div>
</span> </span>
<span class="del" data-line="{{.Deletion}}">- {{.Deletion}}</span> <span class="del" data-line="{{.Deletion}}">- {{.Deletion}}</span>
{{end}} {{end}}