diff --git a/src/components/UserMenu.tsx b/src/components/UserMenu.tsx index 81a5ee1..765a741 100644 --- a/src/components/UserMenu.tsx +++ b/src/components/UserMenu.tsx @@ -2788,12 +2788,23 @@ export const UserMenu: React.FC = () => { ) : (
- {devices.map((device) => { + {devices + .sort((a, b) => { + // 当前设备置顶 + if (a.isCurrent && !b.isCurrent) return -1; + if (!a.isCurrent && b.isCurrent) return 1; + return 0; + }) + .map((device) => { const DeviceIcon = getDeviceIcon(device.deviceInfo); return (