Footer surfaces full LAN URL when control surface is LAN-reachable
Some checks failed
CI / build-and-test (push) Failing after 28s
Some checks failed
CI / build-and-test (push) Failing after 28s
When LAN-reachable mode is on, the footer's control-surface badge now shows the full http://<lan-ip>:<port> instead of just :<port>. Operators setting up a thin client can read the URL straight off the host PC's footer without having to open Settings → DISPLAY → Copy URL. Reverts to the existing 'REST :9755 + OSC :9000' compact form when bound to localhost only — no point spelling out 127.0.0.1 since by definition only the host can reach it.
This commit is contained in:
parent
8e66491e09
commit
65d3b78e63
1 changed files with 9 additions and 0 deletions
|
|
@ -545,8 +545,17 @@ public sealed class MainViewModel : ObservableObject, IDisposable
|
|||
var rest = app?.ControlSurface?.IsRunning ?? false;
|
||||
var osc = app?.OscBridge?.IsRunning ?? false;
|
||||
IsControlSurfaceRunning = rest || osc;
|
||||
// When LAN-reachable mode is on, the footer text shows the routable
|
||||
// URL instead of just the port — operators setting up a thin client
|
||||
// shouldn't have to open Settings to find what to type into a
|
||||
// browser. We trust the Settings VM's ControlSurfaceLanReachable
|
||||
// boolean since that's where the toggle is persisted.
|
||||
var lanMode = rest && (app?.ControlSurface?.BoundToLan ?? false);
|
||||
var lanHost = lanMode ? Settings.ControlSurfaceUrl.Replace("/ui", "") : null;
|
||||
ControlSurfaceText = (rest, osc) switch
|
||||
{
|
||||
(true, true) when lanMode => $"{lanHost} + OSC :{app!.OscBridge!.Port}",
|
||||
(true, false) when lanMode => lanHost!,
|
||||
(true, true) => $"REST :{app!.ControlSurface!.Port} + OSC :{app.OscBridge!.Port}",
|
||||
(true, false) => $"REST :{app!.ControlSurface!.Port}",
|
||||
(false, true) => $"OSC :{app!.OscBridge!.Port}",
|
||||
|
|
|
|||
Loading…
Reference in a new issue