Skip to content

Commit b97548a

Browse files
authored
Fix table misalignments and tweak webhook and githook lists (#21917)
- Fix regression from #21893 which had misaligned a few tables like repo lists and e-mails - Bring githooks list in line with webhooks list for styling - Change webhook list icons to just colored dots, like githook list - Increase size of dot in webhook and githook list from 16 to 22px
1 parent 09b7d81 commit b97548a

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

templates/repo/settings/githooks.tmpl

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
{{.locale.Tr "repo.settings.githooks_desc" | Str2html}}
1414
</div>
1515
{{range .Hooks}}
16-
<div class="item">
17-
<span class="text {{if .IsActive}}green{{else}}grey{{end}}">{{svg "octicon-dot-fill"}}</span>
18-
<span>{{.Name}}</span>
19-
<a class="text blue ui right" href="{{$.RepoLink}}/settings/hooks/git/{{.Name|PathEscape}}">
16+
<div class="item truncated-item-container">
17+
<span class="text {{if .IsActive}}green{{else}}grey{{end}} mr-3">{{svg "octicon-dot-fill" 22}}</span>
18+
<span class="text truncate f1 mr-3">{{.Name}}</span>
19+
<a class="muted ui right p-3" href="{{$.RepoLink}}/settings/hooks/git/{{.Name|PathEscape}}">
2020
{{svg "octicon-pencil"}}
2121
</a>
2222
</div>

templates/repo/settings/webhook/base_list.tmpl

+1-7
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,7 @@
4848
</div>
4949
{{range .Webhooks}}
5050
<div class="item truncated-item-container">
51-
{{if eq .LastStatus 1}}
52-
<span class="text green mr-3">{{svg "octicon-check"}}</span>
53-
{{else if eq .LastStatus 2}}
54-
<span class="text red mr-3">{{svg "octicon-alert"}}</span>
55-
{{else}}
56-
<span class="text grey mr-3">{{svg "octicon-dot-fill"}}</span>
57-
{{end}}
51+
<span class="text {{if eq .LastStatus 1}}green{{else if eq .LastStatus 2}}red{{else}}grey{{end}} mr-3">{{svg "octicon-dot-fill" 22}}</span>
5852
<a class="text truncate f1 mr-3" title="{{.URL}}" href="{{$.BaseLink}}/{{.ID}}">{{.URL}}</a>
5953
<a class="muted p-3" href="{{$.BaseLink}}/{{.ID}}">{{svg "octicon-pencil"}}</a></span>
6054
<a class="delete-button p-3" data-url="{{$.Link}}/delete" data-id="{{.ID}}">{{svg "octicon-trash"}}</a>

web_src/less/_repository.less

+8-2
Original file line numberDiff line numberDiff line change
@@ -2612,12 +2612,18 @@
26122612
}
26132613
}
26142614

2615+
&.webhooks .list > .item:not(:first-child),
2616+
&.githooks .list > .item:not(:first-child) {
2617+
padding: .25rem 1rem;
2618+
margin: 12px -1rem -1rem;
2619+
}
2620+
26152621
.list {
26162622
> .item {
26172623
&:not(:first-child) {
26182624
border-top: 1px solid var(--color-secondary);
2619-
padding: .25rem 1rem;
2620-
margin: 12px -1rem -1rem;
2625+
padding: 1rem;
2626+
margin: 16px -1rem -1rem;
26212627
}
26222628

26232629
> .svg {

0 commit comments

Comments
 (0)