-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Notification list enhancements, fix striped tables on dark theme #24639
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
Changes from all commits
d0bbe4d
984a1a8
95e7983
f5c46f1
19ac416
219bbb9
4b1c5b7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,25 +11,25 @@ | |
{{.locale.Tr "notification.read"}} | ||
</a> | ||
{{if and (eq .Status 1)}} | ||
<form action="{{AppSubUrl}}/notifications/purge" method="POST" style="margin-left: auto;"> | ||
<form class="gt-ml-auto" action="{{AppSubUrl}}/notifications/purge" method="POST"> | ||
{{$.CsrfTokenHtml}} | ||
<div class="{{if not $notificationUnreadCount}}gt-hidden{{end}}"> | ||
<button class="ui mini button primary" title='{{$.locale.Tr "notification.mark_all_as_read"}}'> | ||
<button class="ui mini button primary gt-mr-0" title='{{$.locale.Tr "notification.mark_all_as_read"}}'> | ||
{{svg "octicon-checklist"}} | ||
</button> | ||
</div> | ||
</form> | ||
{{end}} | ||
</div> | ||
<div class="ui bottom attached active tab segment"> | ||
<div class="ui bottom attached active tab segment gt-p-3"> | ||
{{if eq (len .Notifications) 0}} | ||
{{if eq .Status 1}} | ||
{{.locale.Tr "notification.no_unread"}} | ||
{{else}} | ||
{{.locale.Tr "notification.no_read"}} | ||
{{end}} | ||
{{else}} | ||
<table class="ui unstackable striped very compact small selectable table" id="notification_table"> | ||
<table class="ui unstackable very compact small table" id="notification_table"> | ||
<tbody> | ||
{{range $notification := .Notifications}} | ||
{{$issue := .Issue}} | ||
|
@@ -59,24 +59,24 @@ | |
{{end}} | ||
</td> | ||
<td class="eleven wide"> | ||
<a class="item" href="{{.Link}}"> | ||
<a class="item issue-title muted" href="{{.Link}}"> | ||
{{if $issue}} | ||
#{{$issue.Index}} - {{$issue.Title}} | ||
#{{$issue.Index}} - {{$issue.Title | RenderEmoji $.Context | RenderCodeBlock}} | ||
{{else}} | ||
{{$repo.FullName}} | ||
{{end}} | ||
</a> | ||
</td> | ||
<td> | ||
<a class="item" href="{{$repo.Link}}">{{$repo.FullName}}</a> | ||
<a class="item muted" href="{{$repo.Link}}">{{$repo.FullName}}</a> | ||
</td> | ||
<td class="collapsing"> | ||
{{if ne .Status 3}} | ||
<form action="{{AppSubUrl}}/notifications/status" method="POST"> | ||
{{$.CsrfTokenHtml}} | ||
<input type="hidden" name="notification_id" value="{{.ID}}"> | ||
<input type="hidden" name="status" value="pinned"> | ||
<button class="ui mini button" title='{{$.locale.Tr "notification.pin"}}' | ||
<button class="ui mini button button-link" title='{{$.locale.Tr "notification.pin"}}' | ||
silverwind marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually, I think this is one of the places where the button can also look like a button. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same below. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
data-url="{{AppSubUrl}}/notifications/status" | ||
data-status="pinned" | ||
data-page="{{$.Page.Paginater.Current}}" | ||
|
@@ -94,7 +94,7 @@ | |
<input type="hidden" name="notification_id" value="{{.ID}}"> | ||
<input type="hidden" name="status" value="read"> | ||
<input type="hidden" name="page" value="{{$.Page.Paginater.Current}}"> | ||
<button class="ui mini button" title='{{$.locale.Tr "notification.mark_as_read"}}' | ||
<button class="ui mini button button-link" title='{{$.locale.Tr "notification.mark_as_read"}}' | ||
data-url="{{AppSubUrl}}/notifications/status" | ||
data-status="read" | ||
data-page="{{$.Page.Paginater.Current}}" | ||
|
@@ -109,7 +109,7 @@ | |
<input type="hidden" name="notification_id" value="{{.ID}}"> | ||
<input type="hidden" name="status" value="unread"> | ||
<input type="hidden" name="page" value="{{$.Page.Paginater.Current}}"> | ||
<button class="ui mini button" title='{{$.locale.Tr "notification.mark_as_unread"}}' | ||
<button class="ui mini button button-link" title='{{$.locale.Tr "notification.mark_as_unread"}}' | ||
data-url="{{AppSubUrl}}/notifications/status" | ||
data-status="unread" | ||
data-page="{{$.Page.Paginater.Current}}" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1148,6 +1148,12 @@ a.ui.card:hover { | |
border-top-color: var(--color-secondary-alpha-50); | ||
} | ||
|
||
.ui.striped.table > tr:nth-child(2n), | ||
.ui.striped.table > tbody > tr:nth-child(2n), | ||
.ui.basic.striped.table > tbody > tr:nth-child(2n) { | ||
background: var(--color-light); | ||
} | ||
|
||
.ui.ui.ui.ui.table tr.active, | ||
.ui.ui.table td.active { | ||
color: var(--color-text); | ||
|
@@ -2232,6 +2238,16 @@ a.ui.active.label:hover { | |
border-left: none; | ||
} | ||
|
||
.ui.button.button-link { | ||
background: transparent; | ||
border: none; | ||
color: inherit; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What we should also think about is whether we set There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Indeed, we should undo any conflicting button styles here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On the other hand, I think we do want to retain size stuff so the "button" takes a area similar to what a regular button takes. |
||
} | ||
|
||
.ui.button.button-link:hover { | ||
color: var(--color-primary); | ||
} | ||
|
||
.two-toggle-buttons .button:not(.active):first-of-type { | ||
border-right: none; | ||
} | ||
|
Uh oh!
There was an error while loading. Please reload this page.