Skip to content

Commit

Permalink
try : upgrade patch security user settings with new device panel (#678)
Browse files Browse the repository at this point in the history
* upgrade roughly patch  change sections order in security privacy settings

* fix compilation error

* update labels

* hide security recommendation section

* update labels

* Add :TCHAP: annotations

* Layout fixes (font size etc)

* Spelling fix

* Spelling fix

* Spelling fix

* Add extra explanation of cross-signing

* Extra translations

---------

Co-authored-by: Estelle Comment <[email protected]>
  • Loading branch information
odelcroi and estellecomment authored Sep 8, 2023
1 parent 0fdba8b commit 91b49ce
Show file tree
Hide file tree
Showing 5 changed files with 209 additions and 90 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
diff --git a/node_modules/matrix-react-sdk/src/components/views/settings/CryptographyPanel.tsx b/node_modules/matrix-react-sdk/src/components/views/settings/CryptographyPanel.tsx
index 5a5e424..dd45888 100644
--- a/node_modules/matrix-react-sdk/src/components/views/settings/CryptographyPanel.tsx
+++ b/node_modules/matrix-react-sdk/src/components/views/settings/CryptographyPanel.tsx
@@ -73,25 +73,36 @@ export default class CryptographyPanel extends React.Component<IProps, IState> {
}

return (
- <SettingsSubsection heading={_t("Cryptography")}>
- <SettingsSubsectionText>
- <table className="mx_CryptographyPanel_sessionInfo">
- <tr>
- <th scope="row">{_t("Session ID:")}</th>
- <td>
- <code>{deviceId}</code>
- </td>
- </tr>
- <tr>
- <th scope="row">{_t("Session key:")}</th>
- <td>
- <code>
- <b>{identityKey}</b>
- </code>
- </td>
- </tr>
- </table>
- </SettingsSubsectionText>
+ <SettingsSubsection heading={_t("Tchap keys")}> {/* :TCHAP: change vocabulary and layout */}
+ <div className="mx_SettingsTab_subsectionText">
+ <div>
+ {_t("These keys only apply to the current session.")}
+ </div>
+ <div>
+ <b>{_t("Please note this is not your recovery code for your automatic backup.")}</b>
+ </div>
+ </div>
+ <details>
+ <summary>{_t("Advanced")}</summary>
+ <SettingsSubsectionText>
+ <table className="mx_CryptographyPanel_sessionInfo">
+ <tr>
+ <th scope="row">{_t("Session ID:")}</th>
+ <td>
+ <code>{deviceId}</code>
+ </td>
+ </tr>
+ <tr>
+ <th scope="row">{_t("Session key:")}</th>
+ <td>
+ <code>
+ <b>{identityKey}</b>
+ </code>
+ </td>
+ </tr>
+ </table>
+ </SettingsSubsectionText>
+ </details> {/** end :TCHAP: */}
{importExportButtons}
{noSendUnverifiedSetting}
</SettingsSubsection>
diff --git a/node_modules/matrix-react-sdk/src/components/views/settings/tabs/user/SecurityUserSettingsTab.tsx b/node_modules/matrix-react-sdk/src/components/views/settings/tabs/user/SecurityUserSettingsTab.tsx
index 8f085a7..1bae58b 100644
--- a/node_modules/matrix-react-sdk/src/components/views/settings/tabs/user/SecurityUserSettingsTab.tsx
+++ b/node_modules/matrix-react-sdk/src/components/views/settings/tabs/user/SecurityUserSettingsTab.tsx
@@ -275,11 +275,13 @@ export default class SecurityUserSettingsTab extends React.Component<IProps, ISt
}

public render(): React.ReactNode {
+ // :TCHAP: we're moving this subsection out, so it's now a section
const secureBackup = (
- <SettingsSubsection heading={_t("Secure Backup")}>
+ <SettingsSection heading={_t("Secure Backup")}>
<SecureBackupPanel />
- </SettingsSubsection>
+ </SettingsSection>
);
+ // end :TCHAP:

const eventIndex = (
<SettingsSubsection heading={_t("Message search")}>
@@ -359,13 +361,14 @@ export default class SecurityUserSettingsTab extends React.Component<IProps, ISt
return (
<SettingsTab>
{warning}
+ { /* :TCHAP: move secureBackup and privacySection, and remove eventIndex */ }
+ {secureBackup}
<SettingsSection heading={_t("Encryption")}>
- {secureBackup}
- {eventIndex}
{crossSigning}
<CryptographyPanel />
+ {privacySection}
</SettingsSection>
- {privacySection}
+ { /* end :TCHAP: */ }
{advancedSection}
</SettingsTab>
);
6 changes: 6 additions & 0 deletions res/themes/tchap-common/css/_tchap_custom.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,9 @@
justify-content: center;
padding: 0 3px;
}

/* Hide new section "Recommandations de sécurité" in new device manager until we customize it*/

[data-testid="security-recommendations-section"] {
display: none;
}
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ const JoinRuleSettings = ({ room, promptUpgrade, aliasWarning, onError, beforeCh
// open new settings on this tab
dis.dispatch({
action: "open_room_settings",
initial_tab_id: ROOM_SECURITY_TAB,
initial_tab_id: RoomSettingsTab.Security,
});
},
});
Expand Down
104 changes: 104 additions & 0 deletions src/tchap/i18n/strings/tchap_translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -1014,5 +1014,109 @@
"Sent messages will be stored until your connection has returned.": {
"fr": "Les messages seront envoyés automatiquement dès que la connexion sera rétablie.",
"en": "Messages will be sent when your connection returns."
},
"Sessions": {
"fr": "Mes appareils",
"en": "My devices"
},
"Current session": {
"fr": "Cet appareil",
"en": "This device"
},
"Verified session": {
"fr": "Appareil vérifié",
"en": "Verified device"
},
"Other sessions":{
"fr": "Autres appareils",
"en": "Other devices"
},
"Verify your current session for enhanced secure messaging.":{
"fr": "Vérifier cet appareil afin de visualiser vos messages",
"en": "Verify your current device to get your messages."
},
"Verify session": {
"fr": "Vérifier l'appareil",
"en": "Verify device"
},
"Sign out of this session" :{
"fr": "Se déconnecter de cet appareil",
"en": "Sign out of this device"
},
"Receive push notifications on this session.":{
"fr": "Recevoir les notifications push sur cet appareil",
"en": "Receive push notifications on this device."
},
"Unverified":{
"fr": "Non vérifié",
"en": "Unverified"
},
"Verified":{
"fr": "Vérifié",
"en": "Verified "
},
"Your current session is ready for secure messaging.":{
"fr": "",
"en": ""
},
"%(count)s sessions selected|one":{
"fr": "%(count)s appareil sélectionné",
"en": "%(count)s device selected"
},
"%(count)s sessions selected|other":{
"fr": "%(count)s appareils sélectionnés",
"en": "%(count)s devices selected"
},
"For best security, verify your sessions and sign out from any session that you don't recognize or use anymore.":{
"fr": "Vérifier tous vos appareils pour déverrouiller tous vos messages",
"en": "Verify your devices to unlock your messages"
},
"This means that you have all the keys needed to unlock your encrypted messages and confirm to other users that you trust this session.":{
"fr" : "Cela veut dire qu'ils disposent de toutes les clés nécessaires pour lire les messages chiffrés, et confirment aux autres utilisateurs que vous faites confiance à cet appareil.",
"en" : "This means that you have all the keys needed to unlock your encrypted messages and confirm to other users that you trust this device."
},
"Verified sessions are anywhere you are using this account after entering your passphrase or confirming your identity with another verified session.":{
"fr" : "Les appareils vérifiés sont ceux qui utilisent ce compte après avoir saisi la phrase de sécurité ou confirmé votre identité à l’aide d’un autre appareil vérifié.",
"en" : "Verified devices are anywhere you are using this account after entering your passphrase or confirming your identity with another verified device."
},
"Verified sessions": {
"fr": "Appareils vérifiés",
"en": "Verified devices"
},
"Unverified sessions": {
"fr": "Appareils non vérifiés",
"en": "Unverified devices"
},
"Unverified session": {
"fr": "Appareil non vérifié",
"en": "Unverified device"
},
"Sign out of %(count)s sessions|one": {
"fr": "Déconnecter %(count)s appareil",
"en": "Sign out of %(count)s device"
},
"Sign out of %(count)s sessions|other": {
"fr": "Déconnecter %(count)s appareils",
"en": "Sign out of %(count)s devices"
},
"Sign out of all other sessions (%(otherSessionsCount)s)": {
"fr": "Déconnecter tous les autres appareils (%(otherSessionsCount)s)",
"en": "Sign out of all other devices (%(otherSessionsCount)s)"
},
"Are you sure you want to sign out of %(count)s sessions?|one": {
"fr": "Voulez-vous vraiment déconnecter %(count)s appareil ?",
"en": "Are you sure you want to sign out of %(count)s device?"
},
"Are you sure you want to sign out of %(count)s sessions?|other": {
"fr": "Voulez-vous vraiment déconnecter %(count)s de vos appareils ?",
"en": "Are you sure you want to sign out of %(count)s devices?"
},
"You should make especially certain that you recognise these sessions as they could represent an unauthorised use of your account.": {
"fr": "Vous devriez vous assurer que vous connaissez ces appareils, car ils pourraient représenter un usage frauduleux de votre compte.",
"en": "You should make especially certain that you recognise these devices as they could represent an unauthorised use of your account."
},
"Unverified sessions are sessions that have logged in with your credentials but have not been cross-verified.": {
"fr": "Les appareils non vérifiés sont identifiés avec vos identifiants mais n’ont pas fait de vérification croisée (échange d'emojis ou Code de Récupération).",
"en": "Unverified devices are devices that have logged in with your credentials but have not been cross-verified (emoji exchange or ou Recovery Code)."
}
}

0 comments on commit 91b49ce

Please sign in to comment.