Skip to content

Commit

Permalink
improve
Browse files Browse the repository at this point in the history
  • Loading branch information
yp05327 committed Aug 21, 2023
1 parent 5ebc1b5 commit e2a7adb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions templates/repo/branch/list.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
<td>
<div class="gt-df gt-ac">
{{if .DefaultBranchBranch.IsProtected}}
<span class="flex-text-inline gt-pr-2">{{svg "octicon-shield-lock"}}</span>
<span class="gt-df gt-pr-2">{{svg "octicon-shield-lock"}}</span>
{{end}}
<a class="gt-ellipsis" href="{{.RepoLink}}/src/branch/{{PathEscapeSegments .DefaultBranchBranch.DBBranch.Name}}">{{.DefaultBranchBranch.DBBranch.Name}}</a>
<button class="btn interact-fg gt-p-3" data-clipboard-text="{{.DefaultBranchBranch.DBBranch.Name}}"><span class="gt-df gt-ac">{{svg "octicon-copy" 14}}</span></button>
<button class="btn interact-fg gt-df gt-p-3" data-clipboard-text="{{.DefaultBranchBranch.DBBranch.Name}}">{{svg "octicon-copy" 14}}</button>
{{template "repo/commit_statuses" dict "Status" (index $.CommitStatus .DefaultBranchBranch.DBBranch.CommitID) "Statuses" (index $.CommitStatuses .DefaultBranchBranch.DBBranch.CommitID)}}
</div>
<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 "user" .DefaultBranchBranch.DBBranch.Pusher}}{{template "shared/user/namelink" .DefaultBranchBranch.DBBranch.Pusher}}{{end}}</p>
Expand Down Expand Up @@ -88,10 +88,10 @@
{{else}}
<div class="gt-df gt-ac">
{{if .IsProtected}}
<span class="flex-text-inline gt-pr-2">{{svg "octicon-shield-lock"}}</span>
<span class="gt-df gt-pr-2">{{svg "octicon-shield-lock"}}</span>
{{end}}
<a class="gt-ellipsis" href="{{$.RepoLink}}/src/branch/{{PathEscapeSegments .DBBranch.Name}}">{{.DBBranch.Name}}</a>
<button class="btn interact-fg gt-p-3" data-clipboard-text="{{.DBBranch.Name}}"><span class="gt-df gt-ac">{{svg "octicon-copy" 14}}</span></button>
<button class="btn interact-fg gt-df gt-p-3" data-clipboard-text="{{.DBBranch.Name}}">{{svg "octicon-copy" 14}}</button>
{{template "repo/commit_statuses" dict "Status" (index $.CommitStatus .DBBranch.CommitID) "Statuses" (index $.CommitStatuses .DBBranch.CommitID)}}
</div>
<p class="info gt-df gt-ac gt-my-2">{{svg "octicon-git-commit" 16 "gt-mr-2"}}<a href="{{$.RepoLink}}/commit/{{PathEscape .DBBranch.CommitID}}">{{ShortSha .DBBranch.CommitID}}</a> · <span class="commit-message">{{RenderCommitMessage $.Context .DBBranch.CommitMessage $.RepoLink $.Repository.ComposeMetas}}</span> · {{$.locale.Tr "org.repo_updated"}} {{TimeSince .DBBranch.CommitTime.AsTime $.locale}}{{if .DBBranch.Pusher}} &nbsp;{{template "shared/user/avatarlink" dict "user" .DBBranch.Pusher}} &nbsp;{{template "shared/user/namelink" .DBBranch.Pusher}}{{end}}</p>
Expand Down
2 changes: 1 addition & 1 deletion templates/repo/commit_status.tmpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- make sure this matches the color logic in web_src/js/components/DashboardRepoList.vue -->
<span class="gt-df gt-ac">
<span class="gt-df">
{{if eq .State "pending"}}
{{svg "octicon-dot-fill" 18 "commit-status icon text yellow"}}
{{end}}
Expand Down

0 comments on commit e2a7adb

Please sign in to comment.