Skip to content

Commit 0568297

Browse files
GiteaBotsilverwind
andauthored
Diff page enhancements (#25398) (#25437)
Backport #25398 by @silverwind Two small tweaks: 1. Vertically center arrow here when editing a PR: <img width="405" alt="Screenshot 2023-06-20 at 19 48 49" src="https://github.com/go-gitea/gitea/assets/115237/1d63764d-9fd9-467e-8a8e-9258c06475eb"> 2. Use 2-row layout on diff viewed status and show it again on mobile: <img width="142" alt="Screenshot 2023-06-20 at 19 51 21" src="https://github.com/go-gitea/gitea/assets/115237/3046e782-163c-4f87-910c-a22066de8f1b"> Mobile view: <img width="370" alt="Screenshot 2023-06-20 at 19 44 40" src="https://github.com/go-gitea/gitea/assets/115237/9cf56347-7323-4d05-99a5-17ad215ee44d"> Co-authored-by: silverwind <[email protected]>
1 parent f18b8e7 commit 0568297

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

templates/repo/diff/box.tmpl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,12 @@
3434
</div>
3535
<div class="diff-detail-actions gt-df gt-ac gt-gap-2 gt-fw">
3636
{{if and .PageIsPullFiles $.SignedUserID (not .IsArchived)}}
37-
<progress id="viewed-files-summary" value="{{.Diff.NumViewedFiles}}" max="{{.Diff.NumFiles}}"></progress>
38-
<label for="viewed-files-summary" id="viewed-files-summary-label" class="gt-f1 gt-whitespace-nowrap not-mobile" data-text-changed-template="{{.locale.Tr "repo.pulls.viewed_files_label"}}">
39-
{{.locale.Tr "repo.pulls.viewed_files_label" .Diff.NumViewedFiles .Diff.NumFiles}}
40-
</label>
37+
<div class="gt-df gt-ac gt-fc gt-whitespace-nowrap gt-mr-2">
38+
<label for="viewed-files-summary" id="viewed-files-summary-label" data-text-changed-template="{{.locale.Tr "repo.pulls.viewed_files_label"}}">
39+
{{.locale.Tr "repo.pulls.viewed_files_label" .Diff.NumViewedFiles .Diff.NumFiles}}
40+
</label>
41+
<progress id="viewed-files-summary" value="{{.Diff.NumViewedFiles}}" max="{{.Diff.NumFiles}}"></progress>
42+
</div>
4143
{{end}}
4244
{{template "repo/diff/whitespace_dropdown" .}}
4345
{{template "repo/diff/options_dropdown" .}}

templates/repo/issue/view_title.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@
7070
{{$.locale.Tr "repo.pulls.title_desc" .NumCommits $headHref $baseHref | Safe}}
7171
</span>
7272
{{end}}
73-
<span id="pull-desc-edit" class="gt-hidden">
73+
<span id="pull-desc-edit" class="gt-hidden flex-text-block">
7474
<div class="ui floating filter dropdown">
75-
<div class="ui basic small button">
75+
<div class="ui basic small button gt-mr-0">
7676
<span class="text">{{.locale.Tr "repo.pulls.compare_compare"}}: {{$.HeadTarget}}</span>
7777
</div>
7878
</div>

web_src/css/repo.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1559,7 +1559,6 @@
15591559
.repository .diff-detail-box {
15601560
padding: 7px 0;
15611561
background: var(--color-body);
1562-
line-height: 30px;
15631562
}
15641563

15651564
@media (max-width: 991.98px) {

web_src/css/review.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,6 @@
287287
}
288288

289289
#viewed-files-summary {
290-
width: 72px;
291-
height: 10px;
290+
width: 100%;
291+
height: 8px;
292292
}

0 commit comments

Comments
 (0)