Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fd06729035 | |||
| a09ace0d39 | |||
| 56c373134f |
@@ -24,5 +24,5 @@ public static class TypeConverters
|
|||||||
});
|
});
|
||||||
|
|
||||||
public static FuncValueConverter<string, Avalonia.Media.Color> NameColorRepresentation { get; } =
|
public static FuncValueConverter<string, Avalonia.Media.Color> NameColorRepresentation { get; } =
|
||||||
new(ColorUtils.GetColorFromString);
|
new((str)=>ColorUtils.GetColorFromString(str ?? throw new ArgumentNullException(nameof(str),"Name of color is null!")));
|
||||||
}
|
}
|
||||||
@@ -48,12 +48,10 @@ public static class LauncherConVar
|
|||||||
|
|
||||||
public static readonly ConVar<ServerHubRecord[]> Hub = ConVarBuilder.Build<ServerHubRecord[]>("launcher.hub.v2", [
|
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("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);
|
public static readonly ConVar<string> CurrentLang = ConVarBuilder.Build<string>("launcher.language", CultureInfo.CurrentCulture.Name);
|
||||||
public static readonly ConVar<string> ILSpyUrl = ConVarBuilder.Build<string>("decompiler.url",
|
public static readonly ConVar<string> ILSpyUrl = ConVarBuilder.Build<string>("decompiler.url",
|
||||||
"https://github.com/icsharpcode/ILSpy/releases/download/v9.0/ILSpy_binaries_9.0.0.7889-x64.zip");
|
"https://github.com/icsharpcode/ILSpy/releases/download/v9.0/ILSpy_binaries_9.0.0.7889-x64.zip");
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -72,10 +72,6 @@ public class LocaledText : MarkupExtension
|
|||||||
|
|
||||||
public LocaledText(string key) => Key = key;
|
public LocaledText(string key) => Key = key;
|
||||||
|
|
||||||
public LocaledText()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override object ProvideValue(IServiceProvider serviceProvider)
|
public override object ProvideValue(IServiceProvider serviceProvider)
|
||||||
{
|
{
|
||||||
return LocalisationService.GetString(Key, Options);
|
return LocalisationService.GetString(Key, Options);
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using Avalonia.Logging;
|
||||||
using CommunityToolkit.Mvvm.ComponentModel;
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
using CommunityToolkit.Mvvm.Input;
|
using CommunityToolkit.Mvvm.Input;
|
||||||
using Nebula.Launcher.Models;
|
using Nebula.Launcher.Models;
|
||||||
@@ -68,27 +69,13 @@ public partial class MainViewModel : ViewModelBase
|
|||||||
{
|
{
|
||||||
AccountInfoViewModel.Credentials.PropertyChanged += (_, args) =>
|
AccountInfoViewModel.Credentials.PropertyChanged += (_, args) =>
|
||||||
{
|
{
|
||||||
if (args.PropertyName is not nameof(AccountInfoViewModel.Credentials.Value)) return;
|
if (args.PropertyName is not nameof(AccountInfoViewModel.Credentials.Value))
|
||||||
|
return;
|
||||||
if(AccountInfoViewModel.Credentials.HasValue)
|
UpdateCredentialsInfo();
|
||||||
{
|
|
||||||
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");
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
UpdateCredentialsInfo();
|
||||||
|
|
||||||
_logger = DebugService.GetLogger(this);
|
_logger = DebugService.GetLogger(this);
|
||||||
|
|
||||||
using var stream = typeof(MainViewModel).Assembly
|
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()
|
private void CheckMigration()
|
||||||
{
|
{
|
||||||
if (!ConfigurationService.GetConfigValue(LauncherConVar.DoMigration))
|
if (!ConfigurationService.GetConfigValue(LauncherConVar.DoMigration))
|
||||||
|
|||||||
@@ -416,7 +416,20 @@ public abstract class BaseFolderContentEntry : ViewModelBase, IContentEntry
|
|||||||
private Dictionary<string, IContentEntry> _childs = [];
|
private Dictionary<string, IContentEntry> _childs = [];
|
||||||
|
|
||||||
public string IconPath => "/Assets/svg/folder.svg";
|
public string IconPath => "/Assets/svg/folder.svg";
|
||||||
public IContentHolder Holder { get; private set; }
|
|
||||||
|
private IContentHolder? _holder = null;
|
||||||
|
public IContentHolder Holder
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if(_holder == null)
|
||||||
|
throw new InvalidOperationException(
|
||||||
|
GetType().Name + " was not initialised! Call Init(IContentHolder holder, string? name = null) before using it.");
|
||||||
|
|
||||||
|
return _holder;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public IContentEntry? Parent { get; set; }
|
public IContentEntry? Parent { get; set; }
|
||||||
public string? Name { get; private set; }
|
public string? Name { get; private set; }
|
||||||
|
|
||||||
@@ -432,7 +445,7 @@ public abstract class BaseFolderContentEntry : ViewModelBase, IContentEntry
|
|||||||
public void Init(IContentHolder holder, string? name = null)
|
public void Init(IContentHolder holder, string? name = null)
|
||||||
{
|
{
|
||||||
Name = name;
|
Name = name;
|
||||||
Holder = holder;
|
_holder = holder;
|
||||||
}
|
}
|
||||||
|
|
||||||
public T AddChild<T>(T child) where T: IContentEntry
|
public T AddChild<T>(T child) where T: IContentEntry
|
||||||
|
|||||||
@@ -93,7 +93,8 @@ public static class MetricsEnabledPatcher
|
|||||||
var harmony = harmonyService.Instance.Harmony;
|
var harmony = harmonyService.Instance.Harmony;
|
||||||
|
|
||||||
var targetType = reflectionService.GetType("Robust.Shared.GameObjects.EntitySystemManager");
|
var targetType = reflectionService.GetType("Robust.Shared.GameObjects.EntitySystemManager");
|
||||||
var targetMethod = targetType.GetProperty("MetricsEnabled").GetGetMethod();
|
var targetMethod = targetType.GetProperty("MetricsEnabled")?.GetGetMethod() ??
|
||||||
|
throw new Exception("target method is null.. huh.. do we have patch a right think?");
|
||||||
|
|
||||||
var prefix = typeof(MetricsEnabledPatcher).GetMethod(nameof(MetricsEnabledGetterPrefix),
|
var prefix = typeof(MetricsEnabledPatcher).GetMethod(nameof(MetricsEnabledGetterPrefix),
|
||||||
BindingFlags.Static | BindingFlags.NonPublic);
|
BindingFlags.Static | BindingFlags.NonPublic);
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using Avalonia;
|
using Avalonia;
|
||||||
|
using Avalonia.Controls;
|
||||||
using Avalonia.Controls.ApplicationLifetimes;
|
using Avalonia.Controls.ApplicationLifetimes;
|
||||||
using Avalonia.Markup.Xaml;
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
@@ -13,8 +14,6 @@ public partial class App : Application
|
|||||||
|
|
||||||
public override void OnFrameworkInitializationCompleted()
|
public override void OnFrameworkInitializationCompleted()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
|
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
|
||||||
{
|
{
|
||||||
desktop.MainWindow = new MainWindow();
|
desktop.MainWindow = new MainWindow();
|
||||||
|
|||||||
@@ -36,7 +36,11 @@ public partial class MainWindow : Window
|
|||||||
Console.WriteLine(messageOut);
|
Console.WriteLine(messageOut);
|
||||||
LogStr += messageOut + "\n";
|
LogStr += messageOut + "\n";
|
||||||
};
|
};
|
||||||
Start();
|
LogStandalone.Log("Starting up");
|
||||||
|
if (!Design.IsDesignMode)
|
||||||
|
_ = Start();
|
||||||
|
else
|
||||||
|
LogStandalone.Log("Debug information", 51);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task Start()
|
private async Task Start()
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AFile_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F3f31e7e8aa33de883c2ccfa62a9c81bfc246c36e825b489476f9472032e512_003FFile_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AFile_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F3f31e7e8aa33de883c2ccfa62a9c81bfc246c36e825b489476f9472032e512_003FFile_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AFrozenDictionary_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F89dff9063ddb01ff8125b579122b88bf4de94526490d77bcbbef7d0ee662a_003FFrozenDictionary_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AFrozenDictionary_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F89dff9063ddb01ff8125b579122b88bf4de94526490d77bcbbef7d0ee662a_003FFrozenDictionary_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AFuncValueConverter_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003Fe91c13e7e24d7ba324e0e6eb12a24ea8c7761299d3c4703e55c86dd120835e61_003FFuncValueConverter_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AFuncValueConverter_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003Fe91c13e7e24d7ba324e0e6eb12a24ea8c7761299d3c4703e55c86dd120835e61_003FFuncValueConverter_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AFunc_00601_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fa6b7f037ba7b44df80b8d3aa7e58eeb2e8e938_003Fab_003F4dac48f4_003FFunc_00601_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AFuture_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003Fb3575a2f41d7c2dbfaa36e866b8a361e11dd7223ff82bc574c1d5d4b7522f735_003FFuture_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AFuture_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003Fb3575a2f41d7c2dbfaa36e866b8a361e11dd7223ff82bc574c1d5d4b7522f735_003FFuture_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AHttpClient_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003Fc439425da351c75ac7d966a1cc8324b51a9c471865af79d2f2f3fcb65e392_003FHttpClient_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AHttpClient_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003Fc439425da351c75ac7d966a1cc8324b51a9c471865af79d2f2f3fcb65e392_003FHttpClient_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AHttpContent_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F9657cc383c70851dc2bdcf91eff27f21196844abfe552fc9c3243ff36974cd_003FHttpContent_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AHttpContent_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FCinka_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F9657cc383c70851dc2bdcf91eff27f21196844abfe552fc9c3243ff36974cd_003FHttpContent_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
|
|||||||
Reference in New Issue
Block a user