Skip to content

Commit 917ca5d

Browse files
denyskonwxiaoguangsilverwindGiteaBot
authored
Several fixes for mobile UI (#25634) (#25689)
Backport #25634 Resolves #25622 <details> <summary>Screenshots</summary> ![Bildschirmfoto vom 2023-07-02 20-47-34](https://github.com/go-gitea/gitea/assets/47871822/a8a0bff6-9ae3-48f3-b008-00c196a3f8fd) ![Bildschirmfoto vom 2023-07-02 20-47-45](https://github.com/go-gitea/gitea/assets/47871822/172a0021-af74-4690-aa67-0e66688ce733) ![Bildschirmfoto vom 2023-07-02 20-48-37](https://github.com/go-gitea/gitea/assets/47871822/14572ebd-0106-4c8a-ba27-b6b631375ee6) ![Bildschirmfoto vom 2023-07-02 20-49-08](https://github.com/go-gitea/gitea/assets/47871822/7c0ba3aa-1712-482c-aae9-13394dbdaf8a) ![Bildschirmfoto vom 2023-07-02 20-50-28](https://github.com/go-gitea/gitea/assets/47871822/8bd68e26-099a-4abd-8817-16d52af13167) ![Bildschirmfoto vom 2023-07-02 20-51-46](https://github.com/go-gitea/gitea/assets/47871822/3beab8c6-3747-4829-be50-bafaed11000c) ![Bildschirmfoto vom 2023-07-02 20-54-12](https://github.com/go-gitea/gitea/assets/47871822/51f82ef3-a32c-4c27-9056-e8711ed469cc) </details> --------- Co-authored-by: wxiaoguang <[email protected]> Co-authored-by: silverwind <[email protected]> Co-authored-by: Giteabot <[email protected]>
1 parent e595dfe commit 917ca5d

File tree

11 files changed

+72
-51
lines changed

11 files changed

+72
-51
lines changed

templates/repo/branch/list.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<a href="{{.RepoLink}}/src/branch/{{PathEscapeSegments .DefaultBranch}}">{{.DefaultBranch}}</a>
2626
<p class="info gt-df gt-ac gt-my-2">{{svg "octicon-git-commit" 16 "gt-mr-2"}}<a href="{{.RepoLink}}/commit/{{PathEscape .DefaultBranchBranch.Commit.ID.String}}">{{ShortSha .DefaultBranchBranch.Commit.ID.String}}</a> · <span class="commit-message">{{RenderCommitMessage $.Context .DefaultBranchBranch.Commit.CommitMessage .RepoLink .Repository.ComposeMetas}}</span> · {{.locale.Tr "org.repo_updated"}} {{TimeSince .DefaultBranchBranch.Commit.Committer.When .locale}}</p>
2727
</td>
28-
<td class="right aligned overflow-visible">
28+
<td class="right aligned middle aligned overflow-visible">
2929
{{if and $.IsWriter (not $.Repository.IsArchived) (not .IsDeleted)}}
3030
<button class="btn interact-bg show-create-branch-modal gt-p-3"
3131
data-modal="#create-branch-modal"

templates/repo/commits_list.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div class="ui attached table segment commit-table">
2-
<table class="ui very basic striped table unstackable fixed" id="commits-table">
2+
<table class="ui very basic striped table unstackable" id="commits-table">
33
<thead>
44
<tr>
55
<th class="three wide">{{.locale.Tr "repo.commits.author"}}</th>

templates/repo/commits_table.tmpl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,23 @@
88
{{.locale.Tr "repo.commits.no_commits" $.BaseBranch $.HeadBranch}} {{if .RefName}}({{.RefName}}){{end}}
99
{{end}}
1010
</div>
11-
<div class="commits-table-right gt-df gt-ac">
11+
<div class="commits-table-right">
1212
{{if .PageIsCommits}}
1313
<form class="ignore-dirty" action="{{.RepoLink}}/commits/{{.BranchNameSubURL}}/search">
1414
<div class="ui tiny search input">
1515
<input name="q" placeholder="{{.locale.Tr "repo.commits.search"}}" value="{{.Keyword}}" autofocus>
1616
</div>
17-
&nbsp;
18-
<div class="ui checkbox">
19-
<input type="checkbox" name="all" id="all" value="true" {{.All}}>
20-
<label for="all">{{.locale.Tr "repo.commits.search_all"}} &nbsp;&nbsp;</label>
17+
18+
<div class="ui tiny checkbox">
19+
<input type="checkbox" name="all" value="true" {{.All}}>
20+
<label>{{.locale.Tr "repo.commits.search_all"}}</label>
2121
</div>
2222
<button class="ui primary tiny button gt-mr-0" data-panel="#add-deploy-key-panel" data-tooltip-content={{.locale.Tr "repo.commits.search.tooltip"}}>{{.locale.Tr "repo.commits.find"}}</button>
2323
</form>
2424
{{else if .IsDiffCompare}}
25-
<a href="{{$.CommitRepoLink}}/commit/{{.BeforeCommitID | PathEscape}}" class="ui green sha label">{{if not .BaseIsCommit}}{{if .BaseIsBranch}}{{svg "octicon-git-branch"}}{{else if .BaseIsTag}}{{svg "octicon-tag"}}{{end}}{{.BaseBranch}}{{else}}{{ShortSha .BaseBranch}}{{end}}</a>
25+
<a href="{{$.CommitRepoLink}}/commit/{{.BeforeCommitID | PathEscape}}" class="ui green sha label gt-mx-0">{{if not .BaseIsCommit}}{{if .BaseIsBranch}}{{svg "octicon-git-branch"}}{{else if .BaseIsTag}}{{svg "octicon-tag"}}{{end}}{{.BaseBranch}}{{else}}{{ShortSha .BaseBranch}}{{end}}</a>
2626
...
27-
<a href="{{$.CommitRepoLink}}/commit/{{.AfterCommitID | PathEscape}}" class="ui green sha label">{{if not .HeadIsCommit}}{{if .HeadIsBranch}}{{svg "octicon-git-branch"}}{{else if .HeadIsTag}}{{svg "octicon-tag"}}{{end}}{{.HeadBranch}}{{else}}{{ShortSha .HeadBranch}}{{end}}</a>
27+
<a href="{{$.CommitRepoLink}}/commit/{{.AfterCommitID | PathEscape}}" class="ui green sha label gt-mx-0">{{if not .HeadIsCommit}}{{if .HeadIsBranch}}{{svg "octicon-git-branch"}}{{else if .HeadIsTag}}{{svg "octicon-tag"}}{{end}}{{.HeadBranch}}{{else}}{{ShortSha .HeadBranch}}{{end}}</a>
2828
{{end}}
2929
</div>
3030
</h4>

templates/repo/issue/labels/labels_selector_field.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div class="ui {{if or (not .HasIssuesOrPullsWritePermission) .Repository.IsArchived}}disabled{{end}} floating jump select-label dropdown">
2-
<span class="text gt-df gt-ac muted">
2+
<span class="text muted flex-text-block">
33
<strong>{{.locale.Tr "repo.issues.new.labels"}}</strong>
44
{{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}}
55
{{svg "octicon-gear" 16 "gt-ml-2"}}

templates/repo/issue/new_form.tmpl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@
5959

6060
<input id="milestone_id" name="milestone_id" type="hidden" value="{{.milestone_id}}">
6161
<div class="ui {{if not .HasIssuesOrPullsWritePermission}}disabled{{end}} floating jump select-milestone dropdown">
62-
<span class="text">
62+
<span class="text flex-text-block">
6363
<strong>{{.locale.Tr "repo.issues.new.milestone"}}</strong>
6464
{{if .HasIssuesOrPullsWritePermission}}
65-
{{svg "octicon-gear"}}
65+
{{svg "octicon-gear" 16 "gt-ml-2"}}
6666
{{end}}
6767
</span>
6868
<div class="menu">
@@ -86,10 +86,10 @@
8686

8787
<input id="project_id" name="project_id" type="hidden" value="{{.project_id}}">
8888
<div class="ui {{if not .HasIssuesOrPullsWritePermission}}disabled{{end}} floating jump select-project dropdown">
89-
<span class="text">
89+
<span class="text flex-text-block">
9090
<strong>{{.locale.Tr "repo.issues.new.projects"}}</strong>
9191
{{if .HasIssuesOrPullsWritePermission}}
92-
{{svg "octicon-gear"}}
92+
{{svg "octicon-gear" 16 "gt-ml-2"}}
9393
{{end}}
9494
</span>
9595
<div class="menu">
@@ -144,10 +144,10 @@
144144
<div class="ui divider"></div>
145145
<input id="assignee_ids" name="assignee_ids" type="hidden" value="{{.assignee_ids}}">
146146
<div class="ui {{if not .HasIssuesOrPullsWritePermission}}disabled{{end}} floating jump select-assignees dropdown">
147-
<span class="text">
147+
<span class="text flex-text-block">
148148
<strong>{{.locale.Tr "repo.issues.new.assignees"}}</strong>
149149
{{if .HasIssuesOrPullsWritePermission}}
150-
{{svg "octicon-gear"}}
150+
{{svg "octicon-gear" 16 "gt-ml-2"}}
151151
{{end}}
152152
</span>
153153
<div class="filter menu" data-id="#assignee_ids">

templates/repo/issue/view_content/sidebar.tmpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@
127127
<div class="ui divider"></div>
128128

129129
<div class="ui {{if or (not .HasIssuesOrPullsWritePermission) .Repository.IsArchived}}disabled{{end}} floating jump select-milestone dropdown">
130-
<a class="text gt-df gt-ac muted">
130+
<a class="text muted flex-text-block">
131131
<strong>{{.locale.Tr "repo.issues.new.milestone"}}</strong>
132132
{{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}}
133133
{{svg "octicon-gear" 16 "gt-ml-2"}}
@@ -153,7 +153,7 @@
153153
<div class="ui divider"></div>
154154

155155
<div class="ui {{if or (not .HasIssuesOrPullsWritePermission) .Repository.IsArchived}}disabled{{end}} floating jump select-project dropdown">
156-
<a class="text gt-df gt-ac muted">
156+
<a class="text muted flex-text-block">
157157
<strong>{{.locale.Tr "repo.issues.new.projects"}}</strong>
158158
{{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}}
159159
{{svg "octicon-gear" 16 "gt-ml-2"}}
@@ -207,7 +207,7 @@
207207

208208
<input id="assignee_id" name="assignee_id" type="hidden" value="{{.assignee_id}}">
209209
<div class="ui {{if or (not .HasIssuesOrPullsWritePermission) .Repository.IsArchived}}disabled{{end}} floating jump select-assignees-modify dropdown">
210-
<a class="text gt-df gt-ac muted">
210+
<a class="text muted flex-text-block">
211211
<strong>{{.locale.Tr "repo.issues.new.assignees"}}</strong>
212212
{{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}}
213213
{{svg "octicon-gear" 16 "gt-ml-2"}}

templates/shared/combomarkdowneditor.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Template Attributes:
1919
</div>
2020
{{end}}
2121
<div class="ui tab active" data-tab-panel="markdown-writer">
22-
<markdown-toolbar class="gt-gap-3">
22+
<markdown-toolbar>
2323
<div class="markdown-toolbar-group">
2424
<md-header class="markdown-toolbar-button" data-tooltip-content="{{.locale.Tr "editor.buttons.heading.tooltip"}}">{{svg "octicon-heading"}}</md-header>
2525
<md-bold class="markdown-toolbar-button" data-tooltip-content="{{.locale.Tr "editor.buttons.bold.tooltip"}}">{{svg "octicon-bold"}}</md-bold>

web_src/css/admin.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,7 @@
4747
.admin .ui.table.segment {
4848
overflow-x: auto; /* if the screen width is small, many wide tables (eg: user list) need scroll bars */
4949
}
50+
51+
.admin .table th {
52+
white-space: nowrap;
53+
}

web_src/css/editor/combomarkdowneditor.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
display: flex;
88
align-items: center;
99
padding-bottom: 10px;
10+
gap: .5rem;
11+
flex-wrap: wrap;
1012
}
1113

1214
.combo-markdown-editor .markdown-toolbar-group {

web_src/css/repo.css

Lines changed: 43 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -657,9 +657,26 @@
657657
.repository.view.issue .issue-title {
658658
flex-direction: column;
659659
}
660+
.repository.view.issue .issue-title-buttons,
661+
.repository.view.issue .edit-buttons {
662+
width: 100%;
663+
justify-content: space-between;
664+
}
660665
.repository.view.issue .edit-buttons {
661666
margin-top: .5rem;
662667
}
668+
.comment.form .issue-content-left .avatar {
669+
display: none;
670+
}
671+
.comment.form .issue-content-left .content {
672+
margin-left: 0 !important;
673+
}
674+
.comment.form .issue-content-left .content::before,
675+
.comment.form .issue-content-left .content::after,
676+
.comment.form .content .form::before,
677+
.comment.form .content .form::after {
678+
display: none;
679+
}
663680
}
664681

665682
.repository.view.issue .issue-title {
@@ -1199,7 +1216,14 @@
11991216
text-align: left;
12001217
}
12011218

1202-
.repository.compare.pull .choose.branch .svg {
1219+
.repository .choose.branch {
1220+
display: flex;
1221+
align-items: center;
1222+
gap: 8px;
1223+
flex-wrap: wrap;
1224+
}
1225+
1226+
.repository .choose.branch .svg {
12031227
margin-right: 10px;
12041228
}
12051229

@@ -1291,10 +1315,9 @@
12911315
padding: 5px 10px;
12921316
}
12931317

1294-
.repository #commits-table thead th:first-of-type {
1295-
padding-left: 15px;
1318+
.repository #commits-table td:not(.message) {
1319+
white-space: nowrap;
12961320
}
1297-
12981321
.repository #commits-table thead .sha {
12991322
width: 200px;
13001323
}
@@ -2043,12 +2066,15 @@
20432066
.repository .ui.segment.sub-menu .list {
20442067
width: 100%;
20452068
display: flex;
2046-
align-items: center;
2069+
align-items: stretch;
20472070
}
20482071

20492072
.repository .ui.segment.sub-menu .list .item {
20502073
width: 100%;
20512074
color: var(--color-text);
2075+
display: flex;
2076+
align-items: center;
2077+
justify-content: center;
20522078
}
20532079

20542080
.repository .ui.segment.sub-menu .list .item:first-of-type {
@@ -2664,6 +2690,7 @@ tbody.commit-list {
26642690
/* in the commit list, messages can wrap so we can use inline */
26652691
.commit-list .message-wrapper {
26662692
display: inline;
2693+
overflow-wrap: anywhere;
26672694
}
26682695

26692696
/* but in the repo-files-table we cannot */
@@ -3112,6 +3139,14 @@ tbody.commit-list {
31123139
box-shadow: 0 0.5rem 1rem var(--color-shadow) !important;
31133140
}
31143141

3142+
.commits-table .commits-table-right form {
3143+
display: flex;
3144+
align-items: center;
3145+
gap: 0.75em;
3146+
justify-content: center;
3147+
flex-wrap: wrap;
3148+
}
3149+
31153150
@media (max-width: 767.98px) {
31163151
.repository.file.list #repo-files-table .entry,
31173152
.repository.file.list #repo-files-table .commit-list {
@@ -3181,21 +3216,14 @@ tbody.commit-list {
31813216
align-items: initial !important;
31823217
margin-bottom: 6px;
31833218
}
3184-
.commits-table .commits-table-right form {
3185-
display: flex;
3186-
flex-wrap: wrap;
3187-
}
31883219
.commits-table .commits-table-right form > div:nth-child(1) {
3189-
order: 1;
3220+
order: 1; /* the "commit search" input */
31903221
}
31913222
.commits-table .commits-table-right form > div:nth-child(2) {
3192-
order: 3;
3193-
margin-left: 0.5rem;
3194-
margin-top: 0.5rem;
3223+
order: 3; /* the "search all" checkbox */
31953224
}
31963225
.commits-table .commits-table-right form > button:nth-child(3) {
3197-
order: 2;
3198-
margin-left: 0.25rem;
3226+
order: 2; /* the "search" button */
31993227
}
32003228
.commit-table {
32013229
overflow-x: auto;
@@ -3204,17 +3232,6 @@ tbody.commit-list {
32043232
.commit-table th.sha {
32053233
display: none !important;
32063234
}
3207-
.commit-table .commit-list span.message-wrapper {
3208-
max-width: none;
3209-
}
3210-
.commit-table .commit-list tr td:last-child {
3211-
display: block;
3212-
width: max-content;
3213-
}
3214-
.commit-table .commit-list td.author {
3215-
display: block;
3216-
width: calc(100% + 0.5rem);
3217-
}
32183235
.commit-table .commit-list .copy-commit-sha {
32193236
display: none !important;
32203237
}

web_src/js/components/RepoActionView.vue

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,8 @@ export function ansiLogToHTML(line) {
516516
517517
<style scoped>
518518
.action-view-body {
519+
padding-top: 12px;
520+
padding-bottom: 12px;
519521
display: flex;
520522
gap: 12px;
521523
}
@@ -549,11 +551,6 @@ export function ansiLogToHTML(line) {
549551
margin: 0 0 0 28px;
550552
}
551553
552-
.action-view-left, .action-view-right {
553-
padding-top: 12px;
554-
padding-bottom: 12px;
555-
}
556-
557554
/* ================ */
558555
/* action view left */
559556
@@ -767,6 +764,7 @@ export function ansiLogToHTML(line) {
767764
background-color: var(--color-console-bg);
768765
max-height: 100%;
769766
border-radius: 0 0 var(--border-radius) var(--border-radius);
767+
z-index: 0;
770768
}
771769
772770
.job-step-container .job-step-summary {

0 commit comments

Comments
 (0)