mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Migrate gt-hidden
to tw-hidden
(#30046)
We have to define this one in helpers.css because tailwind only generates a single class but certain things rely on this being double-class. Command ran: ```sh perl -p -i -e 's#gt-hidden#tw-hidden#g' web_src/js/**/* templates/**/* models/**/* web_src/css/**/* --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -5,15 +5,15 @@
|
||||
{{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 */}}
|
||||
{{svg "octicon-sidebar-collapse" 20 "icon gt-hidden"}}
|
||||
{{svg "octicon-sidebar-expand" 20 "icon gt-hidden"}}
|
||||
{{svg "octicon-sidebar-collapse" 20 "icon tw-hidden"}}
|
||||
{{svg "octicon-sidebar-expand" 20 "icon tw-hidden"}}
|
||||
</button>
|
||||
<script>
|
||||
// Default to true if unset
|
||||
const diffTreeVisible = localStorage?.getItem('diff_file_tree_visible') !== 'false';
|
||||
const diffTreeBtn = document.querySelector('.diff-toggle-file-tree-button');
|
||||
const diffTreeIcon = `.octicon-sidebar-${diffTreeVisible ? 'expand' : 'collapse'}`;
|
||||
diffTreeBtn.querySelector(diffTreeIcon).classList.remove('gt-hidden');
|
||||
diffTreeBtn.querySelector(diffTreeIcon).classList.remove('tw-hidden');
|
||||
diffTreeBtn.setAttribute('data-tooltip-content', diffTreeBtn.getAttribute(diffTreeVisible ? 'data-hide-text' : 'data-show-text'));
|
||||
</script>
|
||||
{{end}}
|
||||
@@ -89,9 +89,9 @@
|
||||
{{end}}
|
||||
<div id="diff-container">
|
||||
{{if $showFileTree}}
|
||||
<div id="diff-file-tree" class="gt-hidden not-mobile"></div>
|
||||
<div id="diff-file-tree" class="tw-hidden not-mobile"></div>
|
||||
<script>
|
||||
if (diffTreeVisible) document.getElementById('diff-file-tree').classList.remove('gt-hidden');
|
||||
if (diffTreeVisible) document.getElementById('diff-file-tree').classList.remove('tw-hidden');
|
||||
</script>
|
||||
{{end}}
|
||||
{{if .DiffNotAvailable}}
|
||||
@@ -159,7 +159,7 @@
|
||||
{{end}}
|
||||
{{if not (or $file.IsIncomplete $file.IsBin $file.IsSubmodule)}}
|
||||
<button class="ui basic tiny button unescape-button not-mobile">{{ctx.Locale.Tr "repo.unescape_control_characters"}}</button>
|
||||
<button class="ui basic tiny button escape-button gt-hidden">{{ctx.Locale.Tr "repo.escape_control_characters"}}</button>
|
||||
<button class="ui basic tiny button escape-button tw-hidden">{{ctx.Locale.Tr "repo.escape_control_characters"}}</button>
|
||||
{{end}}
|
||||
{{if and (not $file.IsSubmodule) (not $.PageIsWiki)}}
|
||||
{{if $file.IsDeleted}}
|
||||
@@ -176,7 +176,7 @@
|
||||
</div>
|
||||
</h4>
|
||||
<div class="diff-file-body ui attached unstackable table segment" {{if and $file.IsViewed $.IsShowingAllCommits}}data-folded="true"{{end}}>
|
||||
<div id="diff-source-{{$file.NameHash}}" class="file-body file-code unicode-escaped code-diff{{if $.IsSplitStyle}} code-diff-split{{else}} code-diff-unified{{end}}{{if $showFileViewToggle}} gt-hidden{{end}}">
|
||||
<div id="diff-source-{{$file.NameHash}}" class="file-body file-code unicode-escaped code-diff{{if $.IsSplitStyle}} code-diff-split{{else}} code-diff-unified{{end}}{{if $showFileViewToggle}} tw-hidden{{end}}">
|
||||
{{if or $file.IsIncomplete $file.IsBin}}
|
||||
<div class="diff-file-body binary">
|
||||
{{if $file.IsIncomplete}}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{{if and $.root.SignedUserID (not $.Repository.IsArchived)}}
|
||||
<form class="ui form {{if $.hidden}}gt-hidden comment-form{{end}}" action="{{$.root.Issue.Link}}/files/reviews/comments" method="post">
|
||||
<form class="ui form {{if $.hidden}}tw-hidden comment-form{{end}}" action="{{$.root.Issue.Link}}/files/reviews/comments" method="post">
|
||||
{{$.root.CsrfTokenHtml}}
|
||||
<input type="hidden" name="origin" value="{{if $.root.PageIsPullFiles}}diff{{else}}timeline{{end}}">
|
||||
<input type="hidden" name="latest_commit_id" value="{{$.root.AfterCommitID}}">
|
||||
|
@@ -60,8 +60,8 @@
|
||||
<span class="no-content">{{ctx.Locale.Tr "repo.issues.no_content"}}</span>
|
||||
{{end}}
|
||||
</div>
|
||||
<div id="issuecomment-{{.ID}}-raw" class="raw-content gt-hidden">{{.Content}}</div>
|
||||
<div class="edit-content-zone gt-hidden" data-update-url="{{$.root.RepoLink}}/comments/{{.ID}}" data-context="{{$.root.RepoLink}}" data-attachment-url="{{$.root.RepoLink}}/comments/{{.ID}}/attachments"></div>
|
||||
<div id="issuecomment-{{.ID}}-raw" class="raw-content tw-hidden">{{.Content}}</div>
|
||||
<div class="edit-content-zone tw-hidden" data-update-url="{{$.root.RepoLink}}/comments/{{.ID}}" data-context="{{$.root.RepoLink}}" data-attachment-url="{{$.root.RepoLink}}/comments/{{.ID}}/attachments"></div>
|
||||
{{if .Attachments}}
|
||||
{{template "repo/issue/view_content/attachments" dict "Attachments" .Attachments "RenderedContent" .RenderedContent}}
|
||||
{{end}}
|
||||
|
@@ -75,7 +75,7 @@
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="scrolling menu reference-list-menu base-tag-list gt-hidden">
|
||||
<div class="scrolling menu reference-list-menu base-tag-list tw-hidden">
|
||||
{{range .Tags}}
|
||||
<div class="item {{if eq $.BaseBranch .}}selected{{end}}" data-url="{{$.RepoLink}}/compare/{{PathEscapeSegments .}}{{$.CompareSeparator}}{{if not $.PullRequestCtx.SameRepo}}{{PathEscape $.HeadUser.Name}}/{{PathEscape $.HeadRepo.Name}}:{{end}}{{PathEscapeSegments $.HeadBranch}}">{{$BaseCompareName}}:{{.}}</div>
|
||||
{{end}}
|
||||
@@ -144,7 +144,7 @@
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="scrolling menu reference-list-menu head-tag-list gt-hidden">
|
||||
<div class="scrolling menu reference-list-menu head-tag-list tw-hidden">
|
||||
{{range .HeadTags}}
|
||||
<div class="{{if eq $.HeadBranch .}}selected{{end}} item" data-url="{{$.RepoLink}}/compare/{{PathEscapeSegments $.BaseBranch}}{{$.CompareSeparator}}{{if not $.PullRequestCtx.SameRepo}}{{PathEscape $.HeadUser.Name}}/{{PathEscape $.HeadRepo.Name}}:{{end}}{{PathEscapeSegments .}}">{{$HeadCompareName}}:{{.}}</div>
|
||||
{{end}}
|
||||
@@ -171,10 +171,10 @@
|
||||
{{if .IsNothingToCompare}}
|
||||
{{if and $.IsSigned $.AllowEmptyPr (not .Repository.IsArchived) .PageIsComparePull}}
|
||||
<div class="ui segment">{{ctx.Locale.Tr "repo.pulls.nothing_to_compare_and_allow_empty_pr"}}</div>
|
||||
<div class="ui info message show-form-container {{if .Flash}}gt-hidden{{end}}">
|
||||
<div class="ui info message show-form-container {{if .Flash}}tw-hidden{{end}}">
|
||||
<button class="ui button primary show-form">{{ctx.Locale.Tr "repo.pulls.new"}}</button>
|
||||
</div>
|
||||
<div class="pullrequest-form {{if not .Flash}}gt-hidden{{end}}">
|
||||
<div class="pullrequest-form {{if not .Flash}}tw-hidden{{end}}">
|
||||
{{template "repo/issue/new_form" .}}
|
||||
</div>
|
||||
{{else if and .HeadIsBranch .BaseIsBranch}}
|
||||
@@ -204,7 +204,7 @@
|
||||
</div>
|
||||
{{else}}
|
||||
{{if and $.IsSigned (not .Repository.IsArchived)}}
|
||||
<div class="ui info message show-form-container {{if .Flash}}gt-hidden{{end}}">
|
||||
<div class="ui info message show-form-container {{if .Flash}}tw-hidden{{end}}">
|
||||
<button class="ui button primary show-form">{{ctx.Locale.Tr "repo.pulls.new"}}</button>
|
||||
</div>
|
||||
{{else if .Repository.IsArchived}}
|
||||
@@ -217,7 +217,7 @@
|
||||
</div>
|
||||
{{end}}
|
||||
{{if $.IsSigned}}
|
||||
<div class="pullrequest-form {{if not .Flash}}gt-hidden{{end}}">
|
||||
<div class="pullrequest-form {{if not .Flash}}tw-hidden{{end}}">
|
||||
{{template "repo/issue/new_form" .}}
|
||||
</div>
|
||||
{{end}}
|
||||
|
@@ -27,14 +27,14 @@
|
||||
{{svg "octicon-unfold" 16 "tw-mr-2"}}
|
||||
{{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-items-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 tw-hidden">
|
||||
{{svg "octicon-fold" 16 "tw-mr-2"}}
|
||||
{{ctx.Locale.Tr "repo.issues.review.hide_resolved"}}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
<div id="code-comments-{{$comment.ID}}" class="field comment-code-cloud {{if $resolved}}gt-hidden{{end}}">
|
||||
<div id="code-comments-{{$comment.ID}}" class="field comment-code-cloud {{if $resolved}}tw-hidden{{end}}">
|
||||
<div class="comment-list">
|
||||
<ui class="ui comments">
|
||||
{{template "repo/diff/comments" dict "root" $ "comments" .comments}}
|
||||
|
Reference in New Issue
Block a user