Publish Zonghengjia Windows 0.3.18 client source

This commit is contained in:
2026-11-15 22:17:39 +08:00
parent ebec81ceb1
commit eb90ef4042
15 changed files with 1575 additions and 1680 deletions
+7 -5
View File
@@ -30,16 +30,18 @@ internal static class DashboardLayout
var traffic = Rectangle.Empty;
var tailnet = Rectangle.Empty;
var footer = new Rectangle(margin, viewport.Height - margin - S(18), width, S(18));
var daily = new Rectangle(margin, footer.Top - gap - S(22), width, S(22));
var daily = new Rectangle(margin, footer.Top - gap - S(20), width, S(20));
var trendTop = configuration.Bottom + gap;
var graphHeight = Math.Max(S(72), daily.Top - gap - trendTop);
var serverHeight = showServerTraffic ? Math.Min(S(100), (int)Math.Round((graphHeight-gap)*.52)) : 0;
var trend = new Rectangle(margin, trendTop, width, graphHeight - (showServerTraffic ? serverHeight+gap : 0));
var servers = showServerTraffic ? new Rectangle(margin, trend.Bottom+gap, width, serverHeight) : Rectangle.Empty;
var headingWidth = S(120);
var speedWidth = (width - headingWidth - S(10)) / 2;
Rectangle Speed(int column) => new(headingWidth + column * speedWidth, 0, speedWidth, S(22));
Rectangle Total(int column) => new(headingWidth + column * speedWidth, 0, speedWidth, daily.Height - S(2));
var headingWidth = S(106);
var columnWidth = (width - headingWidth - S(10)) / 2;
var metricWidth = Math.Min(S(138), columnWidth);
int MetricLeft(int column) => headingWidth + column * columnWidth + (columnWidth - metricWidth) / 2;
Rectangle Speed(int column) => new(MetricLeft(column), 0, metricWidth, S(20));
Rectangle Total(int column) => new(MetricLeft(column), 0, metricWidth, daily.Height - S(2));
Rectangle[] metrics = [Total(0), Speed(0), Speed(1), Total(1)];
return new(welcome, account, identity, logout, status, configuration, actual, metrics,
traffic, tailnet, trend, daily, servers, footer, viewport.Height, true, 1f);