Skip to content

Commit

Permalink
fix: apply suggestion from review
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcosSpessatto committed Jul 1, 2022
1 parent d75cb06 commit e5cc72c
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 24 deletions.
19 changes: 10 additions & 9 deletions apps/meteor/app/livestream/client/tabBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@ addAction('livestream', ({ room }) => {
() =>
enabled
? {
groups: ['channel', 'group', 'team'],
id: 'livestream',
title: 'Livestream',
icon: 'podcast',
template: 'liveStreamTab',
order: isLive ? -1 : 15,
disabled: federated,
renderAction: (props): ReactNode => (
'groups': ['channel', 'group', 'team'],
'id': 'livestream',
'title': 'Livestream',
'icon': 'podcast',
'template': 'liveStreamTab',
'order': isLive ? -1 : 15,
'disabled': federated,
'data-tooltip': 'Discussions_unavailable_for_federation',
'renderAction': (props): ReactNode => (
<Header.ToolBoxAction {...props}>
{isLive ? (
<Header.Badge title={t('Livestream_live_now')} variant='danger'>
Expand All @@ -32,7 +33,7 @@ addAction('livestream', ({ room }) => {
) : null}
</Header.ToolBoxAction>
),
renderOption: ({ label: { title, icon }, ...props }: any): ReactNode => (
'renderOption': ({ label: { title, icon }, ...props }: any): ReactNode => (
<Option label={title} title={title} icon={icon} {...props}>
{isLive ? (
<Badge title={t('Livestream_live_now')} variant='danger'>
Expand Down
15 changes: 8 additions & 7 deletions apps/meteor/app/message-pin/client/tabBar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@ addAction('pinned-messages', ({ room }) => {
() =>
pinningAllowed
? {
groups: ['channel', 'group', 'direct', 'direct_multiple', 'team'],
id: 'pinned-messages',
title: 'Pinned_Messages',
icon: 'pin',
template: 'pinnedMessages',
disabled: federated,
order: 11,
'groups': ['channel', 'group', 'direct', 'direct_multiple', 'team'],
'id': 'pinned-messages',
'title': 'Pinned_Messages',
'icon': 'pin',
'template': 'pinnedMessages',
'data-tooltip': 'Pinned_messages_unavailable_for_federation',
'disabled': federated,
'order': 11,
}
: null,
[pinningAllowed, federated],
Expand Down
15 changes: 8 additions & 7 deletions apps/meteor/app/ui-clean-history/client/lib/tabBar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,15 @@ addAction('clean-history', ({ room }) => {
() =>
hasPermission
? {
groups: ['channel', 'group', 'team', 'direct_multiple', 'direct'],
id: 'clean-history',
full: true,
title: 'Prune_Messages',
icon: 'eraser',
disabled: federated,
'groups': ['channel', 'group', 'team', 'direct_multiple', 'direct'],
'id': 'clean-history',
'full': true,
'title': 'Prune_Messages',
'icon': 'eraser',
'disabled': federated,
'data-tooltip': 'Clean_History_unavailable_for_federation',
template,
order: 250,
'order': 250,
}
: null,
[hasPermission, federated],
Expand Down
3 changes: 2 additions & 1 deletion apps/meteor/ee/client/hooks/useHasLicense.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { useState, useEffect } from 'react';

import { hasLicense } from '../../app/license/client';
import { BundleFeature } from '../../app/license/server/bundles';

export const useHasLicense = (licenseName: string): 'loading' | boolean => {
export const useHasLicense = (licenseName: BundleFeature): 'loading' | boolean => {
const [license, setLicense] = useState<'loading' | boolean>('loading');

useEffect(() => {
Expand Down
3 changes: 3 additions & 0 deletions apps/meteor/packages/rocketchat-i18n/i18n/en.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -896,6 +896,7 @@
"Choose_the_alias_that_will_appear_before_the_username_in_messages": "Choose the alias that will appear before the username in messages.",
"Choose_the_username_that_this_integration_will_post_as": "Choose the username that this integration will post as.",
"Choose_users": "Choose users",
"Clean_History_unavailable_for_federation": "Clean history is unavailable for federation",
"Clean_Usernames": "Clear usernames",
"clean-channel-history": "Clean Channel History",
"clean-channel-history_description": "Permission to Clear the history from channels",
Expand Down Expand Up @@ -2824,6 +2825,7 @@
"Livestream_enable_audio_only": "Enable only audio mode",
"Livestream_enabled": "Livestream Enabled",
"Livestream_not_found": "Livestream not available",
"Livestream_unavailable_for_federation": "Livestram is unavailable for Federated rooms",
"Livestream_popout": "Open Livestream",
"Livestream_source_changed_succesfully": "Livestream source changed successfully",
"Livestream_switch_to_room": "Switch to current room's livestream",
Expand Down Expand Up @@ -3480,6 +3482,7 @@
"pin-message_description": "Permission to pin a message in a channel",
"Pinned_a_message": "Pinned a message:",
"Pinned_Messages": "Pinned Messages",
"Pinned_messages_unavailable_for_federation": "Pinned Messages are not available for federated rooms.",
"pinning-not-allowed": "Pinning is not allowed",
"PiwikAdditionalTrackers": "Additional Piwik Sites",
"PiwikAdditionalTrackers_Description": "Enter addtitional Piwik website URLs and SiteIDs in the following format, if you want to track the same data into different websites: [ { \"trackerURL\" : \"https://my.piwik.domain2/\", \"siteId\" : 42 }, { \"trackerURL\" : \"https://my.piwik.domain3/\", \"siteId\" : 15 } ]",
Expand Down

0 comments on commit e5cc72c

Please sign in to comment.