1
0
Fork 0
forked from forgejo/forgejo

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>
(cherry picked from commit ec3d467f15a683b305ac165c3eba6683628dcb25)

Conflicts:
	templates/install.tmpl
	templates/repo/diff/conversation.tmpl
	templates/repo/issue/view_content/conversation.tmpl
	templates/repo/issue/view_content/sidebar.tmpl
	templates/repo/issue/view_title.tmpl

	resolved by prefering Forgejo version and applying the
	commands to all files
This commit is contained in:
silverwind 2024-03-24 19:23:38 +01:00 committed by Earl Warren
parent e28f4328b3
commit 5016bc5d5c
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
82 changed files with 195 additions and 192 deletions

View file

@ -222,7 +222,7 @@ export function initRepoIssueCodeCommentCancel() {
$(document).on('click', '.cancel-code-comment', (e) => {
const $form = $(e.currentTarget).closest('form');
if ($form.length > 0 && $form.hasClass('comment-form')) {
$form.addClass('gt-hidden');
$form.addClass('tw-hidden');
showElem($form.closest('.comment-code-cloud').find('button.comment-form-reply'));
} else {
$form.closest('.comment-code-cloud').remove();
@ -397,7 +397,7 @@ export function initRepoIssueComments() {
export async function handleReply($el) {
hideElem($el);
const $form = $el.closest('.comment-code-cloud').find('.comment-form');
$form.removeClass('gt-hidden');
$form.removeClass('tw-hidden');
const $textarea = $form.find('textarea');
let editor = getComboMarkdownEditor($textarea);
@ -433,10 +433,10 @@ export function initRepoPullRequestReview() {
if ($diffHeader[0]) {
offset += $('.diff-detail-box').outerHeight() + $diffHeader.outerHeight();
}
$(`#show-outdated-${id}`).addClass('gt-hidden');
$(`#code-comments-${id}`).removeClass('gt-hidden');
$(`#code-preview-${id}`).removeClass('gt-hidden');
$(`#hide-outdated-${id}`).removeClass('gt-hidden');
$(`#show-outdated-${id}`).addClass('tw-hidden');
$(`#code-comments-${id}`).removeClass('tw-hidden');
$(`#code-preview-${id}`).removeClass('tw-hidden');
$(`#hide-outdated-${id}`).removeClass('tw-hidden');
// if the comment box is folded, expand it
if ($ancestorDiffBox.attr('data-folded') && $ancestorDiffBox.attr('data-folded') === 'true') {
setFileFolding($ancestorDiffBox[0], $ancestorDiffBox.find('.fold-file')[0], false);
@ -452,19 +452,19 @@ export function initRepoPullRequestReview() {
$(document).on('click', '.show-outdated', function (e) {
e.preventDefault();
const id = $(this).data('comment');
$(this).addClass('gt-hidden');
$(`#code-comments-${id}`).removeClass('gt-hidden');
$(`#code-preview-${id}`).removeClass('gt-hidden');
$(`#hide-outdated-${id}`).removeClass('gt-hidden');
$(this).addClass('tw-hidden');
$(`#code-comments-${id}`).removeClass('tw-hidden');
$(`#code-preview-${id}`).removeClass('tw-hidden');
$(`#hide-outdated-${id}`).removeClass('tw-hidden');
});
$(document).on('click', '.hide-outdated', function (e) {
e.preventDefault();
const id = $(this).data('comment');
$(this).addClass('gt-hidden');
$(`#code-comments-${id}`).addClass('gt-hidden');
$(`#code-preview-${id}`).addClass('gt-hidden');
$(`#show-outdated-${id}`).removeClass('gt-hidden');
$(this).addClass('tw-hidden');
$(`#code-comments-${id}`).addClass('tw-hidden');
$(`#code-preview-${id}`).addClass('tw-hidden');
$(`#show-outdated-${id}`).removeClass('tw-hidden');
});
$(document).on('click', 'button.comment-form-reply', async function (e) {