diff options
-rw-r--r-- | gogs.go | 2 | ||||
-rw-r--r-- | modules/base/template.go | 2 | ||||
-rw-r--r-- | public/config.codekit | 18 | ||||
-rwxr-xr-x | public/css/gogs.css | 4 | ||||
-rw-r--r-- | public/less/_repository.less | 6 | ||||
-rw-r--r-- | templates/.VERSION | 2 | ||||
-rw-r--r-- | templates/repo/diff_box.tmpl | 56 |
7 files changed, 51 insertions, 39 deletions
@@ -17,7 +17,7 @@ import ( "github.com/gogits/gogs/modules/setting" ) -const APP_VER = "0.6.22.1102 Beta" +const APP_VER = "0.6.22.1103 Beta" func init() { runtime.GOMAXPROCS(runtime.NumCPU()) diff --git a/modules/base/template.go b/modules/base/template.go index 0fd1af755c..ff743e957d 100644 --- a/modules/base/template.go +++ b/modules/base/template.go @@ -263,7 +263,7 @@ func ActionContent2Commits(act Actioner) *PushCommits { func DiffTypeToStr(diffType int) string { diffTypes := map[int]string{ - 1: "add", 2: "modify", 3: "del", + 1: "add", 2: "modify", 3: "del", 4: "rename", } return diffTypes[diffType] } diff --git a/public/config.codekit b/public/config.codekit index ecec2484c3..59d0c333e6 100644 --- a/public/config.codekit +++ b/public/config.codekit @@ -5,7 +5,7 @@ "\/css\/dropzone-4.0.1.css": { "fileType": 16, "ignore": 0, - "ignoreWasSetByUser": 0, + "ignoreWasSetByUser": 1, "inputAbbreviatedPath": "\/css\/dropzone-4.0.1.css", "outputAbbreviatedPath": "No Output Path", "outputPathIsOutsideProject": 0, @@ -74,11 +74,11 @@ "outputPathIsOutsideProject": 0, "outputPathIsSetByUser": 0 }, - "\/css\/semantic-2.1.3.min.css": { + "\/css\/semantic-2.1.5.min.css": { "fileType": 16, "ignore": 0, "ignoreWasSetByUser": 0, - "inputAbbreviatedPath": "\/css\/semantic-2.1.3.min.css", + "inputAbbreviatedPath": "\/css\/semantic-2.1.5.min.css", "outputAbbreviatedPath": "No Output Path", "outputPathIsOutsideProject": 0, "outputPathIsSetByUser": 0 @@ -204,12 +204,12 @@ "outputStyle": 1, "syntaxCheckerStyle": 1 }, - "\/js\/libs\/clipboard-1.3.1.min.js": { + "\/js\/libs\/clipboard-1.5.3.min.js": { "fileType": 64, "ignore": 0, "ignoreWasSetByUser": 0, - "inputAbbreviatedPath": "\/js\/libs\/clipboard-1.3.1.min.js", - "outputAbbreviatedPath": "\/js\/libs\/min\/clipboard-1.3.1.min-min.js", + "inputAbbreviatedPath": "\/js\/libs\/clipboard-1.5.3.min.js", + "outputAbbreviatedPath": "\/js\/libs\/min\/clipboard-1.5.3.min-min.js", "outputPathIsOutsideProject": 0, "outputPathIsSetByUser": 0, "outputStyle": 1, @@ -281,12 +281,12 @@ "outputPathIsSetByUser": 0, "processed": 0 }, - "\/js\/semantic-2.1.3.min.js": { + "\/js\/semantic-2.1.5.min.js": { "fileType": 64, "ignore": 0, "ignoreWasSetByUser": 0, - "inputAbbreviatedPath": "\/js\/semantic-2.1.3.min.js", - "outputAbbreviatedPath": "\/js\/min\/semantic-2.1.3.min-min.js", + "inputAbbreviatedPath": "\/js\/semantic-2.1.5.min.js", + "outputAbbreviatedPath": "\/js\/min\/semantic-2.1.5.min-min.js", "outputPathIsOutsideProject": 0, "outputPathIsSetByUser": 0, "outputStyle": 1, diff --git a/public/css/gogs.css b/public/css/gogs.css index 45223cb414..8448d618fe 100755 --- a/public/css/gogs.css +++ b/public/css/gogs.css @@ -2288,6 +2288,10 @@ ol.linenums { .repository .diff-file-box .code-diff tbody tr:hover pre { background-color: transparent !important; } +.repository .diff-file-box.file-content img { + max-width: 100%; + padding: 5px 5px 0 5px; +} .repository .code-view { overflow: auto; overflow-x: auto; diff --git a/public/less/_repository.less b/public/less/_repository.less index 7fdec66f9f..9035d558e4 100644 --- a/public/less/_repository.less +++ b/public/less/_repository.less @@ -585,6 +585,12 @@ } } } + &.file-content { + img { + max-width: 100%; + padding: 5px 5px 0 5px; + } + } } .code-view { overflow: auto; diff --git a/templates/.VERSION b/templates/.VERSION index 2b9408d0cf..364e36fc76 100644 --- a/templates/.VERSION +++ b/templates/.VERSION @@ -1 +1 @@ -0.6.22.1102 Beta
\ No newline at end of file +0.6.22.1103 Beta
\ No newline at end of file diff --git a/templates/repo/diff_box.tmpl b/templates/repo/diff_box.tmpl index e531434310..a1d106b7f2 100644 --- a/templates/repo/diff_box.tmpl +++ b/templates/repo/diff_box.tmpl @@ -57,33 +57,35 @@ </div> </h4> <div class="ui attached table segment"> - {{$isImage := (call $.IsImageFile $file.Name)}} - {{if $isImage}} - <div class="center"> - <img src="{{$.RawPath}}/{{EscapePound .Name}}"> - </div> - {{else}} - <div class="file-body file-code code-view code-diff"> - <table> - <tbody> - {{range .Sections}} - {{range $k, $line := .Lines}} - <tr class="{{DiffLineTypeToStr .Type}}-code nl-{{$k}} ol-{{$k}}"> - <td class="lines-num lines-num-old"> - <span rel="{{if $line.LeftIdx}}diff-{{Sha1 $file.Name}}L{{$line.LeftIdx}}{{end}}">{{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}</span> - </td> - <td class="lines-num lines-num-new"> - <span rel="{{if $line.RightIdx}}diff-{{Sha1 $file.Name}}R{{$line.RightIdx}}{{end}}">{{if $line.RightIdx}}{{$line.RightIdx}}{{end}}</span> - </td> - <td class="lines-code"> - <pre>{{$line.Content}}</pre> - </td> - </tr> - {{end}} - {{end}} - </tbody> - </table> - </div> + {{if not $file.IsRenamed}} + {{$isImage := (call $.IsImageFile $file.Name)}} + {{if and $isImage}} + <div class="center"> + <img src="{{$.RawPath}}/{{EscapePound .Name}}"> + </div> + {{else}} + <div class="file-body file-code code-view code-diff"> + <table> + <tbody> + {{range .Sections}} + {{range $k, $line := .Lines}} + <tr class="{{DiffLineTypeToStr .Type}}-code nl-{{$k}} ol-{{$k}}"> + <td class="lines-num lines-num-old"> + <span rel="{{if $line.LeftIdx}}diff-{{Sha1 $file.Name}}L{{$line.LeftIdx}}{{end}}">{{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}</span> + </td> + <td class="lines-num lines-num-new"> + <span rel="{{if $line.RightIdx}}diff-{{Sha1 $file.Name}}R{{$line.RightIdx}}{{end}}">{{if $line.RightIdx}}{{$line.RightIdx}}{{end}}</span> + </td> + <td class="lines-code"> + <pre>{{$line.Content}}</pre> + </td> + </tr> + {{end}} + {{end}} + </tbody> + </table> + </div> + {{end}} {{end}} </div> </div> |