fix(proxy-snapshot, proxy-groups): restore last-selected proxy and group info

This commit is contained in:
Slinetrac
2025-10-24 21:32:34 +08:00
Unverified
parent 547cf89190
commit ead312090d
2 changed files with 9 additions and 5 deletions

View File

@@ -557,16 +557,19 @@ export const ProxyGroups = (props: Props) => {
<Typography variant="body2" sx={{ fontWeight: 500 }}> <Typography variant="body2" sx={{ fontWeight: 500 }}>
{group.name} {group.name}
</Typography> </Typography>
<Typography <Typography variant="caption" color="text.secondary">
variant="caption" {`${t("Group Type")}: ${group.type} · ${t("Proxy Count")}: ${
color="text.secondary" Array.isArray(group.all) ? group.all.length : 0
></Typography> }`}
</Typography>
</Box> </Box>
</MenuItem> </MenuItem>
))} ))}
{availableGroups.length === 0 && ( {availableGroups.length === 0 && (
<MenuItem disabled> <MenuItem disabled>
<Typography variant="body2" color="text.secondary"></Typography> <Typography variant="body2" color="text.secondary">
{t("Empty")}
</Typography>
</MenuItem> </MenuItem>
)} )}
</Menu> </Menu>

View File

@@ -91,6 +91,7 @@ const parseProxyGroup = (
type: entry.type ? String(entry.type) : "Selector", type: entry.type ? String(entry.type) : "Selector",
provider: entry.provider, provider: entry.provider,
testUrl: entry.testUrl || entry.test_url, testUrl: entry.testUrl || entry.test_url,
now: typeof entry.now === "string" ? entry.now : undefined,
}); });
}; };