mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-23 08:20:38 +00:00
Backport #38849 by @silverwind 1. Make review threads linkable via `#pullrequestreview-<reviewID>` 2. Improve CSS so username and timestamp go colored on hover. 3. CSS cleanup, remove dead rules, nonexistant class name, make `.suppressed` actually do what it says in the doc above. <img width="351" height="84" alt="image" src="https://github.com/user-attachments/assets/6ddf15d4-3d6e-4846-ab82-0ad0b19b372f" /> Co-authored-by: silverwind <me@silverwind.io>
This commit is contained in:
@@ -292,9 +292,7 @@ a.silenced,
|
||||
}
|
||||
|
||||
a:hover,
|
||||
a.suppressed:hover,
|
||||
a.muted:hover,
|
||||
a.muted:hover [class*="color-text"],
|
||||
.muted-links a:hover {
|
||||
color: var(--color-primary);
|
||||
}
|
||||
|
||||
@@ -511,20 +511,24 @@ td .commit-summary {
|
||||
margin-left: -16px;
|
||||
}
|
||||
|
||||
.repository.view.issue .comment-list .timeline-item .comment-text-line {
|
||||
.comment-text-line {
|
||||
color: var(--color-text-light);
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.repository.view.issue .comment-list .timeline-item .comment-text-line .ui.label {
|
||||
.comment-text-line .ui.label {
|
||||
line-height: 1.5; /* label has background, so it can't use parent's line-height */
|
||||
}
|
||||
|
||||
.repository.view.issue .comment-list .timeline-item .comment-text-line a {
|
||||
.comment-text-line a {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.comment-text-line a:hover {
|
||||
color: var(--color-primary);
|
||||
}
|
||||
|
||||
.repository.view.issue .comment-list .timeline-item.commits-list {
|
||||
padding-left: 15px;
|
||||
padding-top: 0;
|
||||
|
||||
@@ -197,8 +197,9 @@ export async function handleReply(el: HTMLElement) {
|
||||
}
|
||||
|
||||
export function initRepoPullRequestReview() {
|
||||
if (window.location.hash && window.location.hash.startsWith('#issuecomment-')) {
|
||||
const commentDiv = document.querySelector(window.location.hash);
|
||||
const currentHash = window.location.hash;
|
||||
if (currentHash.startsWith('#issuecomment-') || currentHash.startsWith('#pullrequestreview-')) {
|
||||
const commentDiv = document.querySelector(currentHash);
|
||||
if (commentDiv) {
|
||||
// get the name of the parent id
|
||||
const groupID = commentDiv.closest('div[id^="code-comments-"]')?.getAttribute('id');
|
||||
|
||||
Reference in New Issue
Block a user