Skip to content

Commit 46f8110

Browse files
authored
chore: Remove old VoIP files and references (RocketChat#37060)
1 parent 287f302 commit 46f8110

99 files changed

Lines changed: 9 additions & 6987 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/meteor/client/NavBarV2/NavBarControls/NavBarControlsMenu.tsx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,21 @@
11
import { NavBarItem } from '@rocket.chat/fuselage';
22
import type { GenericMenuItemProps } from '@rocket.chat/ui-client';
33
import { GenericMenu } from '@rocket.chat/ui-client';
4-
import { useVoipState } from '@rocket.chat/ui-voip';
54
import type { HTMLAttributes } from 'react';
65
import { useTranslation } from 'react-i18next';
76

87
import { useOmnichannelEnabled } from '../../hooks/omnichannel/useOmnichannelEnabled';
98

109
type NavBarControlsMenuProps = Omit<HTMLAttributes<HTMLElement>, 'is'> & {
11-
voipItems: GenericMenuItemProps[];
1210
omnichannelItems: GenericMenuItemProps[];
1311
isPressed: boolean;
1412
};
1513

16-
const NavBarControlsMenu = ({ voipItems, omnichannelItems, isPressed, ...props }: NavBarControlsMenuProps) => {
14+
const NavBarControlsMenu = ({ omnichannelItems, isPressed, ...props }: NavBarControlsMenuProps) => {
1715
const { t } = useTranslation();
18-
const { isEnabled: showVoip } = useVoipState();
1916
const showOmnichannel = useOmnichannelEnabled();
2017

2118
const sections = [
22-
{
23-
title: t('Voice_Call'),
24-
items: showVoip ? voipItems : [],
25-
},
2619
{
2720
title: t('Omnichannel'),
2821
items: showOmnichannel ? omnichannelItems : [],

apps/meteor/client/NavBarV2/NavBarControls/NavBarControlsWithCall.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,11 @@ import { useOmnichannelCallDialPadAction } from '../NavBarOmnichannelGroup/hooks
66
import { useOmnichannelCallToggleAction } from '../NavBarOmnichannelGroup/hooks/useOmnichannelCallToggleAction';
77

88
type NavBarControlsMenuProps = Omit<HTMLAttributes<HTMLElement>, 'is'> & {
9-
voipItems: GenericMenuItemProps[];
109
omnichannelItems: GenericMenuItemProps[];
1110
isPressed: boolean;
1211
};
1312

14-
const NavBarControlsWithCall = ({ voipItems, omnichannelItems, isPressed, ...props }: NavBarControlsMenuProps) => {
13+
const NavBarControlsWithCall = ({ omnichannelItems, isPressed, ...props }: NavBarControlsMenuProps) => {
1514
const {
1615
icon: omnichannelCallIcon,
1716
title: omnichannelCallTitle,
@@ -44,7 +43,7 @@ const NavBarControlsWithCall = ({ voipItems, omnichannelItems, isPressed, ...pro
4443
},
4544
] as GenericMenuItemProps[];
4645

47-
return <NavBarControlsMenu voipItems={voipItems} omnichannelItems={omnichannelItemsWithCall} isPressed={isPressed} {...props} />;
46+
return <NavBarControlsMenu omnichannelItems={omnichannelItemsWithCall} isPressed={isPressed} {...props} />;
4847
};
4948

5049
export default NavBarControlsWithCall;

apps/meteor/client/NavBarV2/NavBarControls/NavBarControlsWithData.tsx

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,12 @@ import { useIsCallEnabled } from '../../contexts/CallContext';
77
import { useOmnichannelContactAction } from '../NavBarOmnichannelGroup/hooks/useOmnichannelContactAction';
88
import { useOmnichannelLivechatToggle } from '../NavBarOmnichannelGroup/hooks/useOmnichannelLivechatToggle';
99
import { useOmnichannelQueueAction } from '../NavBarOmnichannelGroup/hooks/useOmnichannelQueueAction';
10-
import { useVoipDialerAction } from '../NavBarVoipGroup/hooks/useVoipDialerAction';
11-
import { useVoipTogglerAction } from '../NavBarVoipGroup/hooks/useVoipTogglerAction';
1210

1311
type NavBarControlsMenuProps = Omit<HTMLAttributes<HTMLElement>, 'is'>;
1412

1513
const NavBarControlsWithData = (props: NavBarControlsMenuProps) => {
1614
const isCallEnabled = useIsCallEnabled();
1715

18-
const { title: dialerTitle, handleToggleDialer, isPressed: isVoipDialerPressed, isDisabled: dialerDisabled } = useVoipDialerAction();
19-
const { isRegistered, title: togglerTitle, handleToggleVoip, isDisabled: togglerDisabled } = useVoipTogglerAction();
20-
2116
const {
2217
isEnabled: queueEnabled,
2318
icon: queueIcon,
@@ -39,30 +34,12 @@ const NavBarControlsWithData = (props: NavBarControlsMenuProps) => {
3934
handleAvailableStatusChange,
4035
} = useOmnichannelLivechatToggle();
4136

42-
const voipItems = [
43-
{
44-
id: 'voipDialer',
45-
icon: 'dialpad',
46-
content: dialerTitle,
47-
onClick: handleToggleDialer,
48-
disabled: dialerDisabled,
49-
},
50-
{
51-
id: 'voipToggler',
52-
icon: isRegistered ? 'phone-disabled' : 'phone',
53-
content: togglerTitle,
54-
onClick: handleToggleVoip,
55-
disabled: togglerDisabled,
56-
},
57-
].filter(Boolean) as GenericMenuItemProps[];
58-
5937
const omnichannelItems = [
6038
queueEnabled && {
6139
id: 'omnichannelQueue',
6240
icon: queueIcon,
6341
content: queueTitle,
6442
onClick: handleGoToQueue,
65-
disabled: dialerDisabled,
6643
},
6744
{
6845
id: 'omnichannelContact',
@@ -78,13 +55,13 @@ const NavBarControlsWithData = (props: NavBarControlsMenuProps) => {
7855
},
7956
].filter(Boolean) as GenericMenuItemProps[];
8057

81-
const isPressed = isVoipDialerPressed || isQueuePressed || isContactPressed;
58+
const isPressed = isQueuePressed || isContactPressed;
8259

8360
if (isCallEnabled) {
84-
return <NavbarControlsWithCall voipItems={voipItems} omnichannelItems={omnichannelItems} isPressed={isPressed} {...props} />;
61+
return <NavbarControlsWithCall omnichannelItems={omnichannelItems} isPressed={isPressed} {...props} />;
8562
}
8663

87-
return <NavBarControlsMenu voipItems={voipItems} omnichannelItems={omnichannelItems} isPressed={isPressed} {...props} />;
64+
return <NavBarControlsMenu omnichannelItems={omnichannelItems} isPressed={isPressed} {...props} />;
8865
};
8966

9067
export default NavBarControlsWithData;

apps/meteor/client/NavBarV2/NavBarVoipGroup/NavBarItemVoipToggler.tsx

Lines changed: 0 additions & 16 deletions
This file was deleted.

apps/meteor/client/NavBarV2/NavBarVoipGroup/hooks/useVoipDialerAction.ts

Lines changed: 0 additions & 31 deletions
This file was deleted.

apps/meteor/client/NavBarV2/NavBarVoipGroup/hooks/useVoipTogglerAction.ts

Lines changed: 0 additions & 60 deletions
This file was deleted.

apps/meteor/client/hooks/roomActions/useVoiceCallRoomAction.tsx

Lines changed: 0 additions & 78 deletions
This file was deleted.

apps/meteor/client/sidebar/header/hooks/useVoipItemsSection.tsx

Lines changed: 0 additions & 75 deletions
This file was deleted.

0 commit comments

Comments
 (0)