Feat: Add privilege column (SYSTEM/Admin/User) to online host list

This commit is contained in:
yuanyuanxiang
2026-06-30 22:44:31 +02:00
parent bcccbefb77
commit 6d0b1bb07b
6 changed files with 39 additions and 29 deletions

View File

@@ -139,15 +139,16 @@ COLUMNSTRUCT g_Column_Data_Online[g_Column_Count_Online] = {
{"预览", 60 },
{"IP", 130 },
{"端口", 60 },
{"地理位置", 130 },
{"计算机名/备注", 150 },
{"地理位置", 140 },
{"计算机名/备注", 140 },
{"操作系统", 120 },
{"CPU", 80 },
{"摄像头", 70 },
{"RTT", 70 },
{"摄像头", 60 },
{"RTT", 60 },
{"版本", 90 },
{"安装时间", 120 },
{"活动窗口", 140 },
{"权限", 60 },
{"安装时间", 130 },
{"活动窗口", 130 },
{"类型", 50 },
};
@@ -1462,8 +1463,12 @@ VOID CMy2015RemoteDlg::AddList(CString strIP, CString strAddr, CString strPCName
capStr = ver.Mid(dashPos + 1);
}
const std::string& privUser = v[RES_USERNAME];
const std::string& privAdmin = v[RES_ISADMIN];
CString privilegeStr = privUser == "SYSTEM" ? "SYSTEM" : privAdmin == "1" ? "Admin" : "User";
CString data[ONLINELIST_MAX] = { strIP, strAddr, "", strPCName, strOS, strCPU, strVideo, strPing,
verDisplay, install, startTime, v[RES_CLIENT_TYPE].empty() ? "?" : v[RES_CLIENT_TYPE].c_str(), path,
verDisplay, privilegeStr, install, startTime, v[RES_CLIENT_TYPE].empty() ? "?" : v[RES_CLIENT_TYPE].c_str(), path,
v[RES_CLIENT_PUBIP].empty() ? strIP : v[RES_CLIENT_PUBIP].c_str(), startTime, capStr,
};
// 优先采用客户端自报的 ID新客户端用 V2 算法 = MachineGuid + 归一化路径,