Skip to content

Commit bfaef10

Browse files
authored
Merge branch 'master' into assets_dir
2 parents b9e3801 + f07b137 commit bfaef10

File tree

10 files changed

+87
-62
lines changed

10 files changed

+87
-62
lines changed

custom/conf/app.example.ini

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -689,10 +689,12 @@ DEFAULT_ENABLE_TIMETRACKING = true
689689
; Default value for AllowOnlyContributorsToTrackTime
690690
; Only users with write permissions can track time if this is true
691691
DEFAULT_ALLOW_ONLY_CONTRIBUTORS_TO_TRACK_TIME = true
692-
; Default value for the domain part of the user's email address in the git log
693-
; if he has set KeepEmailPrivate to true. The user's email will be replaced with a
694-
; concatenation of the user name in lower case, "@" and NO_REPLY_ADDRESS.
695-
NO_REPLY_ADDRESS = noreply.%(DOMAIN)s
692+
; Value for the domain part of the user's email address in the git log if user
693+
; has set KeepEmailPrivate to true. The user's email will be replaced with a
694+
; concatenation of the user name in lower case, "@" and NO_REPLY_ADDRESS. Default
695+
; value is "noreply." + DOMAIN, where DOMAIN resolves to the value from server.DOMAIN
696+
; Note: do not use the <DOMAIN> notation below
697+
NO_REPLY_ADDRESS = noreply.<DOMAIN>
696698
; Show Registration button
697699
SHOW_REGISTRATION_BUTTON = true
698700
; Show milestones dashboard page - a view of all the user's milestones

docs/content/doc/advanced/config-cheat-sheet.en-us.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ relation to port exhaustion.
482482
- `DEFAULT_ORG_VISIBILITY`: **public**: Set default visibility mode for organisations, either "public", "limited" or "private".
483483
- `DEFAULT_ORG_MEMBER_VISIBLE`: **false** True will make the membership of the users visible when added to the organisation.
484484
- `ALLOW_ONLY_EXTERNAL_REGISTRATION`: **false** Set to true to force registration only using third-party services.
485-
- `NO_REPLY_ADDRESS`: **DOMAIN** Default value for the domain part of the user's email address in the git log if he has set KeepEmailPrivate to true.
485+
- `NO_REPLY_ADDRESS`: **noreply.DOMAIN** Value for the domain part of the user's email address in the git log if user has set KeepEmailPrivate to true. DOMAIN resolves to the value in server.DOMAIN.
486486
The user's email will be replaced with a concatenation of the user name in lower case, "@" and NO_REPLY_ADDRESS.
487487
- `USER_DELETE_WITH_COMMENTS_MAX_TIME`: **0** Minimum amount of time a user must exist before comments are kept when the user is deleted.
488488

docs/content/doc/advanced/mail-templates-us.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ did not include a subject part), Gitea's **internal default** will be used.
130130
The internal default (fallback) subject is the equivalent of:
131131

132132
```sh
133-
{{.SubjectPrefix}}[{{.Repo}}] {{.Issue.Title}} (#.Issue.Index)
133+
{{.SubjectPrefix}}[{{.Repo}}] {{.Issue.Title}} (#{{.Issue.Index}})
134134
```
135135

136136
For example: `Re: [mike/stuff] New color palette (#38)`

modules/graceful/manager_windows.go

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,17 +68,19 @@ func (g *Manager) start() {
6868
// Set the running state
6969
g.setState(stateRunning)
7070
if skip, _ := strconv.ParseBool(os.Getenv("SKIP_MINWINSVC")); skip {
71+
log.Trace("Skipping SVC check as SKIP_MINWINSVC is set")
7172
return
7273
}
7374

7475
// Make SVC process
7576
run := svc.Run
76-
isInteractive, err := svc.IsWindowsService()
77+
isWindowsService, err := svc.IsWindowsService()
7778
if err != nil {
78-
log.Error("Unable to ascertain if running as an Interactive Session: %v", err)
79+
log.Error("Unable to ascertain if running as an Windows Service: %v", err)
7980
return
8081
}
81-
if isInteractive {
82+
if !isWindowsService {
83+
log.Trace("Not running a service ... using the debug SVC manager")
8284
run = debug.Run
8385
}
8486
go func() {
@@ -94,38 +96,49 @@ func (g *Manager) Execute(args []string, changes <-chan svc.ChangeRequest, statu
9496
status <- svc.Status{State: svc.StartPending, WaitHint: uint32(setting.StartupTimeout / time.Millisecond)}
9597
}
9698

99+
log.Trace("Awaiting server start-up")
97100
// Now need to wait for everything to start...
98101
if !g.awaitServer(setting.StartupTimeout) {
102+
log.Trace("... start-up failed ... Stopped")
99103
return false, 1
100104
}
101105

106+
log.Trace("Sending Running state to SVC")
107+
102108
// We need to implement some way of svc.AcceptParamChange/svc.ParamChange
103109
status <- svc.Status{
104110
State: svc.Running,
105111
Accepts: svc.AcceptStop | svc.AcceptShutdown | acceptHammerCode,
106112
}
107113

114+
log.Trace("Started")
115+
108116
waitTime := 30 * time.Second
109117

110118
loop:
111119
for {
112120
select {
113121
case <-g.ctx.Done():
122+
log.Trace("Shutting down")
114123
g.DoGracefulShutdown()
115124
waitTime += setting.GracefulHammerTime
116125
break loop
117126
case <-g.shutdownRequested:
127+
log.Trace("Shutting down")
118128
waitTime += setting.GracefulHammerTime
119129
break loop
120130
case change := <-changes:
121131
switch change.Cmd {
122132
case svc.Interrogate:
133+
log.Trace("SVC sent interrogate")
123134
status <- change.CurrentStatus
124135
case svc.Stop, svc.Shutdown:
136+
log.Trace("SVC requested shutdown - shutting down")
125137
g.DoGracefulShutdown()
126138
waitTime += setting.GracefulHammerTime
127139
break loop
128140
case hammerCode:
141+
log.Trace("SVC requested hammer - shutting down and hammering immediately")
129142
g.DoGracefulShutdown()
130143
g.DoImmediateHammer()
131144
break loop
@@ -134,6 +147,8 @@ loop:
134147
}
135148
}
136149
}
150+
151+
log.Trace("Sending StopPending state to SVC")
137152
status <- svc.Status{
138153
State: svc.StopPending,
139154
WaitHint: uint32(waitTime / time.Millisecond),
@@ -145,8 +160,10 @@ hammerLoop:
145160
case change := <-changes:
146161
switch change.Cmd {
147162
case svc.Interrogate:
163+
log.Trace("SVC sent interrogate")
148164
status <- change.CurrentStatus
149165
case svc.Stop, svc.Shutdown, hammerCmd:
166+
log.Trace("SVC requested hammer - hammering immediately")
150167
g.DoImmediateHammer()
151168
break hammerLoop
152169
default:
@@ -156,6 +173,8 @@ hammerLoop:
156173
break hammerLoop
157174
}
158175
}
176+
177+
log.Trace("Stopped")
159178
return false, 0
160179
}
161180

options/locale/locale_ja-JP.ini

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1859,6 +1859,7 @@ diff.whitespace_ignore_at_eol=行末の空白の違いは無視
18591859
diff.stats_desc=<strong>%d個のファイルの変更</strong>、<strong>%d行の追加</strong>、<strong>%d行の削除</strong>
18601860
diff.stats_desc_file=変更 %d 行: 追加 %d 行, 削除 %d 行
18611861
diff.bin=バイナリ
1862+
diff.bin_not_shown=バイナリファイルは表示されません。
18621863
diff.view_file=ファイルの表示
18631864
diff.file_before=変更前
18641865
diff.file_after=変更後
@@ -1959,6 +1960,9 @@ topic.done=完了
19591960
topic.count_prompt=選択できるのは25トピックまでです。
19601961
topic.format_prompt=トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
19611962

1963+
error.csv.too_large=このファイルは大きすぎるため表示できません。
1964+
error.csv.unexpected=このファイルは %d 行目の %d 文字目に予期しない文字が含まれているため表示できません。
1965+
error.csv.invalid_field_count=このファイルは %d 行目のフィールドの数が正しくないため表示できません。
19621966

19631967
[org]
19641968
org_name_holder=組織名

templates/repo/diff/box.tmpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
</ol>
4444
{{range $i, $file := .Diff.Files}}
4545
{{if $file.IsIncomplete}}
46-
<div class="diff-file-box diff-box file-content">
46+
<div class="diff-file-box diff-box file-content mt-3">
4747
<h4 class="ui top attached normal header rounded">
4848
<a role="button" class="fold-file muted mr-2">
4949
{{svg "octicon-chevron-down" 18}}
@@ -70,7 +70,7 @@
7070
</h4>
7171
</div>
7272
{{else}}
73-
<div class="diff-file-box diff-box file-content {{TabSizeClass $.Editorconfig $file.Name}}" id="diff-{{.Index}}">
73+
<div class="diff-file-box diff-box file-content {{TabSizeClass $.Editorconfig $file.Name}} mt-3" id="diff-{{.Index}}">
7474
<h4 class="diff-file-header sticky-2nd-row ui top attached normal header df ac sb">
7575
<div class="df ac">
7676
{{$isImage := false}}
@@ -145,7 +145,7 @@
145145
{{end}}
146146

147147
{{if .Diff.IsIncomplete}}
148-
<div class="diff-file-box diff-box file-content">
148+
<div class="diff-file-box diff-box file-content mt-3">
149149
<h4 class="ui top attached normal header">
150150
{{$.i18n.Tr "repo.diff.too_many_files"}}
151151
</h4>

templates/repo/diff/conversation.tmpl

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,20 @@
33
{{$isNotPending := (not (eq (index .comments 0).Review.Type 0))}}
44
<div class="conversation-holder" data-path="{{(index .comments 0).TreePath}}" data-side="{{if lt (index .comments 0).Line 0}}left{{else}}right{{end}}" data-idx="{{(index .comments 0).UnsignedLine}}">
55
{{if $resolved}}
6-
<div class="ui attached header resolved-placeholder">
7-
<span class="ui grey text left"><b>{{$resolveDoer.Name}}</b> {{$.i18n.Tr "repo.issues.review.resolved_by"}}</span>
8-
<button id="show-outdated-{{(index .comments 0).ID}}" data-comment="{{(index .comments 0).ID}}" class="ui tiny right labeled button show-outdated">
9-
{{svg "octicon-unfold"}}
10-
{{$.i18n.Tr "repo.issues.review.show_resolved"}}
11-
</button>
12-
<button id="hide-outdated-{{(index .comments 0).ID}}" data-comment="{{(index .comments 0).ID}}" class="hide ui tiny right labeled button hide-outdated">
13-
{{svg "octicon-fold"}}
14-
{{$.i18n.Tr "repo.issues.review.hide_resolved"}}
15-
</button>
6+
<div class="ui attached header resolved-placeholder df ac sb">
7+
<div class="ui grey text">
8+
<b>{{$resolveDoer.Name}}</b> {{$.i18n.Tr "repo.issues.review.resolved_by"}}
9+
</div>
10+
<div>
11+
<button id="show-outdated-{{(index .comments 0).ID}}" data-comment="{{(index .comments 0).ID}}" class="ui tiny right labeled button show-outdated df ac">
12+
{{svg "octicon-unfold" 16 "mr-3"}}
13+
{{$.i18n.Tr "repo.issues.review.show_resolved"}}
14+
</button>
15+
<button id="hide-outdated-{{(index .comments 0).ID}}" data-comment="{{(index .comments 0).ID}}" class="hide ui tiny right labeled button hide-outdated df ac">
16+
{{svg "octicon-fold" 16 "mr-3"}}
17+
{{$.i18n.Tr "repo.issues.review.hide_resolved"}}
18+
</button>
19+
</div>
1620
</div>
1721
{{end}}
1822
<div id="code-comments-{{(index .comments 0).ID}}" class="field comment-code-cloud {{if $resolved}}hide{{end}}">
@@ -32,4 +36,4 @@
3236
</button>
3337
{{end}}
3438
</div>
35-
</div>
39+
</div>

templates/repo/issue/view_content/comments.tmpl

Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -459,35 +459,39 @@
459459
{{ range $filename, $lines := .Review.CodeComments}}
460460
{{range $line, $comms := $lines}}
461461
<div class="ui segments">
462-
<div class="ui segment py-3">
462+
<div class="ui segment py-3 df ac sb">
463463
{{$invalid := (index $comms 0).Invalidated}}
464464
{{$resolved := (index $comms 0).IsResolved}}
465465
{{$resolveDoer := (index $comms 0).ResolveDoer}}
466466
{{$isNotPending := (not (eq (index $comms 0).Review.Type 0))}}
467-
{{if or $invalid $resolved}}
468-
<button id="show-outdated-{{(index $comms 0).ID}}" data-comment="{{(index $comms 0).ID}}" class="{{if not $resolved}}hide {{end}}ui compact right labeled button show-outdated">
469-
{{svg "octicon-unfold"}}
470-
{{if $resolved}}
471-
{{$.i18n.Tr "repo.issues.review.show_resolved"}}
472-
{{else}}
473-
{{$.i18n.Tr "repo.issues.review.show_outdated"}}
467+
<div class="df ac">
468+
<a href="{{(index $comms 0).CodeCommentURL}}" class="file-comment ml-3">{{$filename}}</a>
469+
{{if $invalid }}
470+
<span class="ui label basic small ml-3">
471+
{{$.i18n.Tr "repo.issues.review.outdated"}}
472+
</span>
474473
{{end}}
475-
</button>
476-
<button id="hide-outdated-{{(index $comms 0).ID}}" data-comment="{{(index $comms 0).ID}}" class="{{if $resolved}}hide {{end}}ui compact right labeled button hide-outdated">
477-
{{svg "octicon-fold"}}
478-
{{if $resolved}}
479-
{{$.i18n.Tr "repo.issues.review.hide_resolved"}}
480-
{{else}}
481-
{{$.i18n.Tr "repo.issues.review.hide_outdated"}}
474+
</div>
475+
<div>
476+
{{if or $invalid $resolved}}
477+
<button id="show-outdated-{{(index $comms 0).ID}}" data-comment="{{(index $comms 0).ID}}" class="{{if not $resolved}}hide {{end}}ui compact right labeled button show-outdated df ac">
478+
{{svg "octicon-unfold" 16 "mr-3"}}
479+
{{if $resolved}}
480+
{{$.i18n.Tr "repo.issues.review.show_resolved"}}
481+
{{else}}
482+
{{$.i18n.Tr "repo.issues.review.show_outdated"}}
483+
{{end}}
484+
</button>
485+
<button id="hide-outdated-{{(index $comms 0).ID}}" data-comment="{{(index $comms 0).ID}}" class="{{if $resolved}}hide {{end}}ui compact right labeled button hide-outdated df ac">
486+
{{svg "octicon-fold" 16 "mr-3"}}
487+
{{if $resolved}}
488+
{{$.i18n.Tr "repo.issues.review.hide_resolved"}}
489+
{{else}}
490+
{{$.i18n.Tr "repo.issues.review.hide_outdated"}}
491+
{{end}}
492+
</button>
482493
{{end}}
483-
</button>
484-
{{end}}
485-
<a href="{{(index $comms 0).CodeCommentURL}}" class="file-comment">{{$filename}}</a>
486-
{{if $invalid }}
487-
<span class="ui label basic small yellow">
488-
{{$.i18n.Tr "repo.issues.review.outdated"}}
489-
</span>
490-
{{end}}
494+
</div>
491495
</div>
492496
{{$diff := (CommentMustAsDiff (index $comms 0))}}
493497
{{if $diff}}

web_src/less/_repository.less

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1107,15 +1107,6 @@
11071107

11081108
.segments {
11091109
box-shadow: none;
1110-
1111-
.show-outdated,
1112-
.hide-outdated {
1113-
display: block;
1114-
}
1115-
1116-
.label {
1117-
margin-left: 6px;
1118-
}
11191110
}
11201111
}
11211112
}
@@ -1635,9 +1626,6 @@
16351626
}
16361627

16371628
.diff-file-box {
1638-
margin-top: 1rem;
1639-
margin-bottom: 1rem;
1640-
16411629
.header {
16421630
background-color: var(--color-box-header);
16431631
}

web_src/less/_review.less

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,15 @@
3535
&:not(.top) {
3636
margin-bottom: .5em;
3737
}
38+
}
39+
40+
.show-outdated,
41+
.hide-outdated {
42+
display: block !important;
43+
user-select: none !important;
3844

39-
.show-outdated,
40-
.hide-outdated {
41-
display: block;
42-
margin-left: auto;
45+
&:hover {
46+
text-decoration: underline;
4347
}
4448
}
4549

0 commit comments

Comments
 (0)