This commit is contained in:
RMBGAME
2022-07-22 12:55:26 +08:00
parent 7ee9cc6651
commit c9873d660a
8 changed files with 17 additions and 16 deletions
@@ -161,8 +161,9 @@
<Separator Classes="Separator"/>
<Border Classes="Item" IsEnabled="{ReflectionBinding Path=User.UserType,Mode=OneWay,Source={x:Static service:UserService.Current},Converter={StaticResource EnumEqualValueConverter},ConverterParameter={x:Static app:UserType.Sponsor}}">
<DockPanel>
<Border Classes="Item"
IsEnabled="{ReflectionBinding Path=User,Mode=OneWay,Source={x:Static service:UserService.Current},Converter={StaticResource IsNullConverter},ConverterParameter=invert}">
<DockPanel IsEnabled="{ReflectionBinding Path=User.UserType,Mode=OneWay,Source={x:Static service:UserService.Current},Converter={StaticResource EnumEqualValueConverter},ConverterParameter={x:Static app:UserType.Sponsor}}">
<StackPanel>
<TextBlock Text="{ReflectionBinding Path=Res.Advertisement_NoShow,Mode=OneWay,Source={x:Static resx:R.Current}}"/>
<TextBlock Classes="prompt"
@@ -172,7 +173,6 @@
<ToggleSwitch IsChecked="{ReflectionBinding Source={x:Static ms:UISettings.IsShowAdvertise},Path=!Value, Mode=TwoWay}"/>
</DockPanel>
</Border>
</StackPanel>
</ScrollViewer>
</UserControl>
@@ -129,8 +129,9 @@
Command="{ReflectionBinding Logout_Click,Mode=OneTime}"
Classes="DialogButton"></Button>
</StackPanel>-->
<TextBlock Text="{Binding ConfirmationsConutMessage}" Grid.Column="1"
VerticalAlignment="Center" HorizontalAlignment="Right" FontSize="16"></TextBlock>
<TextBlock Text="{Binding ConfirmationsConutMessage}"
Grid.Column="1"
VerticalAlignment="Center" HorizontalAlignment="Right" />
</DockPanel>
</Border>
@@ -7,6 +7,7 @@ sealed partial class YarpCertificateManagerImpl : CertificateManagerImpl, ICerti
{
public YarpCertificateManagerImpl(IPlatformService platformService, IReverseProxyService reverseProxyService) : base(platformService, reverseProxyService)
{
RootCertificate = LoadRootCertificate();
}
public override X509Certificate2? RootCertificate { get; set; }
@@ -158,7 +158,7 @@ abstract partial class CertificateManagerImpl
if (!IsRootCertificateInstalled)
{
TrustRootCertificate();
return false;
return IsRootCertificateInstalled;
}
return true;
}
@@ -98,6 +98,7 @@ namespace System.Application.Services
var password = await TextBoxWindowViewModel.ShowDialogByPresetAsync(TextBoxWindowViewModel.PresetType.LocalAuth_PasswordRequired);
if (string.IsNullOrEmpty(password))
{
Authenticators.Clear();
return;
}
list = await repository.ConvertToList(auths, password);
@@ -129,6 +130,7 @@ namespace System.Application.Services
}
else
{
Authenticators.Clear();
Toast.Show(AppResources.LocalAuth_ProtectionAuth_PasswordError);
}
}
@@ -208,6 +208,7 @@ namespace System.Application.Services
}
else
{
ProxyStatus = false;
MessageBox.Show(AppResources.CommunityFix_StartProxyFaild);
}
}
+2 -7
View File
@@ -173,16 +173,11 @@ namespace System.Application.Services
await RefreshUserAsync();
}
bool _HasPhoneNumber;
[Reactive]
/// <summary>
/// 当前登录用户是否有手机号码
/// </summary>
public bool HasPhoneNumber
{
get => _HasPhoneNumber;
set => this.RaiseAndSetIfChanged(ref _HasPhoneNumber, value);
}
public bool HasPhoneNumber { get; set; }
string _PhoneNumber = string.Empty;
@@ -34,7 +34,7 @@ namespace System.Application.UI.ViewModels
public static string DisplayName => AppResources.LocalAuth_SteamAuthTrade;
protected override void InitializeComponent()
protected async override void InitializeComponent()
{
Title = DisplayName;
@@ -51,7 +51,7 @@ namespace System.Application.UI.ViewModels
RegisterSelectAllObservable();
Initialize();
await Initialize();
if (_Authenticator != null)
{
@@ -72,7 +72,7 @@ namespace System.Application.UI.ViewModels
private string? AuthPassword;
private bool AuthIsLocal;
private new async void Initialize()
private new async Task Initialize()
{
var repository = DI.Get<IGameAccountPlatformAuthenticatorRepository>();
var (success, password) = await AuthService.Current.HasPasswordEncryptionShowPassWordWindow();
@@ -83,6 +83,7 @@ namespace System.Application.UI.ViewModels
else
{
AuthPassword = null;
this.Close();
}
var auths = await repository.GetAllSourceAsync();
AuthIsLocal = repository.HasLocal(auths);