Skip to content

Commit

Permalink
Clarify (& localize) option to include matching tags in webhook
Browse files Browse the repository at this point in the history
  • Loading branch information
dsevillamartin committed Jan 23, 2025
1 parent 8e1cb6b commit af71433
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions js/src/admin/components/WebhookEditModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ export default class WebhookEditModal extends Modal {
};

const group = app.store.getById('groups', this.groupId());
const isFilteringTags = !!this.webhook.tags()?.length;

return (
<div className="FofWebhooksModal Modal-body">
Expand Down Expand Up @@ -156,8 +157,8 @@ export default class WebhookEditModal extends Modal {
<p className="helpText">{app.translator.trans('fof-webhooks.admin.settings.modal.description')}</p>
{this.webhook.service() !== 'microsoft-teams' && (
<div style={{ display: 'block', marginTop: '30px' }}>
<Switch state={this.includeTags()} onchange={this.includeTags}>
{'Include tags'}
<Switch state={this.includeTags()} onchange={this.includeTags} disabled={!isFilteringTags}>
{app.translator.trans('fof-webhooks.admin.settings.modal.include_matching_tags_label')}
</Switch>
</div>
)}
Expand Down
2 changes: 2 additions & 0 deletions resources/locale/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ fof-webhooks:

events_label: Events

include_matching_tags_label: Include matching tags -- for webhooks restricted to specific tags, show which ones the event matched

services:
discord: Discord
slack: Slack
Expand Down

0 comments on commit af71433

Please sign in to comment.