Improve suppressed diff boxes (#3193)

This commit is contained in:
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 {
border-radius: 3px;
}
.rounded {
border-radius: .28571429rem !important;
}
pre, code {
font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;
&.raw {

View File

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

View File

@ -17,8 +17,8 @@
{{if not .IsBin}}
<span class="add" data-line="{{.Addition}}">{{.Addition}}</span>
<span class="bar">
<span class="pull-left add"></span>
<span class="pull-left del"></span>
<div class="pull-left add"></div>
<div class="pull-left del"></div>
</span>
<span class="del" data-line="{{.Deletion}}">{{.Deletion}}</span>
{{else}}
@ -36,19 +36,26 @@
{{range $i, $file := .Diff.Files}}
{{if $file.IsIncomplete}}
<div class="diff-file-box diff-box file-content">
<h4 class="ui top attached normal header">
{{$.i18n.Tr "repo.diff.file_suppressed"}}
<h4 class="ui top attached normal header rounded">
<div class="diff-counter count ui left">
{{if not $file.IsRenamed}}
<span class="add" data-line="{{.Addition}}">+ {{.Addition}}</span>
<span class="bar">
<span class="pull-left add"></span>
<span class="pull-left del"></span>
<div class="pull-left add"></div>
<div class="pull-left del"></div>
</span>
<span class="del" data-line="{{.Deletion}}">- {{.Deletion}}</span>
{{end}}
</div>
<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>
</div>
{{else}}
@ -60,8 +67,8 @@
{{else if not $file.IsRenamed}}
<span class="add" data-line="{{.Addition}}">+ {{.Addition}}</span>
<span class="bar">
<span class="pull-left add"></span>
<span class="pull-left del"></span>
<div class="pull-left add"></div>
<div class="pull-left del"></div>
</span>
<span class="del" data-line="{{.Deletion}}">- {{.Deletion}}</span>
{{end}}