Skip to content

Commit 7b9ec74

Browse files
committed
Merge branch 'fix/mobile-ui' of github.com:denyskon/gitea into fix/mobile-ui
2 parents 3b4e054 + 972ea3e commit 7b9ec74

File tree

3 files changed

+26
-34
lines changed

3 files changed

+26
-34
lines changed

templates/repo/branch/list.tmpl

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
</div>
2929
<p class="info gt-df gt-ac gt-my-2">{{svg "octicon-git-commit" 16 "gt-mr-2"}}<a href="{{.RepoLink}}/commit/{{PathEscape .DefaultBranchBranch.DBBranch.CommitID}}">{{ShortSha .DefaultBranchBranch.DBBranch.CommitID}}</a> · <span class="commit-message">{{RenderCommitMessage $.Context .DefaultBranchBranch.DBBranch.CommitMessage .RepoLink .Repository.ComposeMetas}}</span> · {{.locale.Tr "org.repo_updated"}} {{TimeSince .DefaultBranchBranch.DBBranch.CommitTime.AsTime .locale}}{{if .DefaultBranchBranch.DBBranch.Pusher}} &nbsp;{{template "shared/user/avatarlink" dict "Context" $.Context "user" .DefaultBranchBranch.DBBranch.Pusher}}{{template "shared/user/namelink" .DefaultBranchBranch.DBBranch.Pusher}}{{end}}</p>
3030
</td>
31-
<td class="right aligned overflow-visible branch-toolbar">
31+
<td class="right aligned middle aligned overflow-visible">
3232
{{if and $.IsWriter (not $.Repository.IsArchived) (not .IsDeleted)}}
33-
<button class="btn interact-bg show-create-branch-modal"
33+
<button class="btn interact-bg show-create-branch-modal gt-p-3"
3434
data-modal="#create-branch-modal"
3535
data-branch-from="{{$.DefaultBranchBranch}}"
3636
data-branch-from-urlcomponent="{{PathEscapeSegments $.DefaultBranchBranch.DBBranch.Name}}"
@@ -40,10 +40,10 @@
4040
</button>
4141
{{end}}
4242
{{if .EnableFeed}}
43-
<a role="button" class="btn interact-bg" href="{{$.FeedURL}}/rss/branch/{{PathEscapeSegments .DefaultBranchBranch.DBBranch.Name}}">{{svg "octicon-rss"}}</a>
43+
<a role="button" class="btn interact-bg gt-p-3" href="{{$.FeedURL}}/rss/branch/{{PathEscapeSegments .DefaultBranchBranch.DBBranch.Name}}">{{svg "octicon-rss"}}</a>
4444
{{end}}
4545
{{if not $.DisableDownloadSourceArchives}}
46-
<div class="ui dropdown btn interact-bg" data-tooltip-content="{{$.locale.Tr "repo.branch.download" ($.DefaultBranchBranch.DBBranch.Name)}}">
46+
<div class="ui dropdown btn interact-bg gt-p-3" data-tooltip-content="{{$.locale.Tr "repo.branch.download" ($.DefaultBranchBranch.DBBranch.Name)}}">
4747
{{svg "octicon-download"}}
4848
<div class="menu">
4949
<a class="item archive-link" href="{{$.RepoLink}}/archive/{{PathEscapeSegments $.DefaultBranchBranch.DBBranch.Name}}.zip" rel="nofollow">{{svg "octicon-file-zip"}}&nbsp;ZIP</a>
@@ -52,7 +52,7 @@
5252
</div>
5353
{{end}}
5454
{{if and $.IsWriter (not $.Repository.IsArchived) (not .IsDeleted) (not $.IsMirror)}}
55-
<button class="btn interact-bg show-modal show-rename-branch-modal"
55+
<button class="btn interact-bg gt-p-3 show-modal show-rename-branch-modal"
5656
data-is-default-branch="true"
5757
data-modal="#rename-branch-modal"
5858
data-old-branch-name="{{$.DefaultBranchBranch}}"
@@ -138,9 +138,9 @@
138138
{{end}}
139139
{{end}}
140140
</td>
141-
<td class="three wide right aligned overflow-visible branch-toolbar">
141+
<td class="three wide right aligned overflow-visible">
142142
{{if and $.IsWriter (not $.Repository.IsArchived) (not .DBBranch.IsDeleted)}}
143-
<button class="btn interact-bg show-modal show-create-branch-modal"
143+
<button class="btn interact-bg gt-p-3 show-modal show-create-branch-modal"
144144
data-branch-from="{{.DBBranch.Name}}"
145145
data-branch-from-urlcomponent="{{PathEscapeSegments .DBBranch.Name}}"
146146
data-tooltip-content="{{$.locale.Tr "repo.branch.new_branch_from" .DBBranch.Name}}"
@@ -150,10 +150,10 @@
150150
</button>
151151
{{end}}
152152
{{if $.EnableFeed}}
153-
<a role="button" class="btn interact-bg" href="{{$.FeedURL}}/rss/branch/{{PathEscapeSegments .DBBranch.Name}}">{{svg "octicon-rss"}}</a>
153+
<a role="button" class="btn interact-bg gt-p-3" href="{{$.FeedURL}}/rss/branch/{{PathEscapeSegments .DBBranch.Name}}">{{svg "octicon-rss"}}</a>
154154
{{end}}
155155
{{if and (not .DBBranch.IsDeleted) (not $.DisableDownloadSourceArchives)}}
156-
<div class="ui dropdown btn interact-bg" data-tooltip-content="{{$.locale.Tr "repo.branch.download" (.DBBranch.Name)}}">
156+
<div class="ui dropdown btn interact-bg gt-p-3" data-tooltip-content="{{$.locale.Tr "repo.branch.download" (.DBBranch.Name)}}">
157157
{{svg "octicon-download"}}
158158
<div class="menu">
159159
<a class="item archive-link" href="{{$.RepoLink}}/archive/{{PathEscapeSegments .DBBranch.Name}}.zip" rel="nofollow">{{svg "octicon-file-zip"}}&nbsp;ZIP</a>
@@ -162,7 +162,7 @@
162162
</div>
163163
{{end}}
164164
{{if and $.IsWriter (not $.Repository.IsArchived) (not .DBBranch.IsDeleted) (not $.IsMirror)}}
165-
<button class="btn interact-bg show-modal show-rename-branch-modal"
165+
<button class="btn interact-bg gt-p-3 show-modal show-rename-branch-modal"
166166
data-is-default-branch="false"
167167
data-old-branch-name="{{.DBBranch.Name}}"
168168
data-modal="#rename-branch-modal"
@@ -173,13 +173,13 @@
173173
{{end}}
174174
{{if and $.IsWriter (not $.IsMirror) (not $.Repository.IsArchived) (not .IsProtected)}}
175175
{{if .DBBranch.IsDeleted}}
176-
<button class="btn interact-bg link-action restore-branch-button" data-url="{{$.Link}}/restore?branch_id={{.DBBranch.ID}}&name={{.DBBranch.Name}}&page={{$.Page.Paginater.Current}}" data-tooltip-content="{{$.locale.Tr "repo.branch.restore" (.DBBranch.Name)}}">
176+
<button class="btn interact-bg gt-p-3 link-action restore-branch-button" data-url="{{$.Link}}/restore?branch_id={{.DBBranch.ID}}&name={{.DBBranch.Name}}&page={{$.Page.Paginater.Current}}" data-tooltip-content="{{$.locale.Tr "repo.branch.restore" (.DBBranch.Name)}}">
177177
<span class="text blue">
178178
{{svg "octicon-reply"}}
179179
</span>
180180
</button>
181181
{{else}}
182-
<button class="btn interact-bg delete-button delete-branch-button" data-url="{{$.Link}}/delete?name={{.DBBranch.Name}}&page={{$.Page.Paginater.Current}}" data-tooltip-content="{{$.locale.Tr "repo.branch.delete" (.DBBranch.Name)}}" data-name="{{.DBBranch.Name}}">
182+
<button class="btn interact-bg gt-p-3 delete-button delete-branch-button" data-url="{{$.Link}}/delete?name={{.DBBranch.Name}}&page={{$.Page.Paginater.Current}}" data-tooltip-content="{{$.locale.Tr "repo.branch.delete" (.DBBranch.Name)}}" data-name="{{.DBBranch.Name}}">
183183
{{svg "octicon-trash"}}
184184
</button>
185185
{{end}}

templates/repo/commits_table.tmpl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@
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>

web_src/css/repo.css

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1308,11 +1308,6 @@
13081308
left: 0;
13091309
}
13101310

1311-
.repository.branches .branch-toolbar .btn {
1312-
padding: .5rem;
1313-
vertical-align: middle;
1314-
}
1315-
13161311
.repository.commits .header .search input {
13171312
font-weight: var(--font-weight-normal);
13181313
padding: 5px 10px;
@@ -3163,6 +3158,9 @@ tbody.commit-list {
31633158
.commits-table .commits-table-right form {
31643159
display: flex;
31653160
align-items: center;
3161+
gap: 0.75em;
3162+
justify-content: center;
3163+
flex-wrap: wrap;
31663164
}
31673165

31683166
@media (max-width: 767.98px) {
@@ -3234,21 +3232,14 @@ tbody.commit-list {
32343232
align-items: initial !important;
32353233
margin-bottom: 6px;
32363234
}
3237-
.commits-table .commits-table-right form {
3238-
justify-content: center;
3239-
flex-wrap: wrap;
3240-
}
32413235
.commits-table .commits-table-right form > div:nth-child(1) {
3242-
order: 1;
3236+
order: 1; /* the "commit search" input */
32433237
}
32443238
.commits-table .commits-table-right form > div:nth-child(2) {
3245-
order: 3;
3246-
margin-left: 0.5rem;
3247-
margin-top: 0.5rem;
3239+
order: 3; /* the "search all" checkbox */
32483240
}
32493241
.commits-table .commits-table-right form > button:nth-child(3) {
3250-
order: 2;
3251-
margin-left: 0.25rem;
3242+
order: 2; /* the "search" button */
32523243
}
32533244
.commit-table {
32543245
overflow-x: auto;
@@ -3260,7 +3251,8 @@ tbody.commit-list {
32603251
.commit-table .commit-list span.message-wrapper {
32613252
max-width: none;
32623253
}
3263-
.commit-table .commit-list tr td:first-child, .commit-table .commit-list tr td:last-child {
3254+
.commit-table .commit-list tr td:first-child,
3255+
.commit-table .commit-list tr td:last-child {
32643256
white-space: nowrap;
32653257
}
32663258
.commit-table .commit-list td.author {

0 commit comments

Comments
 (0)