mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-03 21:08:25 +00:00 
			
		
		
		
	Replace more gt- with tw-, update frontend docs (#29595)
				
					
				
			Tested a few things, all working fine. Not sure if the chinese machine translation is good. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
		@@ -69,9 +69,9 @@ function initRepoDiffConversationForm() {
 | 
			
		||||
 | 
			
		||||
      $form.closest('.conversation-holder').replaceWith($newConversationHolder);
 | 
			
		||||
      if ($form.closest('tr').data('line-type') === 'same') {
 | 
			
		||||
        $(`[data-path="${path}"] .add-code-comment[data-idx="${idx}"]`).addClass('gt-invisible');
 | 
			
		||||
        $(`[data-path="${path}"] .add-code-comment[data-idx="${idx}"]`).addClass('tw-invisible');
 | 
			
		||||
      } else {
 | 
			
		||||
        $(`[data-path="${path}"] .add-code-comment[data-side="${side}"][data-idx="${idx}"]`).addClass('gt-invisible');
 | 
			
		||||
        $(`[data-path="${path}"] .add-code-comment[data-side="${side}"][data-idx="${idx}"]`).addClass('tw-invisible');
 | 
			
		||||
      }
 | 
			
		||||
      $newConversationHolder.find('.dropdown').dropdown();
 | 
			
		||||
      initCompReactionSelector($newConversationHolder);
 | 
			
		||||
 
 | 
			
		||||
@@ -180,9 +180,9 @@ export function initRepoIssueCommentDelete() {
 | 
			
		||||
          const idx = $conversationHolder.data('idx');
 | 
			
		||||
          const lineType = $conversationHolder.closest('tr').data('line-type');
 | 
			
		||||
          if (lineType === 'same') {
 | 
			
		||||
            $(`[data-path="${path}"] .add-code-comment[data-idx="${idx}"]`).removeClass('gt-invisible');
 | 
			
		||||
            $(`[data-path="${path}"] .add-code-comment[data-idx="${idx}"]`).removeClass('tw-invisible');
 | 
			
		||||
          } else {
 | 
			
		||||
            $(`[data-path="${path}"] .add-code-comment[data-side="${side}"][data-idx="${idx}"]`).removeClass('gt-invisible');
 | 
			
		||||
            $(`[data-path="${path}"] .add-code-comment[data-side="${side}"][data-idx="${idx}"]`).removeClass('tw-invisible');
 | 
			
		||||
          }
 | 
			
		||||
          $conversationHolder.remove();
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
@@ -150,7 +150,7 @@ export function initRepoCommentForm() {
 | 
			
		||||
 | 
			
		||||
        if ($(this).hasClass('checked')) {
 | 
			
		||||
          $(this).removeClass('checked');
 | 
			
		||||
          $(this).find('.octicon-check').addClass('gt-invisible');
 | 
			
		||||
          $(this).find('.octicon-check').addClass('tw-invisible');
 | 
			
		||||
          if (hasUpdateAction) {
 | 
			
		||||
            if (!($(this).data('id') in items)) {
 | 
			
		||||
              items[$(this).data('id')] = {
 | 
			
		||||
@@ -164,7 +164,7 @@ export function initRepoCommentForm() {
 | 
			
		||||
          }
 | 
			
		||||
        } else {
 | 
			
		||||
          $(this).addClass('checked');
 | 
			
		||||
          $(this).find('.octicon-check').removeClass('gt-invisible');
 | 
			
		||||
          $(this).find('.octicon-check').removeClass('tw-invisible');
 | 
			
		||||
          if (hasUpdateAction) {
 | 
			
		||||
            if (!($(this).data('id') in items)) {
 | 
			
		||||
              items[$(this).data('id')] = {
 | 
			
		||||
@@ -218,7 +218,7 @@ export function initRepoCommentForm() {
 | 
			
		||||
 | 
			
		||||
      $(this).parent().find('.item').each(function () {
 | 
			
		||||
        $(this).removeClass('checked');
 | 
			
		||||
        $(this).find('.octicon-check').addClass('gt-invisible');
 | 
			
		||||
        $(this).find('.octicon-check').addClass('tw-invisible');
 | 
			
		||||
      });
 | 
			
		||||
 | 
			
		||||
      if (selector === 'select-reviewers-modify' || selector === 'select-assignees-modify') {
 | 
			
		||||
 
 | 
			
		||||
@@ -9,13 +9,13 @@ export function initUserAuthOauth2() {
 | 
			
		||||
 | 
			
		||||
  for (const link of outer.querySelectorAll('.oauth-login-link')) {
 | 
			
		||||
    link.addEventListener('click', () => {
 | 
			
		||||
      inner.classList.add('gt-invisible');
 | 
			
		||||
      inner.classList.add('tw-invisible');
 | 
			
		||||
      outer.classList.add('is-loading');
 | 
			
		||||
      setTimeout(() => {
 | 
			
		||||
        // recover previous content to let user try again
 | 
			
		||||
        // usually redirection will be performed before this action
 | 
			
		||||
        outer.classList.remove('is-loading');
 | 
			
		||||
        inner.classList.remove('gt-invisible');
 | 
			
		||||
        inner.classList.remove('tw-invisible');
 | 
			
		||||
      }, 5000);
 | 
			
		||||
    });
 | 
			
		||||
  }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user