Feature: Show TLS and MCP state in the server status bar
The main window's status bar now carries two short panes between the host count and the FRP address. The first reports whether the server identity is loaded, using the same ServerTlsIdentity::IsReady() check the rest of the UI uses, so a menu that claims TLS is on cannot leave the bar saying otherwise when the certificate failed to load. The second reports whether MCP is enabled and, while it is, which protocol the endpoint speaks: (HTTP) or (HTTPS) according to McpHttps. Both panes follow the existing 60 second statistics tick, and toggling either switch in its dialog refreshes them at once instead of leaving the bar stale until the next tick. Pane widths are measured from the widest text each pane can show in the current language instead of hardcoded pixels, and the measurement selects the status bar's own font: DEFAULT_GUI_FONT is about 8% narrower than the Segoe UI the bar paints with, which would have clipped "MCP: ... (HTTPS)" at higher display scaling. Switching HTTP/HTTPS keeps the column width steady, and turning MCP off lets it shrink again. The MCP settings dialog was also missing translations for several of its labels, the file write switch among them, which is why they stayed Chinese in the English UI. Those keys, together with the status bar ones, are added to all three language files. Co-Authored-By: deepseek-flash
This commit is contained in:
1 parent
e99092ca70
commit
559681ea01
7 files changed
+124
-23
No files matched your search
@@ -13,6 +13,8 @@
|
||||
#define IDR_STATUSBAR_RUNTIME 104
|
||||
#define IDR_STATUSBAR_EXPIRE 105
|
||||
#define IDR_STATUSBAR_FRP 106
|
||||
#define IDR_STATUSBAR_TLS 107
|
||||
#define IDR_STATUSBAR_MCP 108
|
||||
#define IDR_MAINFRAME 128
|
||||
#define IDR_MENU_LIST_ONLINE 129
|
||||
#define IDB_BITMAP_ONLINE 130
|
||||
|
||||
Reference in new issue
Block a user