Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #3326 from matrix-org/dbkr/device_name_public
Browse files Browse the repository at this point in the history
Clarify that device names are publicly visible
  • Loading branch information
dbkr authored Aug 20, 2019
2 parents fef3438 + f7083ac commit f5da870
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 8 deletions.
5 changes: 5 additions & 0 deletions res/css/views/settings/_DevicesPanel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,13 @@ limitations under the License.
font-weight: bold;
}

.mx_DevicesPanel_header > .mx_DevicesPanel_deviceButtons {
height: 48px; // make this tall so the table doesn't move down when the delete button appears
}

.mx_DevicesPanel_header > div {
display: table-cell;
vertical-align: bottom;
}

.mx_DevicesPanel_header .mx_DevicesPanel_deviceLastSeen {
Expand Down
10 changes: 5 additions & 5 deletions src/components/views/settings/DevicesPanel.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
Copyright 2016 OpenMarket Ltd
Copyright 2019 The Matrix.org Foundation C.I.C.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -186,19 +187,19 @@ export default class DevicesPanel extends React.Component {

const deleteButton = this.state.deleting ?
<Spinner w={22} h={22} /> :
<AccessibleButton className="mx_textButton" onClick={this._onDeleteClick}>
<AccessibleButton onClick={this._onDeleteClick} kind="danger_sm">
{ _t("Delete %(count)s devices", {count: this.state.selectedDevices.length}) }
</AccessibleButton>;

const classes = classNames(this.props.className, "mx_DevicesPanel");
return (
<div className={classes}>
<div className="mx_DevicesPanel_header">
<div className="mx_DevicesPanel_deviceId">{ _t("Device ID") }</div>
<div className="mx_DevicesPanel_deviceName">{ _t("Device Name") }</div>
<div className="mx_DevicesPanel_deviceId">{ _t("ID") }</div>
<div className="mx_DevicesPanel_deviceName">{ _t("Public Name") }</div>
<div className="mx_DevicesPanel_deviceLastSeen">{ _t("Last seen") }</div>
<div className="mx_DevicesPanel_deviceButtons">
{ this.state.selectedDevices.length > 0 ? deleteButton : _t('Select devices') }
{ this.state.selectedDevices.length > 0 ? deleteButton : null }
</div>
</div>
{ devices.map(this._renderDevice) }
Expand All @@ -207,7 +208,6 @@ export default class DevicesPanel extends React.Component {
}
}

DevicesPanel.displayName = 'MemberDeviceInfo';
DevicesPanel.propTypes = {
className: PropTypes.string,
};
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ export default class SecurityUserSettingsTab extends React.Component {
<div className="mx_SettingsTab_section">
<span className="mx_SettingsTab_subheading">{_t("Devices")}</span>
<div className='mx_SettingsTab_subsectionText'>
{_t("A device's public name is visible to people you communicate with")}
<DevicesPanel />
</div>
</div>
Expand Down
7 changes: 4 additions & 3 deletions src/i18n/strings/en_EN.json
Original file line number Diff line number Diff line change
Expand Up @@ -476,10 +476,9 @@
"Authentication": "Authentication",
"Delete %(count)s devices|other": "Delete %(count)s devices",
"Delete %(count)s devices|one": "Delete device",
"Device ID": "Device ID",
"Device Name": "Device Name",
"ID": "ID",
"Public Name": "Public Name",
"Last seen": "Last seen",
"Select devices": "Select devices",
"Failed to set display name": "Failed to set display name",
"Disable Notifications": "Disable Notifications",
"Enable Notifications": "Enable Notifications",
Expand Down Expand Up @@ -632,6 +631,7 @@
"Key backup": "Key backup",
"Security & Privacy": "Security & Privacy",
"Devices": "Devices",
"A device's public name is visible to people you communicate with": "A device's public name is visible to people you communicate with",
"Riot collects anonymous analytics to allow us to improve the application.": "Riot collects anonymous analytics to allow us to improve the application.",
"Privacy is important to us, so we don't collect any personal or identifiable data for our analytics.": "Privacy is important to us, so we don't collect any personal or identifiable data for our analytics.",
"Learn more about how we use analytics.": "Learn more about how we use analytics.",
Expand Down Expand Up @@ -1215,6 +1215,7 @@
"To verify that this device can be trusted, please contact its owner using some other means (e.g. in person or a phone call) and ask them whether the key they see in their User Settings for this device matches the key below:": "To verify that this device can be trusted, please contact its owner using some other means (e.g. in person or a phone call) and ask them whether the key they see in their User Settings for this device matches the key below:",
"Use two-way text verification": "Use two-way text verification",
"Device name": "Device name",
"Device ID": "Device ID",
"Device key": "Device key",
"If it matches, press the verify button below. If it doesn't, then someone else is intercepting this device and you probably want to press the blacklist button instead.": "If it matches, press the verify button below. If it doesn't, then someone else is intercepting this device and you probably want to press the blacklist button instead.",
"I verify that the keys match": "I verify that the keys match",
Expand Down

0 comments on commit f5da870

Please sign in to comment.