diff --git a/public/css/index.css b/public/css/index.css index 9ed282ade2..6c5be7f0b5 100644 --- a/public/css/index.css +++ b/public/css/index.css @@ -1306,6 +1306,9 @@ footer .ui.language .menu { padding-top: 8px; padding-bottom: 8px; } +.repository.file.list #repo-files-table td.message .isSigned { + cursor: default; +} .repository.file.list #repo-files-table tr:hover { background-color: #ffffEE; } @@ -1933,10 +1936,15 @@ footer .ui.language .menu { .repository #commits-table td.sha .sha.label { margin: 0; } -.repository #commits-table td.sha .sha.label.isSigned { +.repository #commits-table.ui.basic.striped.table tbody tr:nth-child(2n) { + background-color: rgba(0, 0, 0, 0.02) !important; +} +.repository #commits-table td.sha .sha.label.isSigned, +.repository #repo-files-table .sha.label.isSigned { border: 1px solid #BBB; } -.repository #commits-table td.sha .sha.label.isSigned .detail.icon { +.repository #commits-table td.sha .sha.label.isSigned .detail.icon, +.repository #repo-files-table .sha.label.isSigned .detail.icon { background: #FAFAFA; margin: -6px -10px -4px 0px; padding: 5px 3px 5px 6px; @@ -1944,16 +1952,15 @@ footer .ui.language .menu { border-top-left-radius: 0; border-bottom-left-radius: 0; } -.repository #commits-table td.sha .sha.label.isSigned.isVerified { +.repository #commits-table td.sha .sha.label.isSigned.isVerified, +.repository #repo-files-table .sha.label.isSigned.isVerified { border: 1px solid #21BA45; background: #21BA4518; } -.repository #commits-table td.sha .sha.label.isSigned.isVerified .detail.icon { +.repository #commits-table td.sha .sha.label.isSigned.isVerified .detail.icon, +.repository #repo-files-table .sha.label.isSigned.isVerified .detail.icon { border-left: 1px solid #21BA4580; } -.repository #commits-table.ui.basic.striped.table tbody tr:nth-child(2n) { - background-color: rgba(0, 0, 0, 0.02) !important; -} .repository .diff-detail-box { margin: 15px 0; line-height: 30px; diff --git a/public/less/_repository.less b/public/less/_repository.less index f96d5abc15..b327fb0b5c 100644 --- a/public/less/_repository.less +++ b/public/less/_repository.less @@ -204,6 +204,9 @@ padding-top: 8px; padding-bottom: 8px; } + td.message .isSigned { + cursor: default; + } tr:hover { background-color: #ffffEE; } @@ -804,34 +807,35 @@ width: 140px; } } - td.sha{ - .sha.label{ - margin: 0; - &.isSigned{ - border: 1px solid #BBB; - .detail.icon{ - background: #FAFAFA; - margin: -6px -10px -4px 0px; - padding: 5px 3px 5px 6px; - border-left: 1px solid #BBB; - border-top-left-radius: 0; - border-bottom-left-radius: 0; - } - } - &.isSigned.isVerified{ - border: 1px solid #21BA45; - background: #21BA4518; - .detail.icon{ - border-left: 1px solid #21BA4580; - } - } - } - } + td.sha .sha.label { + margin: 0; + } &.ui.basic.striped.table tbody tr:nth-child(2n) { background-color: rgba(0, 0, 0, .02)!important; } } + #commits-table td.sha .sha.label, #repo-files-table .sha.label{ + &.isSigned{ + border: 1px solid #BBB; + .detail.icon{ + background: #FAFAFA; + margin: -6px -10px -4px 0px; + padding: 5px 3px 5px 6px; + border-left: 1px solid #BBB; + border-top-left-radius: 0; + border-bottom-left-radius: 0; + } + } + &.isSigned.isVerified{ + border: 1px solid #21BA45; + background: #21BA4518; + .detail.icon{ + border-left: 1px solid #21BA4580; + } + } + } + .diff-detail-box { margin: 15px 0; line-height: 30px; diff --git a/routers/repo/view.go b/routers/repo/view.go index 165284a599..a4f15ae5de 100644 --- a/routers/repo/view.go +++ b/routers/repo/view.go @@ -117,6 +117,7 @@ func renderDirectory(ctx *context.Context, treeLink string) { } } ctx.Data["LatestCommit"] = latestCommit + ctx.Data["LatestCommitVerification"] = models.ParseCommitWithSignature(latestCommit) ctx.Data["LatestCommitUser"] = models.ValidateCommitWithEmail(latestCommit) // Check permission to add or upload new file. diff --git a/templates/repo/view_list.tmpl b/templates/repo/view_list.tmpl index 82167de64a..663ef41447 100644 --- a/templates/repo/view_list.tmpl +++ b/templates/repo/view_list.tmpl @@ -13,7 +13,18 @@ {{.LatestCommit.Author.Name}} {{end}} - {{ShortSha .LatestCommit.ID.String}} + + {{ShortSha .LatestCommit.ID.String}} + {{if .LatestCommit.Signature}} + + {{end}} + {{RenderCommitMessage false .LatestCommit.Summary .RepoLink $.Repository.ComposeMetas}}