code refactor

This commit is contained in:
MaysWind
2023-06-23 14:16:37 +08:00
parent a5424afc38
commit 099b710eb1
2 changed files with 7 additions and 26 deletions
+6 -6
View File
@@ -196,19 +196,19 @@ export default {
const ua = parseUserAgent(token.userAgent);
if (!ua || !ua.device) {
return iconConstants.deviceIcons.desktop.f7Icon;
return 'device_desktop';
}
if (ua.device.type === 'mobile') {
return iconConstants.deviceIcons.mobile.f7Icon;
return 'device_phone_portrait';
} else if (ua.device.type === 'wearable') {
return iconConstants.deviceIcons.wearable.f7Icon;
return 'device_phone_portrait';
} else if (ua.device.type === 'tablet') {
return iconConstants.deviceIcons.tablet.f7Icon;
return 'device_tablet_portrait';
} else if (ua.device.type === 'smarttv') {
return iconConstants.deviceIcons.tv.f7Icon;
return 'tv';
} else {
return iconConstants.deviceIcons.desktop.f7Icon;
return 'device_desktop';
}
},
getTokenDomId(tokenId) {