Skip to content

Commit f9dec41

Browse files
authored
Merge branch 'master' into fix-5583-samesite-setting-for-cookies
2 parents 14394c8 + f4efa10 commit f9dec41

File tree

3 files changed

+16
-11
lines changed

3 files changed

+16
-11
lines changed

modules/templates/helper.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -817,6 +817,10 @@ func ActionIcon(opType models.ActionType) string {
817817
func ActionContent2Commits(act Actioner) *repository.PushCommits {
818818
push := repository.NewPushCommits()
819819

820+
if act == nil || act.GetContent() == "" {
821+
return push
822+
}
823+
820824
json := jsoniter.ConfigCompatibleWithStandardLibrary
821825
if err := json.Unmarshal([]byte(act.GetContent()), push); err != nil {
822826
log.Error("json.Unmarshal:\n%s\nERROR: %v", act.GetContent(), err)

templates/admin/dashboard.tmpl

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,17 @@
3636
<td><button type="submit" class="ui green button" name="op" value="git_gc_repos">{{svg "octicon-play"}} {{.i18n.Tr "admin.dashboard.operation_run"}}</button></td>
3737
</tr>
3838
{{if and (not .SSH.Disabled) (not .SSH.StartBuiltinServer)}}
39-
<tr>
40-
<td>{{.i18n.Tr "admin.dashboard.resync_all_sshkeys"}}<br/>
41-
{{.i18n.Tr "admin.dashboard.resync_all_sshkeys.desc"}}</td>
42-
<td><button type="submit" class="ui green button" name="op" value="resync_all_sshkeys">{{svg "octicon-play"}} {{.i18n.Tr "admin.dashboard.operation_run"}}</button></td>
43-
</tr>
39+
<tr>
40+
<td>{{.i18n.Tr "admin.dashboard.resync_all_sshkeys"}}<br/>
41+
{{.i18n.Tr "admin.dashboard.resync_all_sshkeys.desc"}}</td>
42+
<td><button type="submit" class="ui green button" name="op" value="resync_all_sshkeys">{{svg "octicon-play"}} {{.i18n.Tr "admin.dashboard.operation_run"}}</button></td>
43+
</tr>
44+
<tr>
45+
<td>{{.i18n.Tr "admin.dashboard.resync_all_sshprincipals"}}<br/>
46+
{{.i18n.Tr "admin.dashboard.resync_all_sshprincipals.desc"}}</td>
47+
<td><button type="submit" class="ui green button" name="op" value="resync_all_sshprincipals">{{svg "octicon-play" 16}} {{.i18n.Tr "admin.dashboard.operation_run"}}</button></td>
48+
</tr>
4449
{{end}}
45-
<tr>
46-
<td>{{.i18n.Tr "admin.dashboard.resync_all_sshprincipals"}}<br/>
47-
{{.i18n.Tr "admin.dashboard.resync_all_sshprincipals.desc"}}</td>
48-
<td><button type="submit" class="ui green button" name="op" value="resync_all_sshprincipals">{{svg "octicon-play" 16}} {{.i18n.Tr "admin.dashboard.operation_run"}}</button></td>
49-
</tr>
5050
<tr>
5151
<td>{{.i18n.Tr "admin.dashboard.resync_all_hooks"}}</td>
5252
<td><button type="submit" class="ui green button" name="op" value="resync_all_hooks">{{svg "octicon-play"}} {{.i18n.Tr "admin.dashboard.operation_run"}}</button></td>

templates/user/dashboard/feeds.tmpl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@
110110
<span class="text truncate issue title">{{index .GetIssueInfos 1 | RenderEmoji}}</span>
111111
{{else if or (eq .GetOpType 10) (eq .GetOpType 21) (eq .GetOpType 22) (eq .GetOpType 23)}}
112112
<a href="{{.GetCommentLink}}" class="text truncate issue title">{{.GetIssueTitle | RenderEmoji}}</a>
113-
<p class="text light grey">{{index .GetIssueInfos 1 | RenderEmoji}}</p>
113+
{{$comment := index .GetIssueInfos 1}}
114+
{{if gt (len $comment) 0}}<p class="text light grey">{{$comment | RenderEmoji}}</p>{{end}}
114115
{{else if eq .GetOpType 11}}
115116
<p class="text light grey">{{index .GetIssueInfos 1}}</p>
116117
{{else if or (eq .GetOpType 12) (eq .GetOpType 13) (eq .GetOpType 14) (eq .GetOpType 15)}}

0 commit comments

Comments
 (0)