Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
wxiaoguang committed Dec 28, 2024
1 parent e435b19 commit e7d3d99
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 25 deletions.
6 changes: 4 additions & 2 deletions templates/repo/branch/list.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
</div>
<p class="info tw-flex tw-items-center tw-my-1">{{svg "octicon-git-commit" 16 "tw-mr-1"}}<a href="{{.RepoLink}}/commit/{{PathEscape .DefaultBranchBranch.DBBranch.CommitID}}">{{ShortSha .DefaultBranchBranch.DBBranch.CommitID}}</a> · <span class="commit-message">{{ctx.RenderUtils.RenderCommitMessage .DefaultBranchBranch.DBBranch.CommitMessage (.Repository.ComposeMetas ctx)}}</span> · {{ctx.Locale.Tr "org.repo_updated"}} {{DateUtils.TimeSince .DefaultBranchBranch.DBBranch.CommitTime}}{{if .DefaultBranchBranch.DBBranch.Pusher}} &nbsp;{{template "shared/user/avatarlink" dict "user" .DefaultBranchBranch.DBBranch.Pusher}}{{template "shared/user/namelink" .DefaultBranchBranch.DBBranch.Pusher}}{{end}}</p>
</td>
<td class="right aligned middle aligned overflow-visible">
{{/* FIXME: here and below, the tw-overflow-visible is not quite right but it is still needed the moment: to show the important buttons when the width is narrow */}}
<td class="right aligned middle aligned tw-overflow-visible">
{{if and $.IsWriter (not $.Repository.IsArchived) (not .IsDeleted)}}
<button class="btn interact-bg show-create-branch-modal tw-p-2"
data-modal="#create-branch-modal"
Expand Down Expand Up @@ -148,7 +149,8 @@
{{end}}
{{end}}
</td>
<td class="three wide right aligned overflow-visible">
{{/* FIXME: here and below, the tw-overflow-visible is not quite right */}}
<td class="three wide right aligned tw-overflow-visible">
{{if and $.IsWriter (not $.Repository.IsArchived) (not .DBBranch.IsDeleted)}}
<button class="btn interact-bg tw-p-2 show-modal show-create-branch-modal"
data-branch-from="{{.DBBranch.Name}}"
Expand Down
4 changes: 2 additions & 2 deletions templates/repo/settings/options.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@
<span class="field">
{{if .CodeIndexerStatus}}
<a rel="nofollow" class="ui sha label" href="{{.RepoLink}}/commit/{{.CodeIndexerStatus.CommitSha}}">
<span class="shortsha">{{ShortSha .CodeIndexerStatus.CommitSha}}</span>
{{ShortSha .CodeIndexerStatus.CommitSha}}
</a>
{{else}}
<span>{{ctx.Locale.Tr "repo.settings.admin_indexer_unindexed"}}</span>
Expand All @@ -752,7 +752,7 @@
<span class="field">
{{if and .StatsIndexerStatus .StatsIndexerStatus.CommitSha}}
<a rel="nofollow" class="ui sha label" href="{{.RepoLink}}/commit/{{.StatsIndexerStatus.CommitSha}}">
<span class="shortsha">{{ShortSha .StatsIndexerStatus.CommitSha}}</span>
{{ShortSha .StatsIndexerStatus.CommitSha}}
</a>
{{else}}
<span>{{ctx.Locale.Tr "repo.settings.admin_indexer_unindexed"}}</span>
Expand Down
3 changes: 2 additions & 1 deletion web_src/css/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -928,7 +928,8 @@ strong.attention-caution, svg.attention-caution {
color: var(--color-red-dark-1);
}

.center:not(.popup) {
/* FIXME: this is a longstanding dirty patch since 2015, it only makes the pages more messy and shouldn't be used */
.center {
text-align: center;
}

Expand Down
20 changes: 1 addition & 19 deletions web_src/css/explore.css
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
.explore .secondary-nav {
border-width: 1px !important;
}

.explore .secondary-nav .svg {
width: 16px;
text-align: center;
margin-right: 5px;
}

/* FIXME: need to refactor the repo branches list page and move these styles to proper place */
.ui.repository.branches .info {
font-size: 12px;
color: var(--color-text-light);
Expand All @@ -20,12 +11,3 @@
overflow: hidden;
text-overflow: ellipsis;
}

.ui.repository.branches .overflow-visible {
overflow: visible;
}

/* fix alignment of PR popup in branches table */
.ui.repository.branches table .ui.popup {
text-align: left;
}
3 changes: 2 additions & 1 deletion web_src/css/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,6 @@
@import "./review.css";
@import "./actions.css";

@tailwind utilities;
@import "./helpers.css";

@tailwind utilities;

0 comments on commit e7d3d99

Please sign in to comment.