- fix: little thinks
This commit is contained in:
@@ -48,7 +48,7 @@ public static class LauncherConVar
|
||||
|
||||
public static readonly ConVar<ServerHubRecord[]> Hub = ConVarBuilder.Build<ServerHubRecord[]>("launcher.hub.v2", [
|
||||
new ServerHubRecord("WizDen", "https://harpy.durenko.tatar/hub-api/api/servers"),
|
||||
new ServerHubRecord("AltHub","https://web.networkgamez.com/api/servers")
|
||||
new ServerHubRecord("AltHub","https://hub.singularity14.co.uk/api/servers")
|
||||
]);
|
||||
|
||||
public static readonly ConVar<string> CurrentLang = ConVarBuilder.Build<string>("launcher.language", CultureInfo.CurrentCulture.Name);
|
||||
|
||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using Avalonia.Logging;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using Nebula.Launcher.Models;
|
||||
@@ -68,27 +69,13 @@ public partial class MainViewModel : ViewModelBase
|
||||
{
|
||||
AccountInfoViewModel.Credentials.PropertyChanged += (_, args) =>
|
||||
{
|
||||
if (args.PropertyName is not nameof(AccountInfoViewModel.Credentials.Value)) return;
|
||||
|
||||
if(AccountInfoViewModel.Credentials.HasValue)
|
||||
{
|
||||
LoginText =
|
||||
LocalisationService.GetString("auth-current-login-name",
|
||||
new Dictionary<string, object>
|
||||
{
|
||||
{ "login", AccountInfoViewModel.Credentials.Value?.Login ?? "" },
|
||||
{
|
||||
"auth_server",
|
||||
AccountInfoViewModel.GetServerAuthName(AccountInfoViewModel.Credentials.Value) ?? ""
|
||||
}
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
LoginText = LocalisationService.GetString("auth-current-login-no-name");
|
||||
}
|
||||
if (args.PropertyName is not nameof(AccountInfoViewModel.Credentials.Value))
|
||||
return;
|
||||
UpdateCredentialsInfo();
|
||||
};
|
||||
|
||||
UpdateCredentialsInfo();
|
||||
|
||||
_logger = DebugService.GetLogger(this);
|
||||
|
||||
using var stream = typeof(MainViewModel).Assembly
|
||||
@@ -116,6 +103,27 @@ public partial class MainViewModel : ViewModelBase
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateCredentialsInfo()
|
||||
{
|
||||
if(AccountInfoViewModel.Credentials.HasValue)
|
||||
{
|
||||
LoginText =
|
||||
LocalisationService.GetString("auth-current-login-name",
|
||||
new Dictionary<string, object>
|
||||
{
|
||||
{ "login", AccountInfoViewModel.Credentials.Value?.Login ?? "" },
|
||||
{
|
||||
"auth_server",
|
||||
AccountInfoViewModel.GetServerAuthName(AccountInfoViewModel.Credentials.Value) ?? ""
|
||||
}
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
LoginText = LocalisationService.GetString("auth-current-login-no-name");
|
||||
}
|
||||
}
|
||||
|
||||
private void CheckMigration()
|
||||
{
|
||||
if (!ConfigurationService.GetConfigValue(LauncherConVar.DoMigration))
|
||||
|
||||
Reference in New Issue
Block a user