mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 20:06:33 +00:00
Workshop - Added installed entries and update profiles when reinstalling them
This commit is contained in:
1 parent
fcde1d4ecc
commit
c69be2836e
17 files changed
+327
-58
No files matched your search
@@ -5,6 +5,7 @@
|
||||
xmlns:search="clr-namespace:Artemis.UI.Screens.Workshop.Search"
|
||||
xmlns:workshop="clr-namespace:Artemis.WebClient.Workshop;assembly=Artemis.WebClient.Workshop"
|
||||
xmlns:windowing="clr-namespace:FluentAvalonia.UI.Windowing;assembly=FluentAvalonia"
|
||||
xmlns:avalonia="clr-namespace:Material.Icons.Avalonia;assembly=Material.Icons.Avalonia"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="Artemis.UI.Screens.Workshop.Search.SearchView"
|
||||
x:DataType="search:SearchViewModel">
|
||||
@@ -30,12 +31,16 @@
|
||||
<ContentControl HorizontalAlignment="Right"
|
||||
Width="28"
|
||||
Height="28"
|
||||
Margin="0 0 50 0"
|
||||
Margin="0 0 75 0"
|
||||
Content="{CompiledBinding CurrentUserViewModel}"
|
||||
windowing:AppWindow.AllowInteractionInTitleBar="True" />
|
||||
|
||||
<Border VerticalAlignment="Top" CornerRadius="4 4 0 0" ClipToBounds="True" MaxWidth="500">
|
||||
<ProgressBar IsIndeterminate="True" VerticalAlignment="Top" IsVisible="{CompiledBinding IsLoading}"></ProgressBar>
|
||||
</Border>
|
||||
|
||||
<Button Classes="title-bar-button" Command="{CompiledBinding ShowDebugger}" Margin="0 -5 0 0" VerticalAlignment="Top" HorizontalAlignment="Right" windowing:AppWindow.AllowInteractionInTitleBar="True" >
|
||||
<avalonia:MaterialIcon Kind="Bug"></avalonia:MaterialIcon>
|
||||
</Button>
|
||||
</Panel>
|
||||
</UserControl>
|
||||
@@ -4,6 +4,7 @@ using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Artemis.UI.Screens.Workshop.CurrentUser;
|
||||
using Artemis.UI.Services.Interfaces;
|
||||
using Artemis.UI.Shared;
|
||||
using Artemis.UI.Shared.Routing;
|
||||
using Artemis.WebClient.Workshop;
|
||||
@@ -18,15 +19,17 @@ public class SearchViewModel : ViewModelBase
|
||||
{
|
||||
private readonly ILogger _logger;
|
||||
private readonly IRouter _router;
|
||||
private readonly IDebugService _debugService;
|
||||
private readonly IWorkshopClient _workshopClient;
|
||||
private bool _isLoading;
|
||||
private SearchResultViewModel? _selectedEntry;
|
||||
|
||||
public SearchViewModel(ILogger logger, IWorkshopClient workshopClient, IRouter router, CurrentUserViewModel currentUserViewModel)
|
||||
public SearchViewModel(ILogger logger, IWorkshopClient workshopClient, IRouter router, CurrentUserViewModel currentUserViewModel, IDebugService debugService)
|
||||
{
|
||||
_logger = logger;
|
||||
_workshopClient = workshopClient;
|
||||
_router = router;
|
||||
_debugService = debugService;
|
||||
CurrentUserViewModel = currentUserViewModel;
|
||||
SearchAsync = ExecuteSearchAsync;
|
||||
|
||||
@@ -49,6 +52,11 @@ public class SearchViewModel : ViewModelBase
|
||||
set => RaiseAndSetIfChanged(ref _isLoading, value);
|
||||
}
|
||||
|
||||
public void ShowDebugger()
|
||||
{
|
||||
_debugService.ShowDebugger();
|
||||
}
|
||||
|
||||
private void NavigateToEntry(SearchResultViewModel searchResult)
|
||||
{
|
||||
string? url = null;
|
||||
|
||||
Reference in new issue
Block a user