Feature(web): show host remark alongside hostname
This commit is contained in:
@@ -1545,6 +1545,16 @@ std::string CWebService::BuildDeviceListJson(const std::string& username) {
|
||||
CString name = ctx->GetClientData(ONLINELIST_COMPUTER_NAME);
|
||||
device["name"] = AnsiToUtf8(name);
|
||||
|
||||
// 用户在 MFC 端给这台主机起的备注(菜单"修改备注"写入 MAP_NOTE)
|
||||
// 例如 hostname="A6" + remark="我的Windows" → web 显示"A6 (我的Windows)"
|
||||
if (m_pParentDlg->m_ClientMap) {
|
||||
CString remark = m_pParentDlg->m_ClientMap->GetClientMapData(
|
||||
ctx->GetClientID(), MAP_NOTE);
|
||||
if (!remark.IsEmpty()) {
|
||||
device["remark"] = AnsiToUtf8(remark);
|
||||
}
|
||||
}
|
||||
|
||||
CString ip = ctx->GetClientData(ONLINELIST_IP);
|
||||
device["ip"] = AnsiToUtf8(ip);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user