mirror of
https://github.com/BlossomiShymae/Needlework.Net.git
synced 2025-12-06 10:10:48 +01:00
refactor: use icons from Icons.Avalonia
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 2.9 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 3.2 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.9 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 2.8 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 938 B |
@@ -1,4 +1,6 @@
|
|||||||
using BlossomiShymae.Briar;
|
using Avalonia;
|
||||||
|
using Avalonia.Media;
|
||||||
|
using BlossomiShymae.Briar;
|
||||||
using BlossomiShymae.Briar.Utils;
|
using BlossomiShymae.Briar.Utils;
|
||||||
using CommunityToolkit.Mvvm.ComponentModel;
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
using CommunityToolkit.Mvvm.Input;
|
using CommunityToolkit.Mvvm.Input;
|
||||||
@@ -123,7 +125,19 @@ public partial class MainWindowViewModel
|
|||||||
{
|
{
|
||||||
Content = page.DisplayName,
|
Content = page.DisplayName,
|
||||||
Tag = page,
|
Tag = page,
|
||||||
IconSource = new BitmapIconSource() { UriSource = new Uri($"avares://NeedleworkDotNet/Assets/Icons/{page.Icon}.png") }
|
IconSource = new ImageIconSource
|
||||||
|
{
|
||||||
|
Source = new Projektanker.Icons.Avalonia.IconImage()
|
||||||
|
{
|
||||||
|
Value = page.Icon,
|
||||||
|
Brush = new SolidColorBrush(Application.Current!.ActualThemeVariant.Key switch
|
||||||
|
{
|
||||||
|
"Light" => Colors.Black,
|
||||||
|
"Dark" => Colors.White,
|
||||||
|
_ => Colors.Gray
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
partial void OnSelectedNavigationViewItemChanged(NavigationViewItem value)
|
partial void OnSelectedNavigationViewItemChanged(NavigationViewItem value)
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ namespace Needlework.Net.ViewModels.Pages.About;
|
|||||||
|
|
||||||
public partial class AboutViewModel : PageBase
|
public partial class AboutViewModel : PageBase
|
||||||
{
|
{
|
||||||
public AboutViewModel() : base("About", "info-circle")
|
public AboutViewModel() : base("About", "fa-solid fa-circle-info")
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ public partial class ConsoleViewModel : PageBase
|
|||||||
{
|
{
|
||||||
private readonly DocumentService _documentService;
|
private readonly DocumentService _documentService;
|
||||||
|
|
||||||
public ConsoleViewModel(DocumentService documentService, NotificationService notificationService) : base("Console", "terminal", -200)
|
public ConsoleViewModel(DocumentService documentService, NotificationService notificationService) : base("Console", "fa-solid fa-terminal", -200)
|
||||||
{
|
{
|
||||||
_request = new(notificationService, Endpoints.Tab.LCU);
|
_request = new(notificationService, Endpoints.Tab.LCU);
|
||||||
_documentService = documentService;
|
_documentService = documentService;
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ public partial class EndpointsViewModel : PageBase
|
|||||||
|
|
||||||
private readonly NotificationService _notificationService;
|
private readonly NotificationService _notificationService;
|
||||||
|
|
||||||
public EndpointsViewModel(DocumentService documentService, NotificationService notificationService) : base("Endpoints", "list-alt", -500)
|
public EndpointsViewModel(DocumentService documentService, NotificationService notificationService) : base("Endpoints", "fa-solid fa-rectangle-list", -500)
|
||||||
{
|
{
|
||||||
_documentService = documentService;
|
_documentService = documentService;
|
||||||
_notificationService = notificationService;
|
_notificationService = notificationService;
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ namespace Needlework.Net.ViewModels.Pages.Home;
|
|||||||
|
|
||||||
public partial class HomeViewModel : PageBase
|
public partial class HomeViewModel : PageBase
|
||||||
{
|
{
|
||||||
public HomeViewModel() : base("Home", "home", int.MinValue) { }
|
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")))
|
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"))
|
!.Where(library => library.Tags.Contains("lcu") || library.Tags.Contains("ingame"))
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ public partial class WebSocketViewModel : PageBase, IEnableLogger
|
|||||||
|
|
||||||
private readonly object _tokenLock = new();
|
private readonly object _tokenLock = new();
|
||||||
|
|
||||||
public WebSocketViewModel(IFlurlClientCache clients, NotificationService notificationService) : base("Event Viewer", "plug", -100)
|
public WebSocketViewModel(IFlurlClientCache clients, NotificationService notificationService) : base("Event Viewer", "fa-solid fa-plug", -100)
|
||||||
{
|
{
|
||||||
_githubUserContentClient = clients.Get("GithubUserContentClient");
|
_githubUserContentClient = clients.Get("GithubUserContentClient");
|
||||||
_notificationService = notificationService;
|
_notificationService = notificationService;
|
||||||
|
|||||||
Reference in New Issue
Block a user