Skip to content

Commit dc7fe43

Browse files
committed
welp
1 parent a589545 commit dc7fe43

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

client/sidebar/sections/components/OmnichannelCallToggleReady.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,20 @@ export const OmnichannelCallToggleReady = (): ReactElement => {
1313
const [onCall, setOnCall] = useState(false);
1414
const callerInfo = useCallerInfo();
1515

16-
const getColor = (): string | undefined => {
17-
if (registered && !onCall) {
18-
return 'success';
16+
const getTooltip = (): string => {
17+
if (!registered) {
18+
return t('Enable');
1919
}
20-
if (registered && onCall) {
20+
if (registered && !onCall) {
2121
// Color for this state still not defined
22-
return 'success';
22+
return t('Disable');
2323
}
24-
return undefined;
24+
return t('Cannot_disable_while_on_call');
2525
};
2626

2727
const voipCallIcon = {
28-
title: !registered ? t('Enable') : t('Disable'),
29-
color: getColor(),
28+
title: getTooltip(),
29+
color: registered ? 'success' : undefined,
3030
icon: registered ? 'phone' : 'phone-disabled',
3131
} as const;
3232

packages/rocketchat-i18n/i18n/en.i18n.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -741,6 +741,7 @@
741741
"Cannot_invite_users_to_direct_rooms": "Cannot invite users to direct rooms",
742742
"Cannot_open_conversation_with_yourself": "Cannot Direct Message with yourself",
743743
"Cannot_share_your_location": "Cannot share your location...",
744+
"Cannot_disable_while_on_call": "Can't change status during calls ",
744745
"CAS_autoclose": "Autoclose Login Popup",
745746
"CAS_base_url": "SSO Base URL",
746747
"CAS_base_url_Description": "The base URL of your external SSO service e.g: https://sso.example.undef/sso/",

0 commit comments

Comments
 (0)