mirror of
https://github.com/BlossomiShymae/Needlework.Net.git
synced 2025-12-06 10:10:48 +01:00
25 lines
796 B
C#
25 lines
796 B
C#
using Avalonia.Platform;
|
|
using Needlework.Net.Models;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text.Json;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Needlework.Net.ViewModels.Pages.Home;
|
|
|
|
public partial class HomeViewModel : PageBase
|
|
{
|
|
public HomeViewModel() : base("Home", "fa-solid fa-house", int.MinValue) { }
|
|
|
|
public List<LibraryViewModel> Libraries { get; } = JsonSerializer.Deserialize<List<Library>>(AssetLoader.Open(new Uri($"avares://NeedleworkDotNet/Assets/libraries.json")))
|
|
!.Where(library => library.Tags.Contains("lcu") || library.Tags.Contains("ingame"))
|
|
.Select(library => new LibraryViewModel(library))
|
|
.ToList();
|
|
|
|
public override Task InitializeAsync()
|
|
{
|
|
return Task.CompletedTask;
|
|
}
|
|
}
|