feat: sort groups

This commit is contained in:
GyDi 2021-12-12 01:02:14 +08:00
parent eddf10e740
commit 1e2e6ca8a6
2 changed files with 9 additions and 5 deletions

View File

@ -21,11 +21,13 @@ const ProxyPage = () => {
Proxy Groups
</Typography>
{groups.length > 0 && (
<List sx={{ borderRadius: 1, boxShadow: 2 }}>
{groups.map((group) => (
<ProxyGroup key={group.name} group={group} />
))}
</List>
)}
</Box>
);
};

View File

@ -34,6 +34,8 @@ export async function getProxyInfo() {
each.all = each.all?.map((item) => results[item]).filter((e) => e);
});
groups.sort((a, b) => b.name.localeCompare(a.name));
return {
global,
groups,