|
|
|
@ -27,6 +27,7 @@ export enum SessionSettingType {
|
|
|
|
|
|
|
|
|
|
export interface SettingsViewProps {
|
|
|
|
|
category: SessionSettingCategory;
|
|
|
|
|
isSecondaryDevice: boolean;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
interface State {
|
|
|
|
@ -221,7 +222,7 @@ export class SettingsView extends React.Component<SettingsViewProps, State> {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public render() {
|
|
|
|
|
const { category } = this.props;
|
|
|
|
|
const { category, isSecondaryDevice } = this.props;
|
|
|
|
|
const shouldRenderPasswordLock =
|
|
|
|
|
this.state.shouldLockSettings && this.state.hasPassword;
|
|
|
|
|
|
|
|
|
@ -230,6 +231,7 @@ export class SettingsView extends React.Component<SettingsViewProps, State> {
|
|
|
|
|
<SettingsHeader
|
|
|
|
|
showLinkDeviceButton={!shouldRenderPasswordLock}
|
|
|
|
|
category={category}
|
|
|
|
|
isSecondaryDevice={isSecondaryDevice}
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
<div className="session-settings-view">
|
|
|
|
@ -574,6 +576,11 @@ export class SettingsView extends React.Component<SettingsViewProps, State> {
|
|
|
|
|
|
|
|
|
|
private getLinkedDeviceSettings(): Array<LocalSettingType> {
|
|
|
|
|
const { linkedPubKeys } = this.state;
|
|
|
|
|
const { isSecondaryDevice } = this.props;
|
|
|
|
|
// tslint:disable-next-line: no-backbone-get-set-outside-model
|
|
|
|
|
const noPairedDeviceText = isSecondaryDevice
|
|
|
|
|
? window.i18n('deviceIsSecondaryNoPairing')
|
|
|
|
|
: window.i18n('noPairedDevices');
|
|
|
|
|
|
|
|
|
|
if (linkedPubKeys && linkedPubKeys.length > 0) {
|
|
|
|
|
return linkedPubKeys.map((pubkey: any) => {
|
|
|
|
@ -621,7 +628,7 @@ export class SettingsView extends React.Component<SettingsViewProps, State> {
|
|
|
|
|
return [
|
|
|
|
|
{
|
|
|
|
|
id: 'no-linked-device',
|
|
|
|
|
title: window.i18n('noPairedDevices'),
|
|
|
|
|
title: noPairedDeviceText,
|
|
|
|
|
type: undefined,
|
|
|
|
|
description: '',
|
|
|
|
|
category: SessionSettingCategory.Devices,
|
|
|
|
|