Hide multi device UI if flag is not set

pull/1298/head
Mikunj 5 years ago
parent 22c64395d9
commit b75b02c5a2

@ -1302,10 +1302,6 @@
"message": "Typing Indicators", "message": "Typing Indicators",
"description": "Title of the typing indicators setting" "description": "Title of the typing indicators setting"
}, },
"multiDeviceDisabledTemporary": {
"message": "MultiDevice disabled temporarily",
"description": "Description of why multi device is disabled"
},
"messageTTL": { "messageTTL": {
"message": "Message TTL", "message": "Message TTL",
"description": "Title of the Message TTL setting" "description": "Title of the Message TTL setting"

@ -225,7 +225,7 @@ export class LeftPaneSettingSection extends React.Component<Props, State> {
{ {
id: SessionSettingCategory.Devices, id: SessionSettingCategory.Devices,
title: window.i18n('devicesSettingsTitle'), title: window.i18n('devicesSettingsTitle'),
hidden: isSecondaryDevice, hidden: !window.lokiFeatureFlags.useMultiDevice || isSecondaryDevice,
}, },
]; ];
} }

@ -557,9 +557,12 @@ export class RegistrationTabs extends React.Component<{}, State> {
SessionButtonType.BrandOutline, SessionButtonType.BrandOutline,
SessionButtonColor.Green SessionButtonColor.Green
)} )}
{/*<h4>{or}</h4>*/} {window.lokiFeatureFlags.useMultiDevice && (
{/* FIXME enable back to allow linking of device <>
this.renderLinkDeviceToExistingAccountButton() */} <h4>{or}</h4>
{this.renderLinkDeviceToExistingAccountButton()}
</>
)}
</div> </div>
); );
} }
@ -584,9 +587,12 @@ export class RegistrationTabs extends React.Component<{}, State> {
return ( return (
<div> <div>
{this.renderContinueYourSessionButton()} {this.renderContinueYourSessionButton()}
{/*<h4>{or}</h4>*/} {window.lokiFeatureFlags.useMultiDevice && (
{/* FIXME enable back to allow linking of device <>
this.renderLinkDeviceToExistingAccountButton()*/} <h4>{or}</h4>
{this.renderLinkDeviceToExistingAccountButton()}
</>
)}
</div> </div>
); );
} }

@ -644,7 +644,7 @@ export class SettingsView extends React.Component<SettingsViewProps, State> {
id: 'no-linked-device', id: 'no-linked-device',
title: noPairedDeviceText, title: noPairedDeviceText,
type: undefined, type: undefined,
description: window.i18n('multiDeviceDisabledTemporary'), description: '',
category: SessionSettingCategory.Devices, category: SessionSettingCategory.Devices,
content: {}, content: {},
comparisonValue: undefined, comparisonValue: undefined,

@ -74,12 +74,9 @@ export class SettingsHeader extends React.Component<Props, any> {
? `${categoryTitlePrefix.slice(0, -1)} Settings` ? `${categoryTitlePrefix.slice(0, -1)} Settings`
: `${categoryTitlePrefix} Settings`; : `${categoryTitlePrefix} Settings`;
const showSearch = false; const showSearch = false;
const showAddDevice = false; const showAddDevice =
/* FIXME enable back to allow linking of device
const showAddDevice =
category === SessionSettingCategory.Devices && category === SessionSettingCategory.Devices &&
this.props.showLinkDeviceButton; this.props.showLinkDeviceButton;
*/
return ( return (
<div className="session-settings-header"> <div className="session-settings-header">

Loading…
Cancel
Save