restyle unknown devices dialog
This commit is contained in:
parent
7d2c6fbd0b
commit
3b10b8042a
3 changed files with 18 additions and 41 deletions
|
@ -28,28 +28,28 @@ limitations under the License.
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mx_UnknownDeviceDialog ul {
|
||||||
|
list-style: none;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
// userid
|
||||||
|
.mx_UnknownDeviceDialog p {
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
.mx_UnknownDeviceDialog .mx_DeviceVerifyButtons {
|
.mx_UnknownDeviceDialog .mx_DeviceVerifyButtons {
|
||||||
float: right;
|
flex-direction: row !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_UnknownDeviceDialog .mx_Dialog_content {
|
.mx_UnknownDeviceDialog .mx_Dialog_content {
|
||||||
margin-bottom: 24px;
|
margin-bottom: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_UnknownDeviceDialog .mx_MemberDeviceInfo {
|
.mx_UnknownDeviceDialog_deviceList > li {
|
||||||
float: right;
|
padding: 4px;
|
||||||
clear: both;
|
|
||||||
padding: 0px;
|
|
||||||
padding-top: 8px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_UnknownDeviceDialog .mx_MemberDeviceInfo_textButton {
|
.mx_UnknownDeviceDialog_deviceList > li > * {
|
||||||
@mixin mx_DialogButton_small;
|
padding-bottom: 0;
|
||||||
background-color: $primary-bg-color;
|
|
||||||
color: $accent-color;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mx_UnknownDeviceDialog .mx_UnknownDeviceDialog_deviceList li {
|
|
||||||
height: 40px;
|
|
||||||
border-bottom: 1px solid $primary-hairline-color;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,35 +25,12 @@ import { _t } from '../../../languageHandler';
|
||||||
import SettingsStore from "../../../settings/SettingsStore";
|
import SettingsStore from "../../../settings/SettingsStore";
|
||||||
import { markAllDevicesKnown } from '../../../cryptodevices';
|
import { markAllDevicesKnown } from '../../../cryptodevices';
|
||||||
|
|
||||||
function DeviceListEntry(props) {
|
|
||||||
const {userId, device} = props;
|
|
||||||
|
|
||||||
const DeviceVerifyButtons = sdk.getComponent('elements.DeviceVerifyButtons');
|
|
||||||
|
|
||||||
return (
|
|
||||||
<li>
|
|
||||||
{ device.deviceId }
|
|
||||||
<DeviceVerifyButtons device={device} userId={userId} />
|
|
||||||
<br />
|
|
||||||
{ device.getDisplayName() }
|
|
||||||
</li>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
DeviceListEntry.propTypes = {
|
|
||||||
userId: PropTypes.string.isRequired,
|
|
||||||
|
|
||||||
// deviceinfo
|
|
||||||
device: PropTypes.object.isRequired,
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
function UserUnknownDeviceList(props) {
|
function UserUnknownDeviceList(props) {
|
||||||
|
const MemberDeviceInfo = sdk.getComponent('rooms.MemberDeviceInfo');
|
||||||
const {userId, userDevices} = props;
|
const {userId, userDevices} = props;
|
||||||
|
|
||||||
const deviceListEntries = Object.keys(userDevices).map((deviceId) =>
|
const deviceListEntries = Object.keys(userDevices).map((deviceId) =>
|
||||||
<DeviceListEntry key={deviceId} userId={userId}
|
<li key={deviceId}><MemberDeviceInfo device={userDevices[deviceId]} userId={userId} showDeviceId={true} /></li>,
|
||||||
device={userDevices[deviceId]} />,
|
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -30,7 +30,7 @@ export default class MemberDeviceInfo extends React.Component {
|
||||||
mx_MemberDeviceInfo_icon_unverified: this.props.device.isUnverified(),
|
mx_MemberDeviceInfo_icon_unverified: this.props.device.isUnverified(),
|
||||||
});
|
});
|
||||||
const indicator = (<div className={iconClasses} />);
|
const indicator = (<div className={iconClasses} />);
|
||||||
const deviceName = this.props.device.ambiguous ?
|
const deviceName = (this.props.device.ambiguous || this.props.showDeviceId) ?
|
||||||
(this.props.device.getDisplayName() ? this.props.device.getDisplayName() : "") + " (" + this.props.device.deviceId + ")" :
|
(this.props.device.getDisplayName() ? this.props.device.getDisplayName() : "") + " (" + this.props.device.deviceId + ")" :
|
||||||
this.props.device.getDisplayName();
|
this.props.device.getDisplayName();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue