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",
"description": "Title of the typing indicators setting"
},
"multiDeviceDisabledTemporary": {
"message": "MultiDevice disabled temporarily",
"description": "Description of why multi device is disabled"
},
"messageTTL": {
"message": "Message TTL",
"description": "Title of the Message TTL setting"

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

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

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

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

Loading…
Cancel
Save