mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-03 21:08:25 +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:
		@@ -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>
 | 
			
		||||
 
 | 
			
		||||
@@ -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"}}">
 | 
			
		||||
 
 | 
			
		||||
@@ -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"}}
 | 
			
		||||
 
 | 
			
		||||
@@ -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>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user