Skip to content

Commit 4617bb6

Browse files
silverwindlafrikszeripath
authored
Misc UI fixes, add secondary color (#13378)
* Misc UI fixes, add secondary color - Add secondary color, primarily used in arc-green currently - Convert icons on release page to SVG - Improve resolved conversation placeholder - Diff fixes on arc-green - Misc color tweaks * fix comment header, adjust arc-green dropzone * label margin, sidebar margin * flexbox commits table and add primary button styles * tooltip styles * file header fixes Co-authored-by: Lauris BH <[email protected]> Co-authored-by: zeripath <[email protected]>
1 parent 543697e commit 4617bb6

File tree

17 files changed

+300
-234
lines changed

17 files changed

+300
-234
lines changed

templates/repo/blame.tmpl

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
11
<div class="{{TabSizeClass .Editorconfig .FileName}} non-diff-file-content">
2-
<h4 class="file-header ui top attached header">
3-
<div class="file-header-left">
2+
<h4 class="file-header ui top attached header df ac sb">
3+
<div class="file-header-left df ac">
44
<div class="file-info text grey normal mono">
55
<div class="file-info-entry">
66
{{.NumLines}} {{.i18n.Tr (TrN .i18n.Lang .NumLines "repo.line" "repo.lines") }}
77
</div>
88
<div class="file-info-entry">{{FileSize .FileSize}}</div>
99
</div>
1010
</div>
11-
<div class="file-header-right">
12-
<div class="ui right file-actions">
13-
<div class="ui buttons">
14-
<a class="ui button" href="{{EscapePound $.RawFileLink}}">{{.i18n.Tr "repo.file_raw"}}</a>
15-
{{if not .IsViewCommit}}
16-
<a class="ui button" href="{{.RepoLink}}/src/commit/{{.CommitID}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.file_permalink"}}</a>
17-
{{end}}
18-
<a class="ui button" href="{{.RepoLink}}/src/{{EscapePound .BranchNameSubURL}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.normal_view"}}</a>
19-
<a class="ui button" href="{{.RepoLink}}/commits/{{EscapePound .BranchNameSubURL}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.file_history"}}</a>
20-
</div>
11+
<div class="file-header-right file-actions df ac">
12+
<div class="ui buttons">
13+
<a class="ui tiny button" href="{{EscapePound $.RawFileLink}}">{{.i18n.Tr "repo.file_raw"}}</a>
14+
{{if not .IsViewCommit}}
15+
<a class="ui tiny button" href="{{.RepoLink}}/src/commit/{{.CommitID}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.file_permalink"}}</a>
16+
{{end}}
17+
<a class="ui tiny button" href="{{.RepoLink}}/src/{{EscapePound .BranchNameSubURL}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.normal_view"}}</a>
18+
<a class="ui tiny button" href="{{.RepoLink}}/commits/{{EscapePound .BranchNameSubURL}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.file_history"}}</a>
2119
</div>
2220
</div>
2321
</h4>

templates/repo/branch/list.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
{{svg "octicon-shield-lock"}}
5757
{{end}}
5858
<a href="{{$.RepoLink}}/src/branch/{{.Name | EscapePound}}">{{.Name}}</a>
59-
<p class="info">{{svg "octicon-git-commit"}}<a href="{{$.RepoLink}}/commit/{{.Commit.ID.String}}">{{ShortSha .Commit.ID.String}}</a> · <span class="commit-message">{{RenderCommitMessage .Commit.CommitMessage $.RepoLink $.Repository.ComposeMetas}}</span> · {{$.i18n.Tr "org.repo_updated"}} {{TimeSince .Commit.Committer.When $.i18n.Lang}}</p>
59+
<p class="info df ac my-2">{{svg "octicon-git-commit" 16 "mr-2"}}<a href="{{$.RepoLink}}/commit/{{.Commit.ID.String}}">{{ShortSha .Commit.ID.String}}</a> · <span class="commit-message">{{RenderCommitMessage .Commit.CommitMessage $.RepoLink $.Repository.ComposeMetas}}</span> · {{$.i18n.Tr "org.repo_updated"}} {{TimeSince .Commit.Committer.When $.i18n.Lang}}</p>
6060
{{end}}
6161
</td>
6262
<td class="three wide ui">

templates/repo/commits_table.tmpl

Lines changed: 26 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,29 @@
1-
<h4 class="ui top attached header">
2-
<div class="ui stackable grid">
3-
<div class="five wide column">
4-
{{if or .PageIsCommits (gt .CommitCount 0)}}
5-
{{.CommitCount}} {{.i18n.Tr "repo.commits.commits"}} {{if .Branch}}({{.Branch}}){{end}}
6-
{{else}}
7-
{{.i18n.Tr "repo.commits.no_commits" $.BaseBranch $.HeadBranch }} {{if .Branch}}({{.Branch}}){{end}}
8-
{{end}}
9-
</div>
10-
<div class="eleven wide right aligned column">
11-
{{if .PageIsCommits}}
12-
<form class="ignore-dirty" action="{{.RepoLink}}/commits/{{.BranchNameSubURL | EscapePound}}/search">
13-
<div class="ui tiny search input">
14-
<input name="q" placeholder="{{.i18n.Tr "repo.commits.search"}}" value="{{.Keyword}}" autofocus>
15-
</div>
16-
&nbsp;
17-
<div class="ui checkbox">
18-
<input type="checkbox" name="all" id="all" value="true" {{.All}}>
19-
<label for="all">{{.i18n.Tr "repo.commits.search_all"}} &nbsp;&nbsp;</label>
20-
</div>
21-
<button class="ui blue tiny button" data-panel="#add-deploy-key-panel" data-tooltip={{.i18n.Tr "repo.commits.search.tooltip"}}>{{.i18n.Tr "repo.commits.find"}}</button>
22-
</form>
23-
{{else if .IsDiffCompare}}
24-
<a href="{{$.CommitRepoLink}}/commit/{{.BeforeCommitID}}" 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-
...
26-
<a href="{{$.CommitRepoLink}}/commit/{{.AfterCommitID}}" 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-
{{end}}
28-
</div>
1+
<h4 class="ui top attached header commits-table df ac sb">
2+
<div class="commits-table-left df ac">
3+
{{if or .PageIsCommits (gt .CommitCount 0)}}
4+
{{.CommitCount}} {{.i18n.Tr "repo.commits.commits"}} {{if .Branch}}({{.Branch}}){{end}}
5+
{{else}}
6+
{{.i18n.Tr "repo.commits.no_commits" $.BaseBranch $.HeadBranch }} {{if .Branch}}({{.Branch}}){{end}}
7+
{{end}}
8+
</div>
9+
<div class="commits-table-right df ac">
10+
{{if .PageIsCommits}}
11+
<form class="ignore-dirty" action="{{.RepoLink}}/commits/{{.BranchNameSubURL | EscapePound}}/search">
12+
<div class="ui tiny search input">
13+
<input name="q" placeholder="{{.i18n.Tr "repo.commits.search"}}" value="{{.Keyword}}" autofocus>
14+
</div>
15+
&nbsp;
16+
<div class="ui checkbox">
17+
<input type="checkbox" name="all" id="all" value="true" {{.All}}>
18+
<label for="all">{{.i18n.Tr "repo.commits.search_all"}} &nbsp;&nbsp;</label>
19+
</div>
20+
<button class="ui primary tiny button mr-0" data-panel="#add-deploy-key-panel" data-tooltip={{.i18n.Tr "repo.commits.search.tooltip"}}>{{.i18n.Tr "repo.commits.find"}}</button>
21+
</form>
22+
{{else if .IsDiffCompare}}
23+
<a href="{{$.CommitRepoLink}}/commit/{{.BeforeCommitID}}" 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>
24+
...
25+
<a href="{{$.CommitRepoLink}}/commit/{{.AfterCommitID}}" 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>
26+
{{end}}
2927
</div>
3028
</h4>
3129

templates/repo/diff/box.tmpl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -173,13 +173,13 @@
173173
<td class="lines-type-marker"></td>
174174
<td class="add-comment-left">
175175
{{if and $resolved (eq $line.GetCommentSide "previous")}}
176-
<div class="ui top attached header">
176+
<div class="ui top attached header resolved-placeholder">
177177
<span class="ui grey text left"><b>{{$resolveDoer.Name}}</b> {{$.i18n.Tr "repo.issues.review.resolved_by"}}</span>
178-
<button id="show-outdated-{{(index $line.Comments 0).ID}}" data-comment="{{(index $line.Comments 0).ID}}" class="ui compact right labeled button show-outdated">
178+
<button id="show-outdated-{{(index $line.Comments 0).ID}}" data-comment="{{(index $line.Comments 0).ID}}" class="ui tiny right labeled button show-outdated">
179179
{{svg "octicon-unfold"}}
180180
{{$.i18n.Tr "repo.issues.review.show_resolved"}}
181181
</button>
182-
<button id="hide-outdated-{{(index $line.Comments 0).ID}}" data-comment="{{(index $line.Comments 0).ID}}" class="hide ui compact right labeled button hide-outdated">
182+
<button id="hide-outdated-{{(index $line.Comments 0).ID}}" data-comment="{{(index $line.Comments 0).ID}}" class="hide ui tiny right labeled button hide-outdated">
183183
{{svg "octicon-fold"}}
184184
{{$.i18n.Tr "repo.issues.review.hide_resolved"}}
185185
</button>
@@ -207,15 +207,15 @@
207207
</td>
208208
<td class="lines-num"></td>
209209
<td class="lines-type-marker"></td>
210-
<td class="add-comment-right">
210+
<td class="add-comment-right resolved-placeholder">
211211
{{if and $resolved (eq $line.GetCommentSide "proposed")}}
212212
<div class="ui top attached header">
213213
<span class="ui grey text left"><b>{{$resolveDoer.Name}}</b> {{$.i18n.Tr "repo.issues.review.resolved_by"}}</span>
214-
<button id="show-outdated-{{(index $line.Comments 0).ID}}" data-comment="{{(index $line.Comments 0).ID}}" class="ui compact right labeled button show-outdated">
214+
<button id="show-outdated-{{(index $line.Comments 0).ID}}" data-comment="{{(index $line.Comments 0).ID}}" class="ui tiny right labeled button show-outdated">
215215
{{svg "octicon-unfold"}}
216216
{{$.i18n.Tr "repo.issues.review.show_resolved"}}
217217
</button>
218-
<button id="hide-outdated-{{(index $line.Comments 0).ID}}" data-comment="{{(index $line.Comments 0).ID}}" class="hide ui compact right labeled button hide-outdated">
218+
<button id="hide-outdated-{{(index $line.Comments 0).ID}}" data-comment="{{(index $line.Comments 0).ID}}" class="hide ui tiny right labeled button hide-outdated">
219219
{{svg "octicon-fold"}}
220220
{{$.i18n.Tr "repo.issues.review.hide_resolved"}}
221221
</button>

templates/repo/diff/comment_form.tmpl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
{{if and $.root.SignedUserID (not $.Repository.IsArchived)}}
22
{{if $.hidden}}
3-
<button class="comment-form-reply ui green labeled icon tiny button"><i class="reply icon"></i> {{$.root.i18n.Tr "repo.diff.comment.reply"}}</button>
3+
<button class="comment-form-reply ui green labeled icon tiny button">
4+
{{svg "octicon-reply" 16 "reply icon mr-2"}}{{$.root.i18n.Tr "repo.diff.comment.reply"}}
5+
</button>
46
{{end}}
57
<form class="ui form {{if $.hidden}}hide comment-form comment-form-reply{{end}}" action="{{$.root.Issue.HTMLURL}}/files/reviews/comments" method="post">
68
{{$.root.CsrfTokenHtml}}

templates/repo/diff/comments.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
</span>
2828
{{else}}
2929
<span class="text grey">
30-
<a class="mr-2" {{if gt .Poster.ID 0}}href="{{.Poster.HomeLink}}"{{end}}>
30+
<a {{if gt .Poster.ID 0}}href="{{.Poster.HomeLink}}"{{end}}>
3131
{{.Poster.GetDisplayName}}
3232
</a>
3333
{{$.root.i18n.Tr "repo.issues.commented_at" .HashTag $createdStr | Safe}}

templates/repo/diff/section_unified.tmpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@
4040
<td colspan="2" class="lines-num"></td>
4141
<td class="add-comment-left add-comment-right" colspan="2">
4242
{{if $resolved}}
43-
<div class = "ui attached header">
43+
<div class="ui attached header resolved-placeholder">
4444
<span class="ui grey text left"><b>{{$resolveDoer.Name}}</b> {{$.root.i18n.Tr "repo.issues.review.resolved_by"}}</span>
45-
<button id="show-outdated-{{(index $line.Comments 0).ID}}" data-comment="{{(index $line.Comments 0).ID}}" class="ui compact right labeled button show-outdated">
45+
<button id="show-outdated-{{(index $line.Comments 0).ID}}" data-comment="{{(index $line.Comments 0).ID}}" class="ui tiny right labeled button show-outdated">
4646
{{svg "octicon-unfold"}}
4747
{{$.root.i18n.Tr "repo.issues.review.show_resolved"}}
4848
</button>
49-
<button id="hide-outdated-{{(index $line.Comments 0).ID}}" data-comment="{{(index $line.Comments 0).ID}}" class="hide ui compact right labeled button hide-outdated">
49+
<button id="hide-outdated-{{(index $line.Comments 0).ID}}" data-comment="{{(index $line.Comments 0).ID}}" class="hide ui tiny right labeled button hide-outdated">
5050
{{svg "octicon-fold"}}
5151
{{$.root.i18n.Tr "repo.issues.review.hide_resolved"}}
5252
</button>

templates/repo/issue/view_content/comments.tmpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@
1919
</a>
2020
{{end}}
2121
<div class="content">
22-
<div class="ui top attached header">
23-
<div class="header-left df ac">
22+
<div class="ui top attached header comment-header df ac sb">
23+
<div class="comment-header-left df ac">
2424
{{if .OriginalAuthor }}
2525
<span class="text black"><i class="fa {{MigrationIcon $.Repository.GetOriginalURLHostname}}" aria-hidden="true"></i> {{ .OriginalAuthor }}</span><span class="text grey"> {{$.i18n.Tr "repo.issues.commented_at" .Issue.HashTag $createdStr | Safe}} {{if $.Repository.OriginalURL}}</span><span class="text migrate">({{$.i18n.Tr "repo.migrated_from" $.Repository.OriginalURL $.Repository.GetOriginalURLHostname | Safe }}){{end}}</span>
2626
{{else}}
2727
<span class="text grey"><a class="author"{{if gt .Poster.ID 0}} href="{{.Poster.HomeLink}}"{{end}}>{{.Poster.GetDisplayName}}</a> {{$.i18n.Tr "repo.issues.commented_at" .HashTag $createdStr | Safe}}</span>
2828
{{end}}
2929
</div>
30-
<div class="header-right actions df ac">
30+
<div class="comment-header-right actions df ac">
3131
{{if not $.Repository.IsArchived}}
3232
{{if eq .PosterID .Issue.PosterID }}
3333
<div class="ui basic label">

templates/repo/issue/view_content/sidebar.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@
301301

302302
<div class="ui watching">
303303
<span class="text"><strong>{{.i18n.Tr "notification.notifications"}}</strong></span>
304-
<div>
304+
<div class="mt-3">
305305
<form method="POST" action="{{$.RepoLink}}/issues/{{.Issue.Index}}/watch">
306306
<input type="hidden" name="watch" value="{{if $.IssueWatch.IsWatching}}0{{else}}1{{end}}" />
307307
{{$.CsrfTokenHtml}}
@@ -519,7 +519,7 @@
519519
<div class="ui divider"></div>
520520
<div class="ui watching">
521521
<div>
522-
<button class="fluid ui show-modal button {{if .Issue.IsLocked }} negative {{ end }}" data-modal="#lock">
522+
<button class="fluid ui show-modal button {{if .Issue.IsLocked }} negative {{ end }}" data-modal="#lock">
523523
{{if .Issue.IsLocked}}
524524
{{svg "octicon-key"}}
525525
{{.i18n.Tr "repo.issues.unlock"}}

templates/repo/release/list.tmpl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,17 @@
2828
<span class="ui green label">{{$.i18n.Tr "repo.release.stable"}}</span>
2929
{{end}}
3030
<span class="tag text blue">
31-
<a href="{{$.RepoLink}}/src/tag/{{.TagName | EscapePound}}" rel="nofollow"><i class="tag icon"></i> {{.TagName}}</a>
31+
<a href="{{$.RepoLink}}/src/tag/{{.TagName | EscapePound}}" rel="nofollow">{{svg "octicon-tag" 16 "mr-2"}}{{.TagName}}</a>
3232
</span>
3333
<span class="commit">
34-
<a href="{{$.RepoLink}}/src/commit/{{.Sha1}}" rel="nofollow"><i class="code icon"></i> {{ShortSha .Sha1}}</a>
34+
<a class="mono" href="{{$.RepoLink}}/src/commit/{{.Sha1}}" rel="nofollow">{{svg "octicon-git-commit" 16 "mr-2"}}{{ShortSha .Sha1}}</a>
3535
</span>
3636
{{end}}
3737
</div>
3838
<div class="ui twelve wide column detail">
3939
{{if .IsTag}}
4040
<h4>
41-
<a href="{{$.RepoLink}}/src/tag/{{.TagName | EscapePound}}" rel="nofollow"><i class="tag icon"></i> {{.TagName}}</a>
41+
<a href="{{$.RepoLink}}/src/tag/{{.TagName | EscapePound}}" rel="nofollow">{{svg "octicon-tag" 16 "mr-2"}}{{.TagName}}</a>
4242
</h4>
4343
<p class="text grey">
4444
{{ if gt .Publisher.ID 0 }}
@@ -51,7 +51,7 @@
5151
</p>
5252
<div class="download">
5353
{{if $.Permission.CanRead $.UnitTypeCode}}
54-
<a href="{{$.RepoLink}}/src/commit/{{.Sha1}}" rel="nofollow"><i class="code icon"></i> {{ShortSha .Sha1}}</a>
54+
<a class="mono" href="{{$.RepoLink}}/src/commit/{{.Sha1}}" rel="nofollow">{{svg "octicon-git-commit" 16 "mr-2"}}{{ShortSha .Sha1}}</a>
5555
<a href="{{$.RepoLink}}/archive/{{.TagName | EscapePound}}.zip" rel="nofollow">{{svg "octicon-file-zip"}}&nbsp;ZIP</a>
5656
<a href="{{$.RepoLink}}/archive/{{.TagName | EscapePound}}.tar.gz">{{svg "octicon-file-zip"}}&nbsp;TAR.GZ</a>
5757
{{end}}
@@ -64,7 +64,7 @@
6464
<p class="text grey">
6565
<span class="author">
6666
{{if .OriginalAuthor}}
67-
<i class="fa fa-github" aria-hidden="true"></i>
67+
{{svg "octicon-mark-github"}}
6868
{{.OriginalAuthor}}
6969
{{else if .Publisher}}
7070
<img class="img-10" src="{{.Publisher.RelAvatarLink}}">

templates/repo/view_file.tmpl

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div class="{{TabSizeClass .Editorconfig .FileName}} non-diff-file-content">
2-
<h4 class="file-header ui top attached header">
2+
<h4 class="file-header ui top attached header df ac sb">
33
<div class="file-header-left df ac">
44
{{if .ReadmeInList}}
55
{{svg "octicon-book" 16 "mr-3"}}
@@ -31,31 +31,29 @@
3131
{{end}}
3232
</div>
3333
{{if not .ReadmeInList}}
34-
<div class="file-header-right df ac">
35-
<div class="ui right file-actions">
36-
<div class="ui buttons">
37-
<a class="ui button" href="{{EscapePound $.RawFileLink}}">{{.i18n.Tr "repo.file_raw"}}</a>
38-
{{if not .IsViewCommit}}
39-
<a class="ui button" href="{{.RepoLink}}/src/commit/{{.CommitID}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.file_permalink"}}</a>
40-
{{end}}
41-
{{if .IsTextFile}}
42-
<a class="ui button" href="{{.RepoLink}}/blame/{{EscapePound .BranchNameSubURL}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.blame"}}</a>
43-
{{end}}
44-
<a class="ui button" href="{{.RepoLink}}/commits/{{EscapePound .BranchNameSubURL}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.file_history"}}</a>
45-
</div>
46-
{{if .Repository.CanEnableEditor}}
47-
{{if .CanEditFile}}
48-
<a href="{{.RepoLink}}/_edit/{{EscapePound .BranchName}}/{{EscapePound .TreePath}}"><span class="btn-octicon poping up" data-content="{{.EditFileTooltip}}" data-position="bottom center" data-variation="tiny inverted">{{svg "octicon-pencil"}}</span></a>
49-
{{else}}
50-
<span class="btn-octicon poping up disabled" data-content="{{.EditFileTooltip}}" data-position="bottom center" data-variation="tiny inverted">{{svg "octicon-pencil"}}</span>
51-
{{end}}
52-
{{if .CanDeleteFile}}
53-
<a href="{{.RepoLink}}/_delete/{{EscapePound .BranchName}}/{{EscapePound .TreePath}}"><span class="btn-octicon btn-octicon-danger poping up" data-content="{{.DeleteFileTooltip}}" data-position="bottom center" data-variation="tiny inverted">{{svg "octicon-trashcan"}}</span></a>
54-
{{else}}
55-
<span class="btn-octicon poping up disabled" data-content="{{.DeleteFileTooltip}}" data-position="bottom center" data-variation="tiny inverted">{{svg "octicon-trashcan"}}</span>
56-
{{end}}
34+
<div class="file-header-right file-actions df ac">
35+
<div class="ui buttons">
36+
<a class="ui tiny button" href="{{EscapePound $.RawFileLink}}">{{.i18n.Tr "repo.file_raw"}}</a>
37+
{{if not .IsViewCommit}}
38+
<a class="ui tiny button" href="{{.RepoLink}}/src/commit/{{.CommitID}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.file_permalink"}}</a>
5739
{{end}}
40+
{{if .IsTextFile}}
41+
<a class="ui tiny button" href="{{.RepoLink}}/blame/{{EscapePound .BranchNameSubURL}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.blame"}}</a>
42+
{{end}}
43+
<a class="ui tiny button" href="{{.RepoLink}}/commits/{{EscapePound .BranchNameSubURL}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.file_history"}}</a>
5844
</div>
45+
{{if .Repository.CanEnableEditor}}
46+
{{if .CanEditFile}}
47+
<a href="{{.RepoLink}}/_edit/{{EscapePound .BranchName}}/{{EscapePound .TreePath}}"><span class="btn-octicon poping up" data-content="{{.EditFileTooltip}}" data-position="bottom center" data-variation="tiny inverted">{{svg "octicon-pencil"}}</span></a>
48+
{{else}}
49+
<span class="btn-octicon poping up disabled" data-content="{{.EditFileTooltip}}" data-position="bottom center" data-variation="tiny inverted">{{svg "octicon-pencil"}}</span>
50+
{{end}}
51+
{{if .CanDeleteFile}}
52+
<a href="{{.RepoLink}}/_delete/{{EscapePound .BranchName}}/{{EscapePound .TreePath}}"><span class="btn-octicon btn-octicon-danger poping up" data-content="{{.DeleteFileTooltip}}" data-position="bottom center" data-variation="tiny inverted">{{svg "octicon-trashcan"}}</span></a>
53+
{{else}}
54+
<span class="btn-octicon poping up disabled" data-content="{{.DeleteFileTooltip}}" data-position="bottom center" data-variation="tiny inverted">{{svg "octicon-trashcan"}}</span>
55+
{{end}}
56+
{{end}}
5957
</div>
6058
{{end}}
6159
</h4>

web_src/less/_admin.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444

4545
.ui.header,
4646
.ui.segment {
47-
box-shadow: 0 1px 2px 0 rgba(34, 36, 38, .15);
47+
box-shadow: 0 1px 2px 0 var(--color-secondary);
4848
}
4949

5050
&.user {

0 commit comments

Comments
 (0)