From f8674ca6c446ed097865644b528d0235fddca4fb Mon Sep 17 00:00:00 2001 From: yoution Date: Fri, 21 Feb 2020 12:51:51 +0800 Subject: [PATCH] fixed issue about trait update and add email link for support url --- .../Settings/Tools/Devices/List/Item/index.jsx | 12 ++++++++++-- .../components/Settings/Tools/Devices/index.jsx | 9 ++++++--- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/shared/components/Settings/Tools/Devices/List/Item/index.jsx b/src/shared/components/Settings/Tools/Devices/List/Item/index.jsx index c550dc7be7..f81e794d98 100644 --- a/src/shared/components/Settings/Tools/Devices/List/Item/index.jsx +++ b/src/shared/components/Settings/Tools/Devices/List/Item/index.jsx @@ -25,8 +25,16 @@ export default function Item(props) { } = props; const hasModel = !_.isEmpty(device.model); - const secondLine = device.deviceType + (device.manufacturer ? ` | ${device.manufacturer}` : '') - + (device.operatingSystem ? ` | ${device.operatingSystem}` : ''); + const secondLineItems = []; + if (device.manufacturer) { + secondLineItems.push(device.manufacturer); + } + if (device.operatingSystem) { + secondLineItems.push(device.operatingSystem); + } + + secondLineItems.push(device.deviceType); + const secondLine = secondLineItems.join(' | '); return (
diff --git a/src/shared/components/Settings/Tools/Devices/index.jsx b/src/shared/components/Settings/Tools/Devices/index.jsx index 5b6dc7d53b..6309a323c0 100644 --- a/src/shared/components/Settings/Tools/Devices/index.jsx +++ b/src/shared/components/Settings/Tools/Devices/index.jsx @@ -103,7 +103,7 @@ export default class Devices extends ConsentComponent { * @param indexNo the device index no */ onDeleteDevice(indexNo) { - const { deviceTrait } = this.state; + const { deviceTrait, isEdit } = this.state; const newDeviceTrait = { ...deviceTrait }; newDeviceTrait.traits.data.splice(indexNo, 1); this.setState({ @@ -128,6 +128,9 @@ export default class Devices extends ConsentComponent { isSubmit: false, formInvalid: false, }); + if (isEdit) { + this.onCancelEditStatus(); + } } /** @@ -584,7 +587,7 @@ export default class Devices extends ConsentComponent { Don't see your device?
- Contact Support at support@topcoder.com + Contact Support at support@topcoder.com
@@ -709,7 +712,7 @@ export default class Devices extends ConsentComponent { Don't see your device?
- Contact Support at support@topcoder.com + Contact Support at support@topcoder.com