Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix table misalignments and tweak webhook and githook lists #21917

Merged
merged 3 commits into from
Nov 24, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions templates/repo/settings/githooks.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
{{.locale.Tr "repo.settings.githooks_desc" | Str2html}}
</div>
{{range .Hooks}}
<div class="item">
<span class="text {{if .IsActive}}green{{else}}grey{{end}}">{{svg "octicon-dot-fill"}}</span>
<span>{{.Name}}</span>
<a class="text blue ui right" href="{{$.RepoLink}}/settings/hooks/git/{{.Name|PathEscape}}">
<div class="item truncated-item-container">
<span class="text {{if .IsActive}}green{{else}}grey{{end}} mr-3">{{svg "octicon-dot-fill" 22}}</span>
<span class="text truncate f1 mr-3">{{.Name}}</span>
<a class="muted ui right p-3" href="{{$.RepoLink}}/settings/hooks/git/{{.Name|PathEscape}}">
{{svg "octicon-pencil"}}
</a>
</div>
Expand Down
8 changes: 1 addition & 7 deletions templates/repo/settings/webhook/base_list.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,7 @@
</div>
{{range .Webhooks}}
<div class="item truncated-item-container">
{{if eq .LastStatus 1}}
<span class="text green mr-3">{{svg "octicon-check"}}</span>
{{else if eq .LastStatus 2}}
<span class="text red mr-3">{{svg "octicon-alert"}}</span>
{{else}}
<span class="text grey mr-3">{{svg "octicon-dot-fill"}}</span>
{{end}}
<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>
<a class="text truncate f1 mr-3" title="{{.URL}}" href="{{$.BaseLink}}/{{.ID}}">{{.URL}}</a>
<a class="muted p-3" href="{{$.BaseLink}}/{{.ID}}">{{svg "octicon-pencil"}}</a></span>
<a class="delete-button p-3" data-url="{{$.Link}}/delete" data-id="{{.ID}}">{{svg "octicon-trash"}}</a>
Expand Down
10 changes: 8 additions & 2 deletions web_src/less/_repository.less
Original file line number Diff line number Diff line change
Expand Up @@ -2612,12 +2612,18 @@
}
}

&.webhooks .list > .item:not(:first-child),
&.githooks .list > .item:not(:first-child) {
padding: .25rem 1rem;
margin: 12px -1rem -1rem;
}

.list {
> .item {
&:not(:first-child) {
border-top: 1px solid var(--color-secondary);
padding: .25rem 1rem;
margin: 12px -1rem -1rem;
padding: 1rem;
margin: 16px -1rem -1rem;
}

> .svg {
Expand Down