Conversation
wesrupert
reviewed
Feb 2, 2026
| // EventList: { | ||
| // | ||
| // }, | ||
| [WidgetType.EventList]: { |
Contributor
There was a problem hiding this comment.
If I understand the old code correctly, EventListService is dead code after this change and can be removed as well.
Contributor
Author
There was a problem hiding this comment.
yep! good catch forgot to do that
| }, | ||
|
|
||
| url: `https://${host}/widgets/event-list/v1/${token}`, | ||
| previewUrl: `https://${host}/widgets/event-list/v1/${token}?simulate=1`, |
Contributor
There was a problem hiding this comment.
This will have a merge conflict with #5734, and will need to add the webSettingsUrl property from event-list.ts:
Suggested change
| previewUrl: `https://${host}/widgets/event-list/v1/${token}?simulate=1`, | |
| previewUrl: `https://${host}/widgets/event-list/v1/${token}?simulate=1`, | |
| webSettingsUrl: `https://${host}/dashboard#/widgets/event-list`, |
Whichever one merges last can include the change.
Comment on lines
+98
to
+136
| get eventsByPlatform() { | ||
| const platform = this.UserService.views.platform?.type; | ||
| const baseEvents = { | ||
| show_donations: metadata.bool({ label: $t('Donations') }), | ||
| show_merch: metadata.bool({ label: $t('Merch') }), | ||
| }; | ||
| const platformEvents: PartialRec<TPlatform, any> = { | ||
| twitch: { | ||
| show_follows: metadata.bool({ label: $t('Follows') }), | ||
| show_subscriptions: metadata.bool({ label: $t('Subscriptions') }), | ||
| show_resubs: metadata.bool({ label: $t('Show Resubs') }), | ||
| show_sub_tiers: metadata.bool({ label: $t('Show Sub Tiers') }), | ||
| show_bits: metadata.bool({ label: $t('Bits') }), | ||
| show_raids: metadata.bool({ label: $t('Raids') }), | ||
| }, | ||
| facebook: { | ||
| show_follows: metadata.bool({ label: $t('Follows') }), | ||
| show_stars: metadata.bool({ label: $t('Stars') }), | ||
| show_supports: metadata.bool({ label: $t('Supporters') }), | ||
| show_likes: metadata.bool({ label: $t('Likes') }), | ||
| show_shares: metadata.bool({ label: $t('Shares') }), | ||
| }, | ||
| youtube: { | ||
| show_subscribers: metadata.bool({ label: $t('Subscriptions') }), | ||
| show_sponsors: metadata.bool({ label: $t('Members') }), | ||
| show_fanfundings: metadata.bool({ label: $t('Super Chats') }), | ||
| }, | ||
| trovo: { | ||
| show_follows: metadata.bool({ label: $t('Follows') }), | ||
| show_raids: metadata.bool({ label: $t('Raids') }), | ||
| show_subscriptions: metadata.bool({ label: $t('Subscriptions') }), | ||
| show_resubs: metadata.bool({ label: $t('Show Resubs') }), | ||
| show_sub_gifts: metadata.bool({ label: $t('Show Gift Subs') }), | ||
| show_sub_tiers: metadata.bool({ label: $t('Show Sub Tiers') }), | ||
| }, | ||
| }; | ||
| if (!platform) return baseEvents; | ||
| return { ...platformEvents[platform], ...baseEvents }; | ||
| } |
Contributor
There was a problem hiding this comment.
Moving this from a map to a switch saves loading all the loc strings for the unused platforms:
Suggested change
| get eventsByPlatform() { | |
| const platform = this.UserService.views.platform?.type; | |
| const baseEvents = { | |
| show_donations: metadata.bool({ label: $t('Donations') }), | |
| show_merch: metadata.bool({ label: $t('Merch') }), | |
| }; | |
| const platformEvents: PartialRec<TPlatform, any> = { | |
| twitch: { | |
| show_follows: metadata.bool({ label: $t('Follows') }), | |
| show_subscriptions: metadata.bool({ label: $t('Subscriptions') }), | |
| show_resubs: metadata.bool({ label: $t('Show Resubs') }), | |
| show_sub_tiers: metadata.bool({ label: $t('Show Sub Tiers') }), | |
| show_bits: metadata.bool({ label: $t('Bits') }), | |
| show_raids: metadata.bool({ label: $t('Raids') }), | |
| }, | |
| facebook: { | |
| show_follows: metadata.bool({ label: $t('Follows') }), | |
| show_stars: metadata.bool({ label: $t('Stars') }), | |
| show_supports: metadata.bool({ label: $t('Supporters') }), | |
| show_likes: metadata.bool({ label: $t('Likes') }), | |
| show_shares: metadata.bool({ label: $t('Shares') }), | |
| }, | |
| youtube: { | |
| show_subscribers: metadata.bool({ label: $t('Subscriptions') }), | |
| show_sponsors: metadata.bool({ label: $t('Members') }), | |
| show_fanfundings: metadata.bool({ label: $t('Super Chats') }), | |
| }, | |
| trovo: { | |
| show_follows: metadata.bool({ label: $t('Follows') }), | |
| show_raids: metadata.bool({ label: $t('Raids') }), | |
| show_subscriptions: metadata.bool({ label: $t('Subscriptions') }), | |
| show_resubs: metadata.bool({ label: $t('Show Resubs') }), | |
| show_sub_gifts: metadata.bool({ label: $t('Show Gift Subs') }), | |
| show_sub_tiers: metadata.bool({ label: $t('Show Sub Tiers') }), | |
| }, | |
| }; | |
| if (!platform) return baseEvents; | |
| return { ...platformEvents[platform], ...baseEvents }; | |
| } | |
| get eventsByPlatform() { | |
| const baseEvents = { | |
| show_donations: metadata.bool({ label: $t('Donations') }), | |
| show_merch: metadata.bool({ label: $t('Merch') }), | |
| }; | |
| switch (this.UserService.views.platform?.type) { | |
| case 'twitch': | |
| return { | |
| show_follows: metadata.bool({ label: $t('Follows') }), | |
| show_subscriptions: metadata.bool({ label: $t('Subscriptions') }), | |
| show_resubs: metadata.bool({ label: $t('Show Resubs') }), | |
| show_sub_tiers: metadata.bool({ label: $t('Show Sub Tiers') }), | |
| show_bits: metadata.bool({ label: $t('Bits') }), | |
| show_raids: metadata.bool({ label: $t('Raids') }), | |
| ...baseEvents, | |
| }; | |
| case 'facebook': | |
| return { | |
| show_follows: metadata.bool({ label: $t('Follows') }), | |
| show_stars: metadata.bool({ label: $t('Stars') }), | |
| show_supports: metadata.bool({ label: $t('Supporters') }), | |
| show_likes: metadata.bool({ label: $t('Likes') }), | |
| show_shares: metadata.bool({ label: $t('Shares') }), | |
| ...baseEvents, | |
| }; | |
| case 'youtube': | |
| return { | |
| show_subscribers: metadata.bool({ label: $t('Subscriptions') }), | |
| show_sponsors: metadata.bool({ label: $t('Members') }), | |
| show_fanfundings: metadata.bool({ label: $t('Super Chats') }), | |
| ...baseEvents, | |
| }; | |
| case 'trovo': | |
| return { | |
| show_follows: metadata.bool({ label: $t('Follows') }), | |
| show_raids: metadata.bool({ label: $t('Raids') }), | |
| show_subscriptions: metadata.bool({ label: $t('Subscriptions') }), | |
| show_resubs: metadata.bool({ label: $t('Show Resubs') }), | |
| show_sub_gifts: metadata.bool({ label: $t('Show Gift Subs') }), | |
| show_sub_tiers: metadata.bool({ label: $t('Show Sub Tiers') }), | |
| ...baseEvents, | |
| }; | |
| default: | |
| return baseEvents; | |
| } | |
| } |
wesrupert
approved these changes
Feb 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.