diff options
author | silverwind <me@silverwind.io> | 2024-03-22 20:51:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-22 20:51:29 +0100 |
commit | 04f9ad056882fc3f21b247b16f84437adf0f36d8 (patch) | |
tree | a3afde513bac6f2b93a54acba624e2f0210e89d7 /templates/repo/diff | |
parent | 3d751b6ec18e57698ce86b79866031d2c80c2071 (diff) | |
download | gitea-04f9ad056882fc3f21b247b16f84437adf0f36d8.tar.gz gitea-04f9ad056882fc3f21b247b16f84437adf0f36d8.zip |
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/**/*
```
Diffstat (limited to 'templates/repo/diff')
-rw-r--r-- | templates/repo/diff/box.tmpl | 16 | ||||
-rw-r--r-- | templates/repo/diff/comments.tmpl | 6 | ||||
-rw-r--r-- | templates/repo/diff/conversation.tmpl | 12 | ||||
-rw-r--r-- | templates/repo/diff/new_review.tmpl | 2 |
4 files changed, 18 insertions, 18 deletions
diff --git a/templates/repo/diff/box.tmpl b/templates/repo/diff/box.tmpl index d71ad1b2ad..42eaf9d30e 100644 --- a/templates/repo/diff/box.tmpl +++ b/templates/repo/diff/box.tmpl @@ -1,7 +1,7 @@ {{$showFileTree := (and (not .DiffNotAvailable) (gt .Diff.NumFiles 1))}} <div> <div class="diff-detail-box diff-box"> - <div class="tw-flex tw-content-center tw-flex-wrap gt-gap-3 gt-ml-1"> + <div class="tw-flex tw-items-center tw-flex-wrap gt-gap-3 gt-ml-1"> {{if $showFileTree}} <button class="diff-toggle-file-tree-button not-mobile btn interact-fg" data-show-text="{{ctx.Locale.Tr "repo.diff.show_file_tree"}}" data-hide-text="{{ctx.Locale.Tr "repo.diff.hide_file_tree"}}"> {{/* the icon meaning is reversed here, "octicon-sidebar-collapse" means show the file tree */}} @@ -18,14 +18,14 @@ </script> {{end}} {{if not .DiffNotAvailable}} - <div class="diff-detail-stats tw-flex tw-content-center tw-flex-wrap"> + <div class="diff-detail-stats tw-flex tw-items-center tw-flex-wrap"> {{svg "octicon-diff" 16 "gt-mr-2"}}{{ctx.Locale.Tr "repo.diff.stats_desc" .Diff.NumFiles .Diff.TotalAddition .Diff.TotalDeletion}} </div> {{end}} </div> <div class="diff-detail-actions"> {{if and .PageIsPullFiles $.SignedUserID (not .IsArchived) (not .DiffNotAvailable)}} - <div class="not-mobile tw-flex tw-content-center tw-flex-col tw-whitespace-nowrap gt-mr-2"> + <div class="not-mobile tw-flex tw-items-center tw-flex-col tw-whitespace-nowrap gt-mr-2"> <label for="viewed-files-summary" id="viewed-files-summary-label" data-text-changed-template="{{ctx.Locale.Tr "repo.pulls.viewed_files_label"}}"> {{ctx.Locale.Tr "repo.pulls.viewed_files_label" .Diff.NumViewedFiles .Diff.NumFiles}} </label> @@ -110,8 +110,8 @@ {{$isExpandable := or (gt $file.Addition 0) (gt $file.Deletion 0) $file.IsBin}} {{$isReviewFile := and $.IsSigned $.PageIsPullFiles (not $.IsArchived) $.IsShowingAllCommits}} <div class="diff-file-box diff-box file-content {{TabSizeClass $.Editorconfig $file.Name}} gt-mt-0" id="diff-{{$file.NameHash}}" data-old-filename="{{$file.OldName}}" data-new-filename="{{$file.Name}}" {{if or ($file.ShouldBeHidden) (not $isExpandable)}}data-folded="true"{{end}}> - <h4 class="diff-file-header sticky-2nd-row ui top attached normal header tw-flex tw-content-center tw-justify-between tw-flex-wrap"> - <div class="diff-file-name tw-flex tw-content-center gt-gap-2 tw-flex-wrap"> + <h4 class="diff-file-header sticky-2nd-row ui top attached normal header tw-flex tw-items-center tw-justify-between tw-flex-wrap"> + <div class="diff-file-name tw-flex tw-items-center gt-gap-2 tw-flex-wrap"> <button class="fold-file btn interact-bg gt-p-2{{if not $isExpandable}} tw-invisible{{end}}"> {{if $file.ShouldBeHidden}} {{svg "octicon-chevron-right" 18}} @@ -119,7 +119,7 @@ {{svg "octicon-chevron-down" 18}} {{end}} </button> - <div class="gt-font-semibold tw-flex tw-content-center gt-mono"> + <div class="gt-font-semibold tw-flex tw-items-center gt-mono"> {{if $file.IsBin}} <span class="gt-ml-1 gt-mr-3"> {{ctx.Locale.Tr "repo.diff.bin"}} @@ -144,7 +144,7 @@ <span class="gt-ml-4 gt-mono">{{ctx.Locale.Tr ($file.ModeTranslationKey $file.Mode)}}</span> {{end}} </div> - <div class="diff-file-header-actions tw-flex tw-content-center gt-gap-2 tw-flex-wrap"> + <div class="diff-file-header-actions tw-flex tw-items-center gt-gap-2 tw-flex-wrap"> {{if $showFileViewToggle}} <div class="ui compact icon buttons"> <button class="ui tiny basic button file-view-toggle" data-toggle-selector="#diff-source-{{$file.NameHash}}" data-tooltip-content="{{ctx.Locale.Tr "repo.file_view_source"}}">{{svg "octicon-code"}}</button> @@ -218,7 +218,7 @@ {{if .Diff.IsIncomplete}} <div class="diff-file-box diff-box file-content gt-mt-3" id="diff-incomplete"> - <h4 class="ui top attached normal header tw-flex tw-content-center tw-justify-between"> + <h4 class="ui top attached normal header tw-flex tw-items-center tw-justify-between"> {{ctx.Locale.Tr "repo.diff.too_many_files"}} <a class="ui basic tiny button" id="diff-show-more-files" data-href="?skip-to={{.Diff.End}}&file-only=true">{{ctx.Locale.Tr "repo.diff.show_more"}}</a> </h4> diff --git a/templates/repo/diff/comments.tmpl b/templates/repo/diff/comments.tmpl index aed01ef5fb..4b626ba2b0 100644 --- a/templates/repo/diff/comments.tmpl +++ b/templates/repo/diff/comments.tmpl @@ -8,8 +8,8 @@ {{template "shared/user/avatarlink" dict "user" .Poster}} {{end}} <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 .OriginalAuthor}} <span class="text black gt-font-semibold gt-mr-2"> {{svg (MigrationIcon $.root.Repository.GetOriginalURLHostname)}} @@ -30,7 +30,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"> {{if .Invalidated}} {{$referenceUrl := printf "%s#%s" $.root.Issue.Link .HashTag}} <a href="{{$referenceUrl}}" class="ui label basic small" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.review.outdated_description"}}"> diff --git a/templates/repo/diff/conversation.tmpl b/templates/repo/diff/conversation.tmpl index 1bc018e8e2..85bfe4923a 100644 --- a/templates/repo/diff/conversation.tmpl +++ b/templates/repo/diff/conversation.tmpl @@ -8,8 +8,8 @@ {{$referenceUrl := printf "%s#%s" $.Issue.Link $comment.HashTag}} <div class="conversation-holder" data-path="{{$comment.TreePath}}" data-side="{{if lt $comment.Line 0}}left{{else}}right{{end}}" data-idx="{{$comment.UnsignedLine}}"> {{if $resolved}} - <div class="ui attached header resolved-placeholder tw-flex tw-content-center tw-justify-between"> - <div class="ui grey text tw-flex tw-content-center tw-flex-wrap gt-gap-2"> + <div class="ui attached header resolved-placeholder tw-flex tw-items-center tw-justify-between"> + <div class="ui grey text tw-flex tw-items-center tw-flex-wrap gt-gap-2"> {{svg "octicon-check" 16 "icon gt-mr-2"}} <b>{{$resolveDoer.Name}}</b> {{ctx.Locale.Tr "repo.issues.review.resolved_by"}} {{if $invalid}} @@ -22,12 +22,12 @@ </a> {{end}} </div> - <div class="tw-flex tw-content-center gt-gap-3"> - <button id="show-outdated-{{$comment.ID}}" data-comment="{{$comment.ID}}" class="ui tiny labeled button show-outdated tw-flex tw-content-center"> + <div class="tw-flex tw-items-center gt-gap-3"> + <button id="show-outdated-{{$comment.ID}}" data-comment="{{$comment.ID}}" class="ui tiny labeled button show-outdated tw-flex tw-items-center"> {{svg "octicon-unfold" 16 "gt-mr-3"}} {{ctx.Locale.Tr "repo.issues.review.show_resolved"}} </button> - <button id="hide-outdated-{{$comment.ID}}" data-comment="{{$comment.ID}}" class="ui tiny labeled button hide-outdated tw-flex tw-content-center gt-hidden"> + <button id="hide-outdated-{{$comment.ID}}" data-comment="{{$comment.ID}}" class="ui tiny labeled button hide-outdated tw-flex tw-items-center gt-hidden"> {{svg "octicon-fold" 16 "gt-mr-3"}} {{ctx.Locale.Tr "repo.issues.review.hide_resolved"}} </button> @@ -40,7 +40,7 @@ {{template "repo/diff/comments" dict "root" $ "comments" .comments}} </ui> </div> - <div class="tw-flex tw-justify-end tw-content-center tw-flex-wrap gt-mt-3"> + <div class="tw-flex tw-justify-end tw-items-center tw-flex-wrap gt-mt-3"> <div class="ui buttons gt-mr-2"> <button class="ui icon tiny basic button previous-conversation"> {{svg "octicon-arrow-up" 12 "icon"}} {{ctx.Locale.Tr "repo.issues.previous"}} diff --git a/templates/repo/diff/new_review.tmpl b/templates/repo/diff/new_review.tmpl index 9d1eef712d..9c824db0ad 100644 --- a/templates/repo/diff/new_review.tmpl +++ b/templates/repo/diff/new_review.tmpl @@ -10,7 +10,7 @@ <form class="ui form form-fetch-action" action="{{.Link}}/reviews/submit" method="post"> {{.CsrfTokenHtml}} <input type="hidden" name="commit_id" value="{{.AfterCommitID}}"> - <div class="field tw-flex tw-content-center"> + <div class="field tw-flex tw-items-center"> <div class="tw-flex-1">{{ctx.Locale.Tr "repo.diff.review.header"}}</div> <a class="muted close">{{svg "octicon-x" 16}}</a> </div> |