From 908a00a13dc936d9bab61c165d9fe941999f8924 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Tue, 21 Jan 2020 10:06:04 +0100 Subject: [PATCH] EventIndexPanel: Move the panel from the preferences to the security tab. --- src/components/views/settings/EventIndexPanel.js | 14 ++++++++++++-- .../tabs/user/PreferencesUserSettingsTab.js | 4 ---- .../settings/tabs/user/SecurityUserSettingsTab.js | 9 +++++++++ src/i18n/strings/en_EN.json | 5 +++-- 4 files changed, 24 insertions(+), 8 deletions(-) diff --git a/src/components/views/settings/EventIndexPanel.js b/src/components/views/settings/EventIndexPanel.js index b3c75cd336..5b8029a09a 100644 --- a/src/components/views/settings/EventIndexPanel.js +++ b/src/components/views/settings/EventIndexPanel.js @@ -138,8 +138,7 @@ export default class EventIndexPanel extends React.Component { if (EventIndexPeg.get() !== null) { eventIndexingSettings = ( -
- {_t("Encrypted search")} +
{ _t( "Riot is securely caching encrypted messages locally for them" + "to appear in search results:" @@ -165,6 +164,17 @@ export default class EventIndexPanel extends React.Component { onChange={this._onCrawlerSleepTimeChange} />
); + } else { + eventIndexingSettings = ( +
+ { + _t( "Riot can't securely cache encrypted messages locally" + + "while running in a web browser. Use Riot Desktop for" + + "encrypted messages to appear in search results." + ) + } +
+ ); } return eventIndexingSettings; diff --git a/src/components/views/settings/tabs/user/PreferencesUserSettingsTab.js b/src/components/views/settings/tabs/user/PreferencesUserSettingsTab.js index 5ecafcc5ae..8cbaba037d 100644 --- a/src/components/views/settings/tabs/user/PreferencesUserSettingsTab.js +++ b/src/components/views/settings/tabs/user/PreferencesUserSettingsTab.js @@ -144,8 +144,6 @@ export default class PreferencesUserSettingsTab extends React.Component { } render() { - const EventIndexPanel = sdk.getComponent('views.settings.EventIndexPanel'); - let autoLaunchOption = null; if (this.state.autoLaunchSupported) { autoLaunchOption =
{_t("Preferences")}
- -
{_t("Composer")} {this._renderGroup(PreferencesUserSettingsTab.COMPOSER_SETTINGS)} diff --git a/src/components/views/settings/tabs/user/SecurityUserSettingsTab.js b/src/components/views/settings/tabs/user/SecurityUserSettingsTab.js index 5eadfc234a..8ef9983efd 100644 --- a/src/components/views/settings/tabs/user/SecurityUserSettingsTab.js +++ b/src/components/views/settings/tabs/user/SecurityUserSettingsTab.js @@ -242,6 +242,7 @@ export default class SecurityUserSettingsTab extends React.Component { render() { const DevicesPanel = sdk.getComponent('views.settings.DevicesPanel'); const SettingsFlag = sdk.getComponent('views.elements.SettingsFlag'); + const EventIndexPanel = sdk.getComponent('views.settings.EventIndexPanel'); const KeyBackupPanel = sdk.getComponent('views.settings.KeyBackupPanel'); const keyBackup = ( @@ -253,6 +254,13 @@ export default class SecurityUserSettingsTab extends React.Component {
); + const eventIndex = ( +
+ {_t("Encrypted search")} + +
+ ); + // XXX: There's no such panel in the current cross-signing designs, but // it's useful to have for testing the feature. If there's no interest // in having advanced details here once all flows are implemented, we @@ -281,6 +289,7 @@ export default class SecurityUserSettingsTab extends React.Component {
{keyBackup} + {eventIndex} {crossSigning} {this._renderCurrentDeviceInfo()}
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index a968c145d9..f78e3594ee 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -555,15 +555,15 @@ "Disable Notifications": "Disable Notifications", "Enable Notifications": "Enable Notifications", "Message search for encrypted rooms is disabled.": "Message search for encrypted rooms is disabled.", - "Not currently downloading messages for any room.": "Not currently downloading messages for any room.", + "Not downloading messages for any room.": "Not downloading messages for any room.", "Downloading mesages for %(currentRoom)s.": "Downloading mesages for %(currentRoom)s.", - "Encrypted search": "Encrypted search", "Riot is securely caching encrypted messages locally for themto appear in search results:": "Riot is securely caching encrypted messages locally for themto appear in search results:", "Space used:": "Space used:", "Indexed messages:": "Indexed messages:", "Number of rooms:": "Number of rooms:", "Download and index encrypted messages": "Download and index encrypted messages", "Message downloading sleep time(ms)": "Message downloading sleep time(ms)", + "Riot can't securely cache encrypted messages locallywhile running in a web browser. Use Riot Desktop forencrypted messages to appear in search results.": "Riot can't securely cache encrypted messages locallywhile running in a web browser. Use Riot Desktop forencrypted messages to appear in search results.", "Connecting to integration manager...": "Connecting to integration manager...", "Cannot connect to integration manager": "Cannot connect to integration manager", "The integration manager is offline or it cannot reach your homeserver.": "The integration manager is offline or it cannot reach your homeserver.", @@ -759,6 +759,7 @@ "Accept all %(invitedRooms)s invites": "Accept all %(invitedRooms)s invites", "Reject all %(invitedRooms)s invites": "Reject all %(invitedRooms)s invites", "Key backup": "Key backup", + "Encrypted search": "Encrypted search", "Cross-signing": "Cross-signing", "Security & Privacy": "Security & Privacy", "Devices": "Devices",