2019-01-23 21:36:42 -07:00
|
|
|
/*
|
2021-04-06 12:26:50 +01:00
|
|
|
Copyright 2019-2021 The Matrix.org Foundation C.I.C.
|
2019-08-06 18:06:47 +01:00
|
|
|
Copyright 2019 Michael Telatynski <7t3chguy@gmail.com>
|
2019-01-23 21:36:42 -07:00
|
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
|
limitations under the License.
|
|
|
|
|
*/
|
|
|
|
|
|
2022-03-22 17:07:37 -06:00
|
|
|
import React from 'react';
|
2021-08-04 10:37:35 +01:00
|
|
|
|
2021-06-29 13:11:58 +01:00
|
|
|
import { _t } from "../../../../../languageHandler";
|
2019-02-22 10:47:18 -07:00
|
|
|
import LabelledToggleSwitch from "../../../elements/LabelledToggleSwitch";
|
|
|
|
|
import SettingsStore from "../../../../../settings/SettingsStore";
|
|
|
|
|
import Field from "../../../elements/Field";
|
2019-08-06 18:06:47 +01:00
|
|
|
import PlatformPeg from "../../../../../PlatformPeg";
|
2021-06-29 13:11:58 +01:00
|
|
|
import { SettingLevel } from "../../../../../settings/SettingLevel";
|
2021-07-02 18:15:05 +02:00
|
|
|
import SettingsFlag from '../../../elements/SettingsFlag';
|
2021-07-01 19:03:49 +02:00
|
|
|
import AccessibleButton from "../../../elements/AccessibleButton";
|
2021-08-04 10:37:35 +01:00
|
|
|
import dis from "../../../../../dispatcher/dispatcher";
|
2022-03-24 16:42:53 -06:00
|
|
|
import { UserTab } from "../../../dialogs/UserTab";
|
2022-01-17 12:53:10 +01:00
|
|
|
import { OpenToTabPayload } from "../../../../../dispatcher/payloads/OpenToTabPayload";
|
2022-01-12 20:12:28 +00:00
|
|
|
import { Action } from "../../../../../dispatcher/actions";
|
2021-08-04 10:37:35 +01:00
|
|
|
|
|
|
|
|
interface IProps {
|
|
|
|
|
closeSettingsFn(success: boolean): void;
|
|
|
|
|
}
|
2021-04-06 12:26:50 +01:00
|
|
|
|
|
|
|
|
interface IState {
|
|
|
|
|
autoLaunch: boolean;
|
|
|
|
|
autoLaunchSupported: boolean;
|
|
|
|
|
warnBeforeExit: boolean;
|
|
|
|
|
warnBeforeExitSupported: boolean;
|
|
|
|
|
alwaysShowMenuBarSupported: boolean;
|
|
|
|
|
alwaysShowMenuBar: boolean;
|
|
|
|
|
minimizeToTraySupported: boolean;
|
|
|
|
|
minimizeToTray: boolean;
|
2021-04-26 14:07:45 +01:00
|
|
|
autocompleteDelay: string;
|
|
|
|
|
readMarkerInViewThresholdMs: string;
|
|
|
|
|
readMarkerOutOfViewThresholdMs: string;
|
2021-04-06 12:26:50 +01:00
|
|
|
}
|
2019-01-23 21:36:42 -07:00
|
|
|
|
2021-08-04 10:37:35 +01:00
|
|
|
export default class PreferencesUserSettingsTab extends React.Component<IProps, IState> {
|
2020-02-26 23:07:43 +00:00
|
|
|
static ROOM_LIST_SETTINGS = [
|
|
|
|
|
'breadcrumbs',
|
|
|
|
|
];
|
|
|
|
|
|
2021-07-28 14:39:19 +01:00
|
|
|
static SPACES_SETTINGS = [
|
2021-07-30 12:20:02 +01:00
|
|
|
"Spaces.allRoomsInHome",
|
2021-07-28 14:39:19 +01:00
|
|
|
];
|
|
|
|
|
|
2021-03-10 15:34:45 +01:00
|
|
|
static KEYBINDINGS_SETTINGS = [
|
|
|
|
|
'ctrlFForSearch',
|
|
|
|
|
];
|
|
|
|
|
|
2019-01-23 21:36:42 -07:00
|
|
|
static COMPOSER_SETTINGS = [
|
|
|
|
|
'MessageComposerInput.autoReplaceEmoji',
|
2019-01-24 20:57:40 -07:00
|
|
|
'MessageComposerInput.suggestEmoji',
|
|
|
|
|
'sendTypingNotifications',
|
2020-08-30 20:17:08 +12:00
|
|
|
'MessageComposerInput.ctrlEnterToSend',
|
2021-02-12 07:53:09 +01:00
|
|
|
'MessageComposerInput.surroundWith',
|
2021-01-02 15:31:49 -06:00
|
|
|
'MessageComposerInput.showStickersButton',
|
2022-03-04 16:13:50 +01:00
|
|
|
'MessageComposerInput.insertTrailingColon',
|
2019-01-23 21:36:42 -07:00
|
|
|
];
|
|
|
|
|
|
2021-03-10 15:34:45 +01:00
|
|
|
static TIME_SETTINGS = [
|
2019-01-23 21:36:42 -07:00
|
|
|
'showTwelveHourTimestamps',
|
|
|
|
|
'alwaysShowTimestamps',
|
2021-03-10 15:34:45 +01:00
|
|
|
];
|
|
|
|
|
static CODE_BLOCKS_SETTINGS = [
|
2019-01-23 21:36:42 -07:00
|
|
|
'enableSyntaxHighlightLanguageDetection',
|
2021-01-18 17:44:32 +01:00
|
|
|
'expandCodeByDefault',
|
2021-01-21 13:08:55 +01:00
|
|
|
'showCodeLineNumbers',
|
2019-01-23 21:36:42 -07:00
|
|
|
];
|
2021-03-10 15:34:45 +01:00
|
|
|
static IMAGES_AND_VIDEOS_SETTINGS = [
|
|
|
|
|
'urlPreviewsEnabled',
|
2021-09-01 17:28:02 +02:00
|
|
|
'autoplayGifs',
|
|
|
|
|
'autoplayVideo',
|
2019-10-01 09:32:42 -06:00
|
|
|
'showImages',
|
2021-03-10 15:34:45 +01:00
|
|
|
];
|
2021-04-30 11:03:22 +02:00
|
|
|
static TIMELINE_SETTINGS = [
|
2021-03-10 15:34:45 +01:00
|
|
|
'showTypingNotifications',
|
|
|
|
|
'showRedactions',
|
|
|
|
|
'showReadReceipts',
|
|
|
|
|
'showJoinLeaves',
|
|
|
|
|
'showDisplaynameChanges',
|
2020-10-19 21:25:01 +02:00
|
|
|
'showChatEffects',
|
2021-03-10 15:34:45 +01:00
|
|
|
'showAvatarChanges',
|
2021-04-30 11:03:22 +02:00
|
|
|
'Pill.shouldShowPillAvatar',
|
2021-03-10 15:34:45 +01:00
|
|
|
'TextualBody.enableBigEmoji',
|
|
|
|
|
'scrollToBottomOnMessageSent',
|
2019-01-23 21:36:42 -07:00
|
|
|
];
|
2020-09-16 12:14:33 +01:00
|
|
|
static GENERAL_SETTINGS = [
|
2019-01-23 21:36:42 -07:00
|
|
|
'promptBeforeInviteUnknownUsers',
|
|
|
|
|
// Start automatically after startup (electron-only)
|
|
|
|
|
// Autocomplete delay (niche text box)
|
|
|
|
|
];
|
|
|
|
|
|
2021-04-06 12:26:50 +01:00
|
|
|
constructor(props) {
|
|
|
|
|
super(props);
|
2019-01-23 21:36:42 -07:00
|
|
|
|
|
|
|
|
this.state = {
|
|
|
|
|
autoLaunch: false,
|
|
|
|
|
autoLaunchSupported: false,
|
2021-03-25 14:14:38 +00:00
|
|
|
warnBeforeExit: true,
|
|
|
|
|
warnBeforeExitSupported: false,
|
2019-08-05 11:58:53 +01:00
|
|
|
alwaysShowMenuBar: true,
|
|
|
|
|
alwaysShowMenuBarSupported: false,
|
2019-02-25 09:43:39 -07:00
|
|
|
minimizeToTray: true,
|
|
|
|
|
minimizeToTraySupported: false,
|
2019-09-17 17:34:30 +01:00
|
|
|
autocompleteDelay:
|
|
|
|
|
SettingsStore.getValueAt(SettingLevel.DEVICE, 'autocompleteDelay').toString(10),
|
|
|
|
|
readMarkerInViewThresholdMs:
|
|
|
|
|
SettingsStore.getValueAt(SettingLevel.DEVICE, 'readMarkerInViewThresholdMs').toString(10),
|
|
|
|
|
readMarkerOutOfViewThresholdMs:
|
|
|
|
|
SettingsStore.getValueAt(SettingLevel.DEVICE, 'readMarkerOutOfViewThresholdMs').toString(10),
|
2019-01-23 21:36:42 -07:00
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
2021-04-27 12:00:36 +01:00
|
|
|
async componentDidMount() {
|
2019-02-25 09:43:39 -07:00
|
|
|
const platform = PlatformPeg.get();
|
|
|
|
|
|
|
|
|
|
const autoLaunchSupported = await platform.supportsAutoLaunch();
|
2019-01-23 21:36:42 -07:00
|
|
|
let autoLaunch = false;
|
|
|
|
|
if (autoLaunchSupported) {
|
2019-02-25 09:43:39 -07:00
|
|
|
autoLaunch = await platform.getAutoLaunchEnabled();
|
2019-01-23 21:36:42 -07:00
|
|
|
}
|
|
|
|
|
|
2021-03-25 14:14:38 +00:00
|
|
|
const warnBeforeExitSupported = await platform.supportsWarnBeforeExit();
|
|
|
|
|
let warnBeforeExit = false;
|
|
|
|
|
if (warnBeforeExitSupported) {
|
|
|
|
|
warnBeforeExit = await platform.shouldWarnBeforeExit();
|
|
|
|
|
}
|
|
|
|
|
|
2019-08-05 11:58:53 +01:00
|
|
|
const alwaysShowMenuBarSupported = await platform.supportsAutoHideMenuBar();
|
|
|
|
|
let alwaysShowMenuBar = true;
|
|
|
|
|
if (alwaysShowMenuBarSupported) {
|
2021-09-21 17:48:09 +02:00
|
|
|
alwaysShowMenuBar = !(await platform.getAutoHideMenuBarEnabled());
|
2019-08-05 11:58:53 +01:00
|
|
|
}
|
|
|
|
|
|
2019-02-25 09:43:39 -07:00
|
|
|
const minimizeToTraySupported = await platform.supportsMinimizeToTray();
|
|
|
|
|
let minimizeToTray = true;
|
|
|
|
|
if (minimizeToTraySupported) {
|
|
|
|
|
minimizeToTray = await platform.getMinimizeToTrayEnabled();
|
|
|
|
|
}
|
|
|
|
|
|
2019-08-05 11:58:53 +01:00
|
|
|
this.setState({
|
|
|
|
|
autoLaunch,
|
|
|
|
|
autoLaunchSupported,
|
2021-03-25 14:14:38 +00:00
|
|
|
warnBeforeExit,
|
|
|
|
|
warnBeforeExitSupported,
|
2019-08-05 11:58:53 +01:00
|
|
|
alwaysShowMenuBarSupported,
|
|
|
|
|
alwaysShowMenuBar,
|
|
|
|
|
minimizeToTraySupported,
|
|
|
|
|
minimizeToTray,
|
|
|
|
|
});
|
2019-01-23 21:36:42 -07:00
|
|
|
}
|
|
|
|
|
|
2021-04-27 12:00:36 +01:00
|
|
|
private onAutoLaunchChange = (checked: boolean) => {
|
2021-06-29 13:11:58 +01:00
|
|
|
PlatformPeg.get().setAutoLaunchEnabled(checked).then(() => this.setState({ autoLaunch: checked }));
|
2019-01-23 21:36:42 -07:00
|
|
|
};
|
|
|
|
|
|
2021-04-27 12:00:36 +01:00
|
|
|
private onWarnBeforeExitChange = (checked: boolean) => {
|
2021-06-29 13:11:58 +01:00
|
|
|
PlatformPeg.get().setWarnBeforeExit(checked).then(() => this.setState({ warnBeforeExit: checked }));
|
|
|
|
|
};
|
2021-03-25 14:14:38 +00:00
|
|
|
|
2021-04-27 12:00:36 +01:00
|
|
|
private onAlwaysShowMenuBarChange = (checked: boolean) => {
|
2021-06-29 13:11:58 +01:00
|
|
|
PlatformPeg.get().setAutoHideMenuBarEnabled(!checked).then(() => this.setState({ alwaysShowMenuBar: checked }));
|
2019-08-05 11:58:53 +01:00
|
|
|
};
|
|
|
|
|
|
2021-04-27 12:00:36 +01:00
|
|
|
private onMinimizeToTrayChange = (checked: boolean) => {
|
2021-06-29 13:11:58 +01:00
|
|
|
PlatformPeg.get().setMinimizeToTrayEnabled(checked).then(() => this.setState({ minimizeToTray: checked }));
|
2019-02-25 09:43:39 -07:00
|
|
|
};
|
|
|
|
|
|
2021-04-27 12:00:36 +01:00
|
|
|
private onAutocompleteDelayChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
2021-06-29 13:11:58 +01:00
|
|
|
this.setState({ autocompleteDelay: e.target.value });
|
2019-01-23 21:36:42 -07:00
|
|
|
SettingsStore.setValue("autocompleteDelay", null, SettingLevel.DEVICE, e.target.value);
|
|
|
|
|
};
|
|
|
|
|
|
2021-04-27 12:00:36 +01:00
|
|
|
private onReadMarkerInViewThresholdMs = (e: React.ChangeEvent<HTMLInputElement>) => {
|
2021-06-29 13:11:58 +01:00
|
|
|
this.setState({ readMarkerInViewThresholdMs: e.target.value });
|
2019-09-17 17:34:30 +01:00
|
|
|
SettingsStore.setValue("readMarkerInViewThresholdMs", null, SettingLevel.DEVICE, e.target.value);
|
|
|
|
|
};
|
|
|
|
|
|
2021-04-27 12:00:36 +01:00
|
|
|
private onReadMarkerOutOfViewThresholdMs = (e: React.ChangeEvent<HTMLInputElement>) => {
|
2021-06-29 13:11:58 +01:00
|
|
|
this.setState({ readMarkerOutOfViewThresholdMs: e.target.value });
|
2019-09-17 17:34:30 +01:00
|
|
|
SettingsStore.setValue("readMarkerOutOfViewThresholdMs", null, SettingLevel.DEVICE, e.target.value);
|
|
|
|
|
};
|
|
|
|
|
|
2021-08-11 23:33:10 +01:00
|
|
|
private renderGroup(
|
|
|
|
|
settingIds: string[],
|
|
|
|
|
level = SettingLevel.ACCOUNT,
|
|
|
|
|
): React.ReactNodeArray {
|
|
|
|
|
return settingIds.map(i => {
|
2021-10-22 11:30:14 -06:00
|
|
|
const disabled = !SettingsStore.isEnabled(i);
|
|
|
|
|
return <SettingsFlag key={i} name={i} level={level} disabled={disabled} />;
|
2020-09-16 12:55:04 +01:00
|
|
|
});
|
2019-01-23 21:36:42 -07:00
|
|
|
}
|
|
|
|
|
|
2022-01-17 12:53:10 +01:00
|
|
|
private onKeyboardShortcutsClicked = (): void => {
|
|
|
|
|
dis.dispatch<OpenToTabPayload>({
|
|
|
|
|
action: Action.ViewUserSettings,
|
|
|
|
|
initialTabId: UserTab.Keyboard,
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
2019-01-23 21:36:42 -07:00
|
|
|
render() {
|
|
|
|
|
let autoLaunchOption = null;
|
|
|
|
|
if (this.state.autoLaunchSupported) {
|
2019-08-06 18:06:47 +01:00
|
|
|
autoLaunchOption = <LabelledToggleSwitch
|
|
|
|
|
value={this.state.autoLaunch}
|
2021-04-26 14:02:53 +01:00
|
|
|
onChange={this.onAutoLaunchChange}
|
2019-08-06 18:06:47 +01:00
|
|
|
label={_t('Start automatically after system login')} />;
|
2019-01-23 21:36:42 -07:00
|
|
|
}
|
|
|
|
|
|
2021-03-25 14:14:38 +00:00
|
|
|
let warnBeforeExitOption = null;
|
|
|
|
|
if (this.state.warnBeforeExitSupported) {
|
|
|
|
|
warnBeforeExitOption = <LabelledToggleSwitch
|
|
|
|
|
value={this.state.warnBeforeExit}
|
2021-04-26 14:02:53 +01:00
|
|
|
onChange={this.onWarnBeforeExitChange}
|
2021-03-25 14:14:38 +00:00
|
|
|
label={_t('Warn before quitting')} />;
|
|
|
|
|
}
|
|
|
|
|
|
2019-08-05 11:58:53 +01:00
|
|
|
let autoHideMenuOption = null;
|
|
|
|
|
if (this.state.alwaysShowMenuBarSupported) {
|
2019-08-06 18:06:47 +01:00
|
|
|
autoHideMenuOption = <LabelledToggleSwitch
|
|
|
|
|
value={this.state.alwaysShowMenuBar}
|
2021-04-26 14:02:53 +01:00
|
|
|
onChange={this.onAlwaysShowMenuBarChange}
|
2019-08-06 18:06:47 +01:00
|
|
|
label={_t('Always show the window menu bar')} />;
|
2019-08-05 11:58:53 +01:00
|
|
|
}
|
|
|
|
|
|
2019-02-25 09:43:39 -07:00
|
|
|
let minimizeToTrayOption = null;
|
|
|
|
|
if (this.state.minimizeToTraySupported) {
|
2019-08-06 18:06:47 +01:00
|
|
|
minimizeToTrayOption = <LabelledToggleSwitch
|
2019-10-30 14:32:27 +00:00
|
|
|
value={this.state.minimizeToTray}
|
2021-04-26 14:02:53 +01:00
|
|
|
onChange={this.onMinimizeToTrayChange}
|
2021-11-10 16:35:43 +00:00
|
|
|
label={_t('Show tray icon and minimise window to it on close')} />;
|
2019-02-25 09:43:39 -07:00
|
|
|
}
|
|
|
|
|
|
2019-01-23 21:36:42 -07:00
|
|
|
return (
|
2019-02-22 10:47:18 -07:00
|
|
|
<div className="mx_SettingsTab mx_PreferencesUserSettingsTab">
|
2021-07-19 22:43:11 +01:00
|
|
|
<div className="mx_SettingsTab_heading">{ _t("Preferences") }</div>
|
2019-11-26 13:43:47 +01:00
|
|
|
|
2021-12-01 10:50:06 +00:00
|
|
|
{ !SettingsStore.getValue("feature_breadcrumbs_v2") &&
|
|
|
|
|
<div className="mx_SettingsTab_section">
|
|
|
|
|
<span className="mx_SettingsTab_subheading">{ _t("Room list") }</span>
|
|
|
|
|
{ this.renderGroup(PreferencesUserSettingsTab.ROOM_LIST_SETTINGS) }
|
|
|
|
|
</div>
|
|
|
|
|
}
|
2020-02-26 23:07:43 +00:00
|
|
|
|
2021-08-11 23:33:10 +01:00
|
|
|
<div className="mx_SettingsTab_section">
|
2021-07-28 14:39:19 +01:00
|
|
|
<span className="mx_SettingsTab_subheading">{ _t("Spaces") }</span>
|
2021-10-22 11:30:14 -06:00
|
|
|
{ this.renderGroup(PreferencesUserSettingsTab.SPACES_SETTINGS, SettingLevel.ACCOUNT) }
|
2021-08-11 23:33:10 +01:00
|
|
|
</div>
|
2021-07-28 14:39:19 +01:00
|
|
|
|
2021-08-04 10:37:35 +01:00
|
|
|
<div className="mx_SettingsTab_section">
|
2021-07-19 22:43:11 +01:00
|
|
|
<span className="mx_SettingsTab_subheading">{ _t("Keyboard shortcuts") }</span>
|
2021-12-02 13:43:10 +00:00
|
|
|
<div className="mx_SettingsFlag">
|
|
|
|
|
{ _t("To view all keyboard shortcuts, <a>click here</a>.", {}, {
|
2022-01-17 12:53:10 +01:00
|
|
|
a: sub => <AccessibleButton kind="link" onClick={this.onKeyboardShortcutsClicked}>
|
2021-12-02 13:43:10 +00:00
|
|
|
{ sub }
|
|
|
|
|
</AccessibleButton>,
|
|
|
|
|
}) }
|
|
|
|
|
</div>
|
2021-07-19 22:43:11 +01:00
|
|
|
{ this.renderGroup(PreferencesUserSettingsTab.KEYBINDINGS_SETTINGS) }
|
2021-03-10 15:34:45 +01:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div className="mx_SettingsTab_section">
|
2021-07-19 22:43:11 +01:00
|
|
|
<span className="mx_SettingsTab_subheading">{ _t("Displaying time") }</span>
|
|
|
|
|
{ this.renderGroup(PreferencesUserSettingsTab.TIME_SETTINGS) }
|
2021-03-10 15:34:45 +01:00
|
|
|
</div>
|
|
|
|
|
|
2020-02-26 23:16:27 +00:00
|
|
|
<div className="mx_SettingsTab_section">
|
2021-07-19 22:43:11 +01:00
|
|
|
<span className="mx_SettingsTab_subheading">{ _t("Composer") }</span>
|
2022-02-02 11:44:17 +00:00
|
|
|
{ this.renderGroup(PreferencesUserSettingsTab.COMPOSER_SETTINGS) }
|
2020-02-26 23:16:27 +00:00
|
|
|
</div>
|
2019-01-23 21:36:42 -07:00
|
|
|
|
2021-03-10 15:34:45 +01:00
|
|
|
<div className="mx_SettingsTab_section">
|
2021-07-19 22:43:11 +01:00
|
|
|
<span className="mx_SettingsTab_subheading">{ _t("Code blocks") }</span>
|
|
|
|
|
{ this.renderGroup(PreferencesUserSettingsTab.CODE_BLOCKS_SETTINGS) }
|
2021-03-10 15:34:45 +01:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div className="mx_SettingsTab_section">
|
2021-07-19 22:43:11 +01:00
|
|
|
<span className="mx_SettingsTab_subheading">{ _t("Images, GIFs and videos") }</span>
|
|
|
|
|
{ this.renderGroup(PreferencesUserSettingsTab.IMAGES_AND_VIDEOS_SETTINGS) }
|
2021-03-10 15:34:45 +01:00
|
|
|
</div>
|
|
|
|
|
|
2020-02-26 23:16:27 +00:00
|
|
|
<div className="mx_SettingsTab_section">
|
2021-07-19 22:43:11 +01:00
|
|
|
<span className="mx_SettingsTab_subheading">{ _t("Timeline") }</span>
|
|
|
|
|
{ this.renderGroup(PreferencesUserSettingsTab.TIMELINE_SETTINGS) }
|
2020-02-26 23:16:27 +00:00
|
|
|
</div>
|
2019-01-23 21:36:42 -07:00
|
|
|
|
2020-02-26 23:16:27 +00:00
|
|
|
<div className="mx_SettingsTab_section">
|
2021-07-19 22:43:11 +01:00
|
|
|
<span className="mx_SettingsTab_subheading">{ _t("General") }</span>
|
|
|
|
|
{ this.renderGroup(PreferencesUserSettingsTab.GENERAL_SETTINGS) }
|
|
|
|
|
{ minimizeToTrayOption }
|
|
|
|
|
{ autoHideMenuOption }
|
|
|
|
|
{ autoLaunchOption }
|
|
|
|
|
{ warnBeforeExitOption }
|
2019-08-06 18:06:47 +01:00
|
|
|
<Field
|
|
|
|
|
label={_t('Autocomplete delay (ms)')}
|
|
|
|
|
type='number'
|
|
|
|
|
value={this.state.autocompleteDelay}
|
2021-04-26 14:02:53 +01:00
|
|
|
onChange={this.onAutocompleteDelayChange} />
|
2019-09-17 17:34:30 +01:00
|
|
|
<Field
|
|
|
|
|
label={_t('Read Marker lifetime (ms)')}
|
|
|
|
|
type='number'
|
|
|
|
|
value={this.state.readMarkerInViewThresholdMs}
|
2021-04-26 14:02:53 +01:00
|
|
|
onChange={this.onReadMarkerInViewThresholdMs} />
|
2019-09-17 17:34:30 +01:00
|
|
|
<Field
|
|
|
|
|
label={_t('Read Marker off-screen lifetime (ms)')}
|
|
|
|
|
type='number'
|
|
|
|
|
value={this.state.readMarkerOutOfViewThresholdMs}
|
2021-04-26 14:02:53 +01:00
|
|
|
onChange={this.onReadMarkerOutOfViewThresholdMs} />
|
2019-01-23 21:36:42 -07:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|