UI: explain dangerous operations, screen modes and host filtering

Four items from a user-side review of the master. The common thread: the UI
now says what it is about to do instead of leaving the user to guess.

Confirm boxes. Logout, restart, shutdown, delete host and uninstall client
all asked "are you sure" without naming the action or the hosts, so a
multi-selection could not be checked. DescribeTargetHosts() lists
"note (or computer name) (ip)" capped at five lines, and the default button
is No. The preview is dropped before the modal box and targets are
re-resolved after it, since the list can reshuffle in between.

Screen modes. High Speed / Ultra Speed became High Quality (DXGI +
differential: lossless, bandwidth hungry) and Smooth (GDI + H264: lossy,
cheap). TranslateMenu looks menus up by displayed text, so the .rc entries,
the FeatureLimitsDlg item names and the language pack keys changed together.

Host filter. The Ctrl+F bar was find-next; it now filters as you type over
IP, location, note, OS and version, and Esc clears the filter. The status
line reads "filtered: N / M total" while active. Commands still resolve by
clientID and m_FilteredIndices still maps row to m_HostList index, so no
command path changes. SearchBarDlg drops from 446 to 312 lines.

Quality changes. The adaptive level now shows its reason for twenty seconds
("Good (high latency)") instead of silently changing. The full-screen info
bar was a fixed 170px, so that reason was clipped; the width is now measured
from the text with the same font that paints it, 170 becoming the floor and
16px quantisation so changing digits do not jitter the window. Cosmetic
only: no threshold, hysteresis, cooldown or lock-out logic is touched.

Verified: debug server build, 0 errors; new strings present in .res and in
the exe. UI not exercised - the debug master would fight the running release
master for the listening port in Bin/settings.ini.
This commit is contained in:
yuanyuanxiang committed 2026-11-07 15:34:45 +01:00
1 parent a190c21217
commit 6b87a31c6f
12 files changed
+364 -220

No files matched your search

+7 -11
View File
@@ -28,20 +28,16 @@ public:
CToolTipCtrl m_tooltip;
// 搜索状态
std::vector<uint64_t> m_Results; // 匹配项的 clientID(而非索引,避免列表变化导致失效)
int m_nCurrentIndex; // 当前高亮的结果索引
CString m_strLastSearch; // 上次搜索文本
int FindListIndexByClientID(uint64_t clientID); // 根据 clientID 查找当前列表索引
CString m_strLastSearch; // 上次已应用到列表的筛选文本
// 方法
void Show(); // 显示搜索栏
void Hide(); // 隐藏搜索栏
void DoSearch(); // 执行搜索
void InvalidateCache(); // 清空搜索缓存(Tab切换时调用)
void GotoPrev(); // 上一个结果
void GotoNext(); // 下一个结果
void GotoResult(int index); // 跳转到指定结果
void Hide(); // 隐藏搜索栏(同时撤掉筛选)
void DoSearch(); // 应用筛选(输入防抖后调用)
void InvalidateCache(); // 刷新计数(Tab切换/列表变化时调用)
void GotoPrev(); // 选中上一行
void GotoNext(); // 选中下一行
void MoveSelection(int delta); // 在筛选结果内移动选中项
void UpdateCountText(); // 更新计数显示
void UpdatePosition(); // 更新位置(居中于父窗口)