Skip to content

Conversation

@TimurRin
Copy link

This PR adds Select All and Deselect All buttons to the 'Custom events' section of the webhook view.

This is useful when you need select all events but one.

select-deselect

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Nov 19, 2025
@github-actions github-actions bot added modifies/translation modifies/templates This PR modifies the template files labels Nov 19, 2025
@lunny lunny added the topic/ui Change the appearance of the Gitea UI label Nov 19, 2025
@lunny lunny added this to the 1.26.0 milestone Nov 19, 2025
all.forEach(i => { i.checked = false; });
});
})();
</script>
Copy link
Member

@silverwind silverwind Dec 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. We need to move this code to web_src/js/features/repo-settings.ts. We avoid inline scripts because they are problematic with CSP and also the linter does not lint them.
  2. Use for-of loops instead of forEach, but the linter will also tell you that 😉.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it better to place this code to web_src/js/features/comp/WebHookEditor.ts? There is already 'custom events' switch logic presented and webhooks are not bound to repos.

{{ctx.Locale.Tr "repo.settings.event_button_deselect_all"}}
</button>
</div>
</div>
Copy link
Member

@silverwind silverwind Dec 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move it to line 97. It's more logical for it to be after the "Repository Events" header.

@silverwind
Copy link
Member

Definitely a useful feature, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. modifies/templates This PR modifies the template files modifies/translation topic/ui Change the appearance of the Gitea UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants