File tree Expand file tree Collapse file tree 3 files changed +10
-5
lines changed
apps/webapp/src/script/components
Modals/CreateConversation/CreateConversationSteps Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 2020import { CONVERSATION_PROTOCOL } from '@wireapp/api-client/lib/team' ;
2121import { container } from 'tsyringe' ;
2222
23+ import { ConversationType } from 'Components/Modals/CreateConversation/types' ;
2324import { AppsDisabledNote } from 'Components/Note/AppsDisabledNote/AppsDisabledNote' ;
2425import { InfoToggle } from 'Components/toggle/InfoToggle' ;
2526import { 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"
Original file line number Diff line number Diff 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
3838export const HeaderStyle : CSSObject = {
Original file line number Diff line number Diff line change 1717 *
1818 */
1919
20- import { useId } from 'react' ;
20+ import React , { useId } from 'react' ;
2121
2222import 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
3435const 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} ;
You can’t perform that action at this time.
0 commit comments