feat: supports show connection detail

This commit is contained in:
GyDi
2023-08-05 16:52:14 +08:00
parent 53a207e859
commit 2ce944034d
6 changed files with 173 additions and 176 deletions

View File

@@ -0,0 +1,6 @@
export const truncateStr = (str?: string, prefixLen = 16, maxLen = 56) => {
if (!str || str.length <= maxLen) return str;
return (
str.slice(0, prefixLen) + " ... " + str.slice(-(maxLen - prefixLen - 5))
);
};