Skip to content

Commit eb6c8d5

Browse files
authored
Merge branch 'main' into new-repo-home-page
2 parents fa92277 + 6447b3e commit eb6c8d5

File tree

10 files changed

+50
-42
lines changed

10 files changed

+50
-42
lines changed

.golangci.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ linters:
2929
fast: false
3030

3131
run:
32-
go: "1.21"
3332
timeout: 10m
3433
skip-dirs:
3534
- node_modules
@@ -75,7 +74,6 @@ linters-settings:
7574
- name: modifies-value-receiver
7675
gofumpt:
7776
extra-rules: true
78-
lang-version: "1.21"
7977
depguard:
8078
rules:
8179
main:

custom/conf/app.example.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1221,6 +1221,9 @@ LEVEL = Info
12211221
;; For custom reactions, add a tightly cropped square image to public/assets/img/emoji/reaction_name.png
12221222
;REACTIONS = +1, -1, laugh, hooray, confused, heart, rocket, eyes
12231223
;;
1224+
;; Change the number of users that are displayed in reactions tooltip (triggered by mouse hover).
1225+
;REACTION_MAX_USER_NUM = 10
1226+
;;
12241227
;; Additional Emojis not defined in the utf8 standard
12251228
;; By default we support gitea (:gitea:), to add more copy them to public/assets/img/emoji/emoji_name.png and add it to this config.
12261229
;; Dont mistake it for Reactions.

docs/content/administration/config-cheat-sheet.en-us.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ The following configuration set `Content-Type: application/vnd.android.package-a
223223
- `REACTIONS`: All available reactions users can choose on issues/prs and comments
224224
Values can be emoji alias (:smile:) or a unicode emoji.
225225
For custom reactions, add a tightly cropped square image to public/assets/img/emoji/reaction_name.png
226+
- `REACTION_MAX_USER_NUM`: **10**: Change the number of users that are displayed in reactions tooltip (triggered by mouse hover).
226227
- `CUSTOM_EMOJIS`: **gitea, codeberg, gitlab, git, github, gogs**: Additional Emojis not defined in the utf8 standard.
227228
By default, we support Gitea (:gitea:), to add more copy them to public/assets/img/emoji/emoji_name.png and
228229
add it to this config.

templates/repo/issue/view_content/comments.tmpl

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
{{$createdStr:= TimeSinceUnix .CreatedUnix ctx.Locale}}
55

66
<!-- 0 = COMMENT, 1 = REOPEN, 2 = CLOSE, 3 = ISSUE_REF, 4 = COMMIT_REF,
7-
5 = COMMENT_REF, 6 = PULL_REF, 7 = COMMENT_LABEL, 12 = START_TRACKING,
7+
5 = COMMENT_REF, 6 = PULL_REF, 7 = COMMENT_LABEL, 8 = MILESTONE_CHANGE,
8+
9 = ASSIGNEES_CHANGE, 10 = TITLE_CHANGE, 11 = DELETE_BRANCH, 12 = START_TRACKING,
89
13 = STOP_TRACKING, 14 = ADD_TIME_MANUAL, 16 = ADDED_DEADLINE, 17 = MODIFIED_DEADLINE,
910
18 = REMOVED_DEADLINE, 19 = ADD_DEPENDENCY, 20 = REMOVE_DEPENDENCY, 21 = CODE,
1011
22 = REVIEW, 23 = ISSUE_LOCKED, 24 = ISSUE_UNLOCKED, 25 = TARGET_BRANCH_CHANGED,
@@ -184,31 +185,29 @@
184185
{{if gt .OldMilestoneID 0}}{{if gt .MilestoneID 0}}{{ctx.Locale.Tr "repo.issues.change_milestone_at" (.OldMilestone.Name|Escape) (.Milestone.Name|Escape) $createdStr | Safe}}{{else}}{{ctx.Locale.Tr "repo.issues.remove_milestone_at" (.OldMilestone.Name|Escape) $createdStr | Safe}}{{end}}{{else if gt .MilestoneID 0}}{{ctx.Locale.Tr "repo.issues.add_milestone_at" (.Milestone.Name|Escape) $createdStr | Safe}}{{end}}
185186
</span>
186187
</div>
187-
{{else if eq .Type 9}}
188+
{{else if and (eq .Type 9) (gt .AssigneeID 0)}}
188189
<div class="timeline-item event" id="{{.HashTag}}">
189190
<span class="badge">{{svg "octicon-person"}}</span>
190-
{{if gt .AssigneeID 0}}
191-
{{if .RemovedAssignee}}
192-
{{template "shared/user/avatarlink" dict "user" .Assignee}}
193-
<span class="text grey muted-links">
194-
{{template "shared/user/authorlink" .Assignee}}
195-
{{if eq .Poster.ID .Assignee.ID}}
196-
{{ctx.Locale.Tr "repo.issues.remove_self_assignment" $createdStr | Safe}}
197-
{{else}}
198-
{{ctx.Locale.Tr "repo.issues.remove_assignee_at" (.Poster.GetDisplayName|Escape) $createdStr | Safe}}
199-
{{end}}
200-
</span>
201-
{{else}}
202-
{{template "shared/user/avatarlink" dict "user" .Assignee}}
203-
<span class="text grey muted-links">
204-
{{template "shared/user/authorlink" .Assignee}}
205-
{{if eq .Poster.ID .AssigneeID}}
206-
{{ctx.Locale.Tr "repo.issues.self_assign_at" $createdStr | Safe}}
207-
{{else}}
208-
{{ctx.Locale.Tr "repo.issues.add_assignee_at" (.Poster.GetDisplayName|Escape) $createdStr | Safe}}
209-
{{end}}
210-
</span>
211-
{{end}}
191+
{{if .RemovedAssignee}}
192+
{{template "shared/user/avatarlink" dict "user" .Assignee}}
193+
<span class="text grey muted-links">
194+
{{template "shared/user/authorlink" .Assignee}}
195+
{{if eq .Poster.ID .Assignee.ID}}
196+
{{ctx.Locale.Tr "repo.issues.remove_self_assignment" $createdStr | Safe}}
197+
{{else}}
198+
{{ctx.Locale.Tr "repo.issues.remove_assignee_at" (.Poster.GetDisplayName|Escape) $createdStr | Safe}}
199+
{{end}}
200+
</span>
201+
{{else}}
202+
{{template "shared/user/avatarlink" dict "user" .Assignee}}
203+
<span class="text grey muted-links">
204+
{{template "shared/user/authorlink" .Assignee}}
205+
{{if eq .Poster.ID .AssigneeID}}
206+
{{ctx.Locale.Tr "repo.issues.self_assign_at" $createdStr | Safe}}
207+
{{else}}
208+
{{ctx.Locale.Tr "repo.issues.add_assignee_at" (.Poster.GetDisplayName|Escape) $createdStr | Safe}}
209+
{{end}}
210+
</span>
212211
{{end}}
213212
</div>
214213
{{else if eq .Type 10}}

templates/repo/release/list.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
</div>
1717
<div class="ui twelve wide column detail">
1818
<div class="gt-df gt-ac gt-sb gt-fw gt-mb-3">
19-
<h4 class="release-list-title">
19+
<h4 class="release-list-title gt-word-break">
2020
<a href="{{$.RepoLink}}/releases/tag/{{.TagName | PathEscapeSegments}}">{{.Title}}</a>
2121
{{if .IsDraft}}
2222
<span class="ui yellow label">{{ctx.Locale.Tr "repo.release.draft"}}</span>

templates/user/dashboard/issues.tmpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<div role="main" aria-label="{{.Title}}" class="page-content dashboard issues">
33
{{template "user/dashboard/navbar" .}}
44
<div class="ui container">
5-
<div class="ui stackable grid">
6-
<div class="four wide column">
5+
<div class="flex-container">
6+
<div class="flex-container-nav">
77
<div class="ui secondary vertical filter menu gt-bg-transparent">
88
<a class="{{if eq .ViewType "your_repositories"}}active{{end}} item" href="{{.Link}}?type=your_repositories&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort={{$.SortType}}&state={{.State}}&q={{$.Keyword}}">
99
{{ctx.Locale.Tr "home.issues.in_your_repos"}}
@@ -59,7 +59,7 @@
5959
{{end}}
6060
</div>
6161
</div>
62-
<div class="twelve wide column content">
62+
<div class="flex-container-main content">
6363
<div class="list-header">
6464
<div class="small-menu-items ui compact tiny menu list-header-toggle">
6565
<a class="item{{if not .IsShowClosed}} active{{end}}" href="{{.Link}}?type={{$.ViewType}}&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort={{$.SortType}}&state=open&q={{$.Keyword}}">

templates/user/dashboard/milestones.tmpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<div role="main" aria-label="{{.Title}}" class="page-content dashboard issues repository milestones">
33
{{template "user/dashboard/navbar" .}}
44
<div class="ui container">
5-
<div class="ui stackable grid">
6-
<div class="four wide column">
5+
<div class="flex-container">
6+
<div class="flex-container-nav">
77
<div class="ui secondary vertical filter menu gt-bg-transparent">
88
<div class="item">
99
{{ctx.Locale.Tr "home.issues.in_your_repos"}}
@@ -33,7 +33,7 @@
3333
{{end}}
3434
</div>
3535
</div>
36-
<div class="twelve wide column content">
36+
<div class="flex-container-main content">
3737
<div class="list-header">
3838
<div class="small-menu-items ui compact tiny menu list-header-toggle">
3939
<a class="item{{if not .IsShowClosed}} active{{end}}" href="{{.Link}}?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort={{$.SortType}}&state=open&q={{$.Keyword}}">

web_src/css/modules/tippy.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060

6161
.tippy-box[data-theme="box-with-header"] .tippy-content {
6262
background: var(--color-box-body);
63+
border-radius: var(--border-radius);
6364
padding: 0;
6465
}
6566

web_src/css/repo.css

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -271,14 +271,14 @@
271271
display: flex;
272272
justify-content: space-between;
273273
align-items: center;
274+
gap: 5px;
274275
margin-bottom: 5px;
275276
}
276277

277-
@media (max-width: 767.68px) {
278+
@media (max-width: 767.98px) {
278279
.repository.file.list .repo-description {
279280
flex-direction: column;
280-
gap: 8px;
281-
align-items: normal;
281+
align-items: stretch;
282282
}
283283
}
284284

@@ -3135,21 +3135,29 @@ tbody.commit-list {
31353135
}
31363136

31373137
.commit-status-header {
3138-
border: none !important; /* reset the default ".ui.attached.header" styles, to use the outer border */
3139-
margin: 0 !important;
3138+
/* reset the default ".ui.attached.header" styles, to use the outer border */
3139+
border: none !important;
3140+
/* add a bottom border to make sure the there is always a divider between the header and list when the list is scrolling */
3141+
border-bottom: 1px solid var(--color-secondary) !important;
3142+
/* use negative margin to avoid the newly added border conflict with the list's top border */
3143+
margin: 0 0 -1px !important;
31403144
}
31413145

31423146
.commit-status-list {
3143-
max-height: 195px; /* fit exactly 4 items */
3147+
max-height: 240px; /* fit exactly 6 items, commit-status-item.height * 6 */
31443148
overflow-x: hidden;
31453149
transition: max-height .2s;
31463150
}
31473151

31483152
.commit-status-item {
3149-
padding: 14px 10px !important;
3153+
height: 40px;
3154+
padding: 0 10px;
31503155
display: flex;
31513156
gap: 8px;
31523157
align-items: center;
3158+
}
3159+
3160+
.commit-status-item + .commit-status-item {
31533161
border-top: 1px solid var(--color-secondary);
31543162
}
31553163

web_src/js/features/repo-issue-pr-status.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ export function initRepoPullRequestCommitStatus() {
44
const list = panel.querySelector('.commit-status-list');
55
btn.addEventListener('click', () => {
66
list.style.maxHeight = list.style.maxHeight ? '' : '0px'; // toggle
7-
list.style.overflow = 'hidden'; // hide scrollbar when hiding
87
btn.textContent = btn.getAttribute(list.style.maxHeight ? 'data-show-all' : 'data-hide-all');
98
});
10-
list.addEventListener('animationend', () => list.style.overflow = '');
119
}
1210
}

0 commit comments

Comments
 (0)