Skip to content

Commit 3460c3a

Browse files
committed
fixed apps not enabled note formatting
1 parent 4667b1e commit 3460c3a

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

apps/webapp/src/script/components/Modals/CreateConversation/CreateConversationSteps/Preference.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import {CONVERSATION_PROTOCOL} from '@wireapp/api-client/lib/team';
2121
import {container} from 'tsyringe';
2222

23+
import {ConversationType} from 'Components/Modals/CreateConversation/types';
2324
import {AppsDisabledNote} from 'Components/Note/AppsDisabledNote/AppsDisabledNote';
2425
import {InfoToggle} from 'Components/toggle/InfoToggle';
2526
import {TeamState} from 'Repositories/team/TeamState';
@@ -64,7 +65,9 @@ export const Preference = () => {
6465

6566
const isAppsFeatureAvailable =
6667
(defaultProtocol === CONVERSATION_PROTOCOL.MLS && isAppsEnabled) ||
67-
(defaultProtocol === CONVERSATION_PROTOCOL.PROTEUS && hasWhitelistedServices);
68+
(defaultProtocol === CONVERSATION_PROTOCOL.PROTEUS &&
69+
hasWhitelistedServices &&
70+
conversationType !== ConversationType.Channel);
6871

6972
// Read receipts are temporarily disabled for MLS groups and channels until it is supported
7073
const areReadReceiptsEnabled = defaultProtocol !== CONVERSATION_PROTOCOL.MLS;
@@ -89,10 +92,9 @@ export const Preference = () => {
8992
isDisabled={!isAppsFeatureAvailable}
9093
name={t('servicesOptionsTitle')}
9194
isChecked={isServicesEnabled && isAppsFeatureAvailable}
95+
label={!isAppsFeatureAvailable && <AppsDisabledNote />}
9296
/>
9397

94-
{!isAppsFeatureAvailable && <AppsDisabledNote />}
95-
9698
{areReadReceiptsEnabled && (
9799
<InfoToggle
98100
className="modal-style"

apps/webapp/src/script/components/Note/Note.styles.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ export const ContainerStyle: CSSObject = {
3131
},
3232
border: '1px solid var(--accent-color-500)',
3333
borderRadius: '0.5rem',
34-
color: '#000',
3534
lineHeight: '1.5',
35+
marginTop: '0.3rem',
3636
};
3737

3838
export const HeaderStyle: CSSObject = {

apps/webapp/src/script/components/toggle/InfoToggle.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*
1818
*/
1919

20-
import {useId} from 'react';
20+
import React, {useId} from 'react';
2121

2222
import cx from 'classnames';
2323

@@ -29,6 +29,7 @@ interface InfoToggleProps {
2929
name: string;
3030
className?: string;
3131
setIsChecked: (checked: boolean) => void;
32+
label?: React.ReactNode;
3233
}
3334

3435
const InfoToggle = ({
@@ -39,6 +40,7 @@ const InfoToggle = ({
3940
isDisabled,
4041
name,
4142
setIsChecked,
43+
label,
4244
}: InfoToggleProps) => {
4345
const dataUieNameInfoText = `status-info-toggle-${dataUieName}`;
4446
const dataUieNameLabelText = `do-toggle-${dataUieName}`;
@@ -77,6 +79,7 @@ const InfoToggle = ({
7779
</button>
7880
</div>
7981
</div>
82+
{label}
8083
</div>
8184
);
8285
};

0 commit comments

Comments
 (0)