1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Fix incorrect tailwind migration (#30007)

Fixes https://github.com/go-gitea/gitea/issues/30005. Regression from
https://github.com/go-gitea/gitea/pull/29945.

There was only once instance of `tw-content-center` before that PR, so I
just ran below command and reverted that one instance.

```sh
perl -p -i -e 's#tw-content-center#tw-items-center#g' web_src/js/**/* templates/**/* models/**/* tests/**/*
```
This commit is contained in:
silverwind
2024-03-22 20:51:29 +01:00
committed by GitHub
parent 3d751b6ec1
commit 04f9ad0568
77 changed files with 165 additions and 165 deletions

View File

@@ -18,7 +18,7 @@
<span><strong>{{.Name}}</strong></span>
</a>
</div>
<div class="gt-p-3 tw-flex tw-content-center">
<div class="gt-p-3 tw-flex tw-items-center">
<span class="ui text grey">{{.Size | FileSize}}</span>
</div>
</div>

View File

@@ -25,8 +25,8 @@
</a>
{{end}}
<div class="content comment-container">
<div class="ui top attached header comment-header tw-flex tw-content-center tw-justify-between" role="heading" aria-level="3">
<div class="comment-header-left tw-flex tw-content-center">
<div class="ui top attached header comment-header tw-flex tw-items-center tw-justify-between" role="heading" aria-level="3">
<div class="comment-header-left tw-flex tw-items-center">
{{if .OriginalAuthor}}
<span class="text black gt-font-semibold gt-mr-2">
{{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}}
@@ -50,7 +50,7 @@
</span>
{{end}}
</div>
<div class="comment-header-right actions tw-flex tw-content-center">
<div class="comment-header-right actions tw-flex tw-items-center">
{{template "repo/issue/view_content/show_role" dict "ShowRole" .ShowRole}}
{{if not $.Repository.IsArchived}}
{{template "repo/issue/view_content/add_reaction" dict "ctxData" $ "ActionURL" (printf "%s/comments/%d/reactions" $.RepoLink .ID)}}
@@ -402,8 +402,8 @@
{{if or .Content .Attachments}}
<div class="timeline-item comment">
<div class="content comment-container">
<div class="ui top attached header comment-header tw-flex tw-content-center tw-justify-between">
<div class="comment-header-left tw-flex tw-content-center">
<div class="ui top attached header comment-header tw-flex tw-items-center tw-justify-between">
<div class="comment-header-left tw-flex tw-items-center">
{{if gt .Poster.ID 0}}
<a class="inline-timeline-avatar" href="{{.Poster.HomeLink}}">
{{ctx.AvatarUtils.Avatar .Poster 24}}
@@ -424,7 +424,7 @@
{{ctx.Locale.Tr "repo.issues.review.left_comment"}}
</span>
</div>
<div class="comment-header-right actions tw-flex tw-content-center">
<div class="comment-header-right actions tw-flex tw-items-center">
{{template "repo/issue/view_content/show_role" dict "ShowRole" .ShowRole}}
{{if not $.Repository.IsArchived}}
{{template "repo/issue/view_content/add_reaction" dict "ctxData" $ "ActionURL" (printf "%s/comments/%d/reactions" $.RepoLink .ID)}}
@@ -623,7 +623,7 @@
{{if .Content}}
<div class="timeline-item comment">
<div class="content">
<div class="ui top attached header comment-header-left tw-flex tw-content-center arrow-top">
<div class="ui top attached header comment-header-left tw-flex tw-items-center arrow-top">
{{if gt .Poster.ID 0}}
<a class="inline-timeline-avatar" href="{{.Poster.HomeLink}}">
{{ctx.AvatarUtils.Avatar .Poster 24}}

View File

@@ -6,8 +6,8 @@
{{$hasReview := and $comment.Review}}
{{$isReviewPending := and $hasReview (eq $comment.Review.Type 0)}}
<div class="ui segments conversation-holder">
<div class="ui segment collapsible-comment-box gt-py-3 tw-flex tw-content-center tw-justify-between">
<div class="tw-flex tw-content-center">
<div class="ui segment collapsible-comment-box gt-py-3 tw-flex tw-items-center tw-justify-between">
<div class="tw-flex tw-items-center">
<a href="{{$comment.CodeCommentLink ctx}}" class="file-comment gt-ml-3 gt-word-break">{{$comment.TreePath}}</a>
{{if $invalid}}
<span class="ui label basic small gt-ml-3" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.review.outdated_description"}}">
@@ -17,7 +17,7 @@
</div>
<div>
{{if or $invalid $resolved}}
<button id="show-outdated-{{$comment.ID}}" data-comment="{{$comment.ID}}" class="{{if not $resolved}}gt-hidden {{end}}ui compact labeled button show-outdated tw-flex tw-content-center">
<button id="show-outdated-{{$comment.ID}}" data-comment="{{$comment.ID}}" class="{{if not $resolved}}gt-hidden {{end}}ui compact labeled button show-outdated tw-flex tw-items-center">
{{svg "octicon-unfold" 16 "gt-mr-3"}}
{{if $resolved}}
{{ctx.Locale.Tr "repo.issues.review.show_resolved"}}
@@ -25,7 +25,7 @@
{{ctx.Locale.Tr "repo.issues.review.show_outdated"}}
{{end}}
</button>
<button id="hide-outdated-{{$comment.ID}}" data-comment="{{$comment.ID}}" class="{{if $resolved}}gt-hidden {{end}}ui compact labeled button hide-outdated tw-flex tw-content-center">
<button id="hide-outdated-{{$comment.ID}}" data-comment="{{$comment.ID}}" class="{{if $resolved}}gt-hidden {{end}}ui compact labeled button hide-outdated tw-flex tw-items-center">
{{svg "octicon-fold" 16 "gt-mr-3"}}
{{if $resolved}}
{{ctx.Locale.Tr "repo.issues.review.hide_resolved"}}
@@ -58,7 +58,7 @@
<div class="comment code-comment gt-pb-4" id="{{.HashTag}}">
<div class="content">
<div class="header comment-header">
<div class="comment-header-left tw-flex tw-content-center">
<div class="comment-header-left tw-flex tw-items-center">
{{if not .OriginalAuthor}}
<a class="avatar">
{{ctx.AvatarUtils.Avatar .Poster 20}}
@@ -79,7 +79,7 @@
{{ctx.Locale.Tr "repo.issues.commented_at" .HashTag $createdSubStr}}
</span>
</div>
<div class="comment-header-right actions tw-flex tw-content-center">
<div class="comment-header-right actions tw-flex tw-items-center">
{{template "repo/issue/view_content/show_role" dict "ShowRole" .ShowRole}}
{{if not $.Repository.IsArchived}}
{{template "repo/issue/view_content/add_reaction" dict "ctxData" $ "ActionURL" (printf "%s/comments/%d/reactions" $.RepoLink .ID)}}
@@ -109,7 +109,7 @@
</div>
{{end}}
</div>
<div class="code-comment-buttons tw-flex tw-content-center tw-flex-wrap gt-mt-3 gt-mb-2 gt-mx-3">
<div class="code-comment-buttons tw-flex tw-items-center tw-flex-wrap gt-mt-3 gt-mb-2 gt-mx-3">
<div class="tw-flex-1">
{{if $resolved}}
<div class="ui grey text">

View File

@@ -3,7 +3,7 @@
{{if .Issue.IsPull}}
<input id="reviewer_id" name="reviewer_id" type="hidden" value="{{.reviewer_id}}">
<div class="ui {{if or (and (not .Reviewers) (not .TeamReviewers)) (not .CanChooseReviewer) .Repository.IsArchived}}disabled{{end}} floating jump select-reviewers-modify dropdown">
<a class="text tw-flex tw-content-center muted">
<a class="text tw-flex tw-items-center muted">
<strong>{{ctx.Locale.Tr "repo.issues.review.reviewers"}}</strong>
{{if and .CanChooseReviewer (not .Repository.IsArchived)}}
{{svg "octicon-gear" 16 "gt-ml-2"}}
@@ -50,17 +50,17 @@
<span class="no-select item {{if or .OriginalReviews .PullReviewers}}gt-hidden{{end}}">{{ctx.Locale.Tr "repo.issues.new.no_reviewers"}}</span>
<div class="selected">
{{range .PullReviewers}}
<div class="item tw-flex tw-content-center gt-py-3">
<div class="tw-flex tw-content-center tw-flex-1">
<div class="item tw-flex tw-items-center gt-py-3">
<div class="tw-flex tw-items-center tw-flex-1">
{{if .User}}
<a class="muted sidebar-item-link" href="{{.User.HomeLink}}">{{ctx.AvatarUtils.Avatar .User 20 "gt-mr-3"}}{{.User.GetDisplayName}}</a>
{{else if .Team}}
<span class="text">{{svg "octicon-people" 20 "gt-mr-3"}}{{$.Issue.Repo.OwnerName}}/{{.Team.Name}}</span>
{{end}}
</div>
<div class="tw-flex tw-content-center gt-gap-3">
<div class="tw-flex tw-items-center gt-gap-3">
{{if (and $.Permission.IsAdmin (or (eq .Review.Type 1) (eq .Review.Type 3)) (not $.Issue.IsClosed))}}
<a href="#" class="ui muted icon tw-flex tw-content-center show-modal" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.dismiss_review"}}" data-modal="#dismiss-review-modal-{{.Review.ID}}">
<a href="#" class="ui muted icon tw-flex tw-items-center show-modal" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.dismiss_review"}}" data-modal="#dismiss-review-modal-{{.Review.ID}}">
{{svg "octicon-x" 20}}
</a>
<div class="ui small modal" id="dismiss-review-modal-{{.Review.ID}}">
@@ -99,14 +99,14 @@
</div>
{{end}}
{{range .OriginalReviews}}
<div class="item tw-flex tw-content-center gt-py-3">
<div class="tw-flex tw-content-center tw-flex-1">
<div class="item tw-flex tw-items-center gt-py-3">
<div class="tw-flex tw-items-center tw-flex-1">
<a class="muted" href="{{$.Repository.OriginalURL}}" data-tooltip-content="{{ctx.Locale.Tr "repo.migrated_from_fake" $.Repository.GetOriginalURLHostname}}">
{{svg (MigrationIcon $.Repository.GetOriginalURLHostname) 20 "gt-mr-3"}}
{{.OriginalAuthor}}
</a>
</div>
<div class="tw-flex tw-content-center gt-gap-3">
<div class="tw-flex tw-items-center gt-gap-3">
{{svg (printf "octicon-%s" .Type.Icon) 16 (printf "text %s" (.HTMLTypeColorName))}}
</div>
</div>
@@ -361,7 +361,7 @@
</div>
{{if ne .Issue.DeadlineUnix 0}}
<p>
<div class="tw-flex tw-justify-between tw-content-center">
<div class="tw-flex tw-justify-between tw-items-center">
<div class="due-date {{if .Issue.IsOverdue}}text red{{end}}" {{if .Issue.IsOverdue}}data-tooltip-content="{{ctx.Locale.Tr "repo.issues.due_date_overdue"}}"{{end}}>
{{svg "octicon-calendar" 16 "gt-mr-3"}}
{{DateTime "long" .Issue.DeadlineUnix.FormatDate}}
@@ -417,7 +417,7 @@
</span>
<div class="ui relaxed divided list">
{{range .BlockingDependencies}}
<div class="item dependency{{if .Issue.IsClosed}} is-closed{{end}} tw-flex tw-content-center tw-justify-between">
<div class="item dependency{{if .Issue.IsClosed}} is-closed{{end}} tw-flex tw-items-center tw-justify-between">
<div class="item-left tw-flex tw-justify-center tw-flex-col tw-flex-1 gt-ellipsis">
<a class="title muted" href="{{.Issue.Link}}" data-tooltip-content="#{{.Issue.Index}} {{.Issue.Title | RenderEmoji $.Context}}">
#{{.Issue.Index}} {{.Issue.Title | RenderEmoji $.Context}}
@@ -426,7 +426,7 @@
{{.Repository.OwnerName}}/{{.Repository.Name}}
</div>
</div>
<div class="item-right tw-flex tw-content-center gt-m-2">
<div class="item-right tw-flex tw-items-center gt-m-2">
{{if and $.CanCreateIssueDependencies (not $.Repository.IsArchived)}}
<a class="delete-dependency-button ci muted" data-id="{{.Issue.ID}}" data-type="blocking" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.dependency.remove_info"}}">
{{svg "octicon-trash" 16}}
@@ -436,7 +436,7 @@
</div>
{{end}}
{{if .BlockingDependenciesNotPermitted}}
<div class="item tw-flex tw-content-center tw-justify-between gt-ellipsis">
<div class="item tw-flex tw-items-center tw-justify-between gt-ellipsis">
<span>{{ctx.Locale.TrN (len .BlockingDependenciesNotPermitted) "repo.issues.dependency.no_permission_1" "repo.issues.dependency.no_permission_n" (len .BlockingDependenciesNotPermitted)}}</span>
</div>
{{end}}
@@ -449,7 +449,7 @@
</span>
<div class="ui relaxed divided list">
{{range .BlockedByDependencies}}
<div class="item dependency{{if .Issue.IsClosed}} is-closed{{end}} tw-flex tw-content-center tw-justify-between">
<div class="item dependency{{if .Issue.IsClosed}} is-closed{{end}} tw-flex tw-items-center tw-justify-between">
<div class="item-left tw-flex tw-justify-center tw-flex-col tw-flex-1 gt-ellipsis">
<a class="title muted" href="{{.Issue.Link}}" data-tooltip-content="#{{.Issue.Index}} {{.Issue.Title | RenderEmoji $.Context}}">
#{{.Issue.Index}} {{.Issue.Title | RenderEmoji $.Context}}
@@ -458,7 +458,7 @@
{{.Repository.OwnerName}}/{{.Repository.Name}}
</div>
</div>
<div class="item-right tw-flex tw-content-center gt-m-2">
<div class="item-right tw-flex tw-items-center gt-m-2">
{{if and $.CanCreateIssueDependencies (not $.Repository.IsArchived)}}
<a class="delete-dependency-button ci muted" data-id="{{.Issue.ID}}" data-type="blockedBy" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.dependency.remove_info"}}">
{{svg "octicon-trash" 16}}
@@ -469,7 +469,7 @@
{{end}}
{{if $.CanCreateIssueDependencies}}
{{range .BlockedByDependenciesNotPermitted}}
<div class="item dependency{{if .Issue.IsClosed}} is-closed{{end}} tw-flex tw-content-center tw-justify-between">
<div class="item dependency{{if .Issue.IsClosed}} is-closed{{end}} tw-flex tw-items-center tw-justify-between">
<div class="item-left tw-flex tw-justify-center tw-flex-col tw-flex-1 gt-ellipsis">
<div class="gt-ellipsis">
<span data-tooltip-content="{{ctx.Locale.Tr "repo.issues.dependency.no_permission.can_remove"}}">{{svg "octicon-lock" 16}}</span>
@@ -481,7 +481,7 @@
{{.Repository.OwnerName}}/{{.Repository.Name}}
</div>
</div>
<div class="item-right tw-flex tw-content-center gt-m-2">
<div class="item-right tw-flex tw-items-center gt-m-2">
{{if and $.CanCreateIssueDependencies (not $.Repository.IsArchived)}}
<a class="delete-dependency-button ci muted" data-id="{{.Issue.ID}}" data-type="blocking" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.dependency.remove_info"}}">
{{svg "octicon-trash" 16}}
@@ -491,7 +491,7 @@
</div>
{{end}}
{{else if .BlockedByDependenciesNotPermitted}}
<div class="item tw-flex tw-content-center tw-justify-between gt-ellipsis">
<div class="item tw-flex tw-items-center tw-justify-between gt-ellipsis">
<span>{{ctx.Locale.TrN (len .BlockedByDependenciesNotPermitted) "repo.issues.dependency.no_permission_1" "repo.issues.dependency.no_permission_n" (len .BlockedByDependenciesNotPermitted)}}</span>
</div>
{{end}}
@@ -548,7 +548,7 @@
<div class="divider"></div>
<div class="ui equal width compact grid">
{{$issueReferenceLink := printf "%s#%d" .Issue.Repo.FullName .Issue.Index}}
<div class="row tw-content-center" data-tooltip-content="{{$issueReferenceLink}}">
<div class="row tw-items-center" data-tooltip-content="{{$issueReferenceLink}}">
<span class="text column truncate">{{ctx.Locale.Tr "repo.issues.reference_link" $issueReferenceLink}}</span>
<button class="ui two wide button column gt-p-3" data-clipboard-text="{{$issueReferenceLink}}">{{svg "octicon-copy" 14}}</button>
</div>