@@ -106,12 +106,10 @@ namespace ServiceLib.ViewModels
|
||||
public StatusBarViewModel(Func<EViewAction, object?, Task<bool>>? updateView)
|
||||
{
|
||||
_config = AppHandler.Instance.Config;
|
||||
_updateView = updateView;
|
||||
|
||||
if (_updateView != null)
|
||||
if (updateView != null)
|
||||
{
|
||||
MessageBus.Current.Listen<string>(EMsgCommand.RefreshProfiles.ToString())
|
||||
.Subscribe(async x => await _updateView?.Invoke(EViewAction.DispatcherRefreshServersBiz, null));
|
||||
Init(updateView);
|
||||
}
|
||||
|
||||
SelectedRouting = new();
|
||||
@@ -127,7 +125,7 @@ namespace ServiceLib.ViewModels
|
||||
}
|
||||
|
||||
RefreshRoutingsMenu();
|
||||
InboundDisplayStaus();
|
||||
InboundDisplayStatus();
|
||||
ChangeSystemProxyAsync(_config.systemProxyItem.sysProxyType, true);
|
||||
|
||||
#region WhenAnyValue && ReactiveCommand
|
||||
@@ -426,19 +424,12 @@ namespace ServiceLib.ViewModels
|
||||
|
||||
#region UI
|
||||
|
||||
public void InboundDisplayStaus()
|
||||
public void InboundDisplayStatus()
|
||||
{
|
||||
StringBuilder sb = new();
|
||||
sb.Append($"[{EInboundProtocol.socks}:{AppHandler.Instance.GetLocalPort(EInboundProtocol.socks)}]");
|
||||
sb.Append(" | ");
|
||||
//if (_config.systemProxyItem.sysProxyType == ESysProxyType.ForcedChange)
|
||||
//{
|
||||
// sb.Append($"[{Global.InboundHttp}({ResUI.SystemProxy}):{LazyConfig.Instance.GetLocalPort(Global.InboundHttp)}]");
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
sb.Append($"[{EInboundProtocol.http}:{AppHandler.Instance.GetLocalPort(EInboundProtocol.http)}]");
|
||||
//}
|
||||
InboundDisplay = $"{ResUI.LabLocal}:{sb}";
|
||||
|
||||
if (_config.inbound[0].allowLANConn)
|
||||
|
||||
Reference in New Issue
Block a user