- tweak: SVG think

This commit is contained in:
2025-01-18 18:20:11 +03:00
parent c549e449fe
commit 2e3e50e7af
43 changed files with 57 additions and 85 deletions

View File

@@ -20,9 +20,9 @@ public partial class MainViewModel : ViewModelBase
{
private readonly List<ListItemTemplate> _templates =
[
new ListItemTemplate(typeof(AccountInfoViewModel), "Account", "Account"),
new ListItemTemplate(typeof(ServerListViewModel), "HomeRegular", "Servers"),
new ListItemTemplate(typeof(ContentBrowserViewModel), "GridRegular", "Content")
new ListItemTemplate(typeof(AccountInfoViewModel), "user", "Account"),
new ListItemTemplate(typeof(ServerListViewModel), "file", "Servers"),
new ListItemTemplate(typeof(ContentBrowserViewModel), "folder", "Content")
];
private readonly List<PopupViewModelBase> _viewQueue = new();

View File

@@ -208,9 +208,6 @@ public sealed partial class ContentBrowserViewModel : ViewModelBase
public class ContentEntry
{
public static IImage DirImage = new Bitmap(AssetLoader.Open(new Uri("avares://Nebula.Launcher/Assets/dir.png")));
public static IImage IconImage = new Bitmap(AssetLoader.Open(new Uri("avares://Nebula.Launcher/Assets/file.png")));
private readonly Dictionary<string, ContentEntry> _childs = new();
private readonly ContentBrowserViewModel _viewModel;
@@ -229,7 +226,7 @@ public class ContentEntry
public string Name { get; private set; }
public string PathName { get; }
public string ServerName { get; }
public IImage IconPath { get; set; } = DirImage;
public string IconPath { get; set; } = "/Assets/svg/folder.svg";
public ContentEntry? Parent { get; private set; }
public bool IsRoot => Parent == null;
@@ -297,7 +294,7 @@ public class ContentEntry
};
dirEntry.TryAddChild(entry);
entry.IconPath = IconImage;
entry.IconPath = "/Assets/svg/file.svg";
return entry;
}

View File

@@ -26,7 +26,6 @@ public partial class ServerListViewModel : ViewModelBase
//Design think
protected override void InitialiseInDesignMode()
{
Console.WriteLine("SOSAL");
ServerInfos.Add(CreateServerView(new ServerHubInfo("ss14://localhost",
new ServerStatus("Nebula", "TestCraft", ["16+", "RU"], "super", 12, 55, 1, false, DateTime.Now, 20), [])));
ServerInfos.Add(CreateServerView(new ServerHubInfo("ss14://localhost",
@@ -38,7 +37,6 @@ public partial class ServerListViewModel : ViewModelBase
//real think
protected override void Initialise()
{
Console.WriteLine("SOSAL!!");
foreach (var info in HubService.ServerList) UnsortedServers.Add(info);
HubService.HubServerChangedEventArgs += HubServerChangedEventArgs;