diff --git a/src/Artemis.UI.Shared/Routing/Routable/RoutableScreenOfTScreen.cs b/src/Artemis.UI.Shared/Routing/Routable/RoutableScreenOfTScreen.cs index 00c48b111..b4f60ca47 100644 --- a/src/Artemis.UI.Shared/Routing/Routable/RoutableScreenOfTScreen.cs +++ b/src/Artemis.UI.Shared/Routing/Routable/RoutableScreenOfTScreen.cs @@ -62,7 +62,15 @@ public abstract class RoutableScreen : ActivatableViewModelBase, IRouta void IRoutableScreen.InternalChangeScreen(object? screen) { - Screen = screen as TScreen; + if (screen == null) + { + Screen = null; + return; + } + + if (screen is not TScreen typedScreen) + throw new ArtemisRoutingException($"Screen cannot be hosted, {screen.GetType().Name} is not assignable to {typeof(TScreen).Name}."); + Screen = typedScreen; } async Task IRoutableScreen.InternalOnNavigating(NavigationArguments args, CancellationToken cancellationToken) diff --git a/src/Artemis.UI.Shared/Routing/Route/ParameterParsers/IntParameterParser.cs b/src/Artemis.UI.Shared/Routing/Route/ParameterParsers/IntParameterParser.cs new file mode 100644 index 000000000..38a3a9c46 --- /dev/null +++ b/src/Artemis.UI.Shared/Routing/Route/ParameterParsers/IntParameterParser.cs @@ -0,0 +1,17 @@ + +namespace Artemis.UI.Shared.Routing.ParameterParsers; + +internal class IntParameterParser : IRouteParameterParser +{ + /// + public bool IsMatch(RouteSegment segment, string source) + { + return int.TryParse(source, out _); + } + + /// + public object GetValue(RouteSegment segment, string source) + { + return int.Parse(source); + } +} \ No newline at end of file diff --git a/src/Artemis.UI.Shared/Routing/Route/RouteResolution.cs b/src/Artemis.UI.Shared/Routing/Route/RouteResolution.cs index 545d85fa6..32d285ccd 100644 --- a/src/Artemis.UI.Shared/Routing/Route/RouteResolution.cs +++ b/src/Artemis.UI.Shared/Routing/Route/RouteResolution.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Threading.Tasks; using DryIoc; namespace Artemis.UI.Shared.Routing; diff --git a/src/Artemis.UI.Shared/Routing/Route/RouteSegment.cs b/src/Artemis.UI.Shared/Routing/Route/RouteSegment.cs index 5668c6fb4..77025b389 100644 --- a/src/Artemis.UI.Shared/Routing/Route/RouteSegment.cs +++ b/src/Artemis.UI.Shared/Routing/Route/RouteSegment.cs @@ -48,11 +48,14 @@ public partial class RouteSegment private IRouteParameterParser GetParameterParser(string parameterType) { - if (parameterType == "guid") - return new GuidParameterParser(); + return parameterType switch + { + "guid" => new GuidParameterParser(), + "int" => new IntParameterParser(), + _ => new StringParameterParser() + }; // Default to a string parser which just returns the segment as is - return new StringParameterParser(); } [GeneratedRegex(@"\{(\w+):(\w+)\}")] diff --git a/src/Artemis.UI.Shared/Styles/Sidebar.axaml b/src/Artemis.UI.Shared/Styles/Sidebar.axaml index 95359910d..605ba8e40 100644 --- a/src/Artemis.UI.Shared/Styles/Sidebar.axaml +++ b/src/Artemis.UI.Shared/Styles/Sidebar.axaml @@ -13,9 +13,15 @@ - --> + + \ No newline at end of file diff --git a/src/Artemis.UI/Artemis.UI.csproj b/src/Artemis.UI/Artemis.UI.csproj index 0dd2f9d09..ecd1c4c9f 100644 --- a/src/Artemis.UI/Artemis.UI.csproj +++ b/src/Artemis.UI/Artemis.UI.csproj @@ -43,4 +43,16 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Artemis.UI/DryIoc/Factories/IVMFactory.cs b/src/Artemis.UI/DryIoc/Factories/IVMFactory.cs index e9c315f05..98fb7ea4e 100644 --- a/src/Artemis.UI/DryIoc/Factories/IVMFactory.cs +++ b/src/Artemis.UI/DryIoc/Factories/IVMFactory.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using System.Collections.ObjectModel; using System.Reactive; using Artemis.Core; @@ -30,6 +31,8 @@ using Artemis.UI.Shared; using Artemis.UI.Shared.Routing; using Artemis.WebClient.Updating; using DryIoc; +using DynamicData; +using Material.Icons; using ReactiveUI; namespace Artemis.UI.DryIoc.Factories; @@ -137,7 +140,7 @@ public class SidebarVmFactory : ISidebarVmFactory { _container = container; } - + public SidebarCategoryViewModel SidebarCategoryViewModel(ProfileCategory profileCategory) { return _container.Resolve(new object[] { profileCategory }); diff --git a/src/Artemis.UI/Routing/Routes.cs b/src/Artemis.UI/Routing/Routes.cs index af90f3b25..5aec9d1ec 100644 --- a/src/Artemis.UI/Routing/Routes.cs +++ b/src/Artemis.UI/Routing/Routes.cs @@ -5,6 +5,8 @@ using Artemis.UI.Screens.Settings; using Artemis.UI.Screens.Settings.Updating; using Artemis.UI.Screens.SurfaceEditor; using Artemis.UI.Screens.Workshop; +using Artemis.UI.Screens.Workshop.Layout; +using Artemis.UI.Screens.Workshop.Profile; using Artemis.UI.Shared.Routing; namespace Artemis.UI.Routing; @@ -14,8 +16,15 @@ public static class Routes public static List ArtemisRoutes = new() { new RouteRegistration("home"), + new RouteRegistration("workshop"), + new RouteRegistration("workshop/profiles/{page:int}"), + new RouteRegistration("workshop/profiles/{entryId:guid}"), + new RouteRegistration("workshop/layouts/{page:int}"), + new RouteRegistration("workshop/layouts/{entryId:guid}"), + new RouteRegistration("surface-editor"), + new RouteRegistration("settings") { Children = new List @@ -25,7 +34,7 @@ public static class Routes new RouteRegistration("devices"), new RouteRegistration("releases") { - Children = new List() + Children = new List { new RouteRegistration("{releaseId:guid}") } diff --git a/src/Artemis.UI/Screens/Sidebar/SidebarCategoryView.axaml b/src/Artemis.UI/Screens/Sidebar/SidebarCategoryView.axaml index 25f43bbf2..b71403e6c 100644 --- a/src/Artemis.UI/Screens/Sidebar/SidebarCategoryView.axaml +++ b/src/Artemis.UI/Screens/Sidebar/SidebarCategoryView.axaml @@ -99,7 +99,6 @@ + + + + + + + + @@ -41,51 +53,51 @@ - + - - + + - - + + - - + + - - + + - + \ No newline at end of file diff --git a/src/Artemis.UI/Screens/Sidebar/SidebarViewModel.cs b/src/Artemis.UI/Screens/Sidebar/SidebarViewModel.cs index 17c0e0590..3e666815b 100644 --- a/src/Artemis.UI/Screens/Sidebar/SidebarViewModel.cs +++ b/src/Artemis.UI/Screens/Sidebar/SidebarViewModel.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.Reactive; @@ -23,34 +24,38 @@ namespace Artemis.UI.Screens.Sidebar; public class SidebarViewModel : ActivatableViewModelBase { + public const string ROOT_SCREEN = "root"; + private readonly IRouter _router; private readonly IWindowService _windowService; - private SidebarScreenViewModel? _selectedSidebarScreen; private ReadOnlyObservableCollection _sidebarCategories = new(new ObservableCollection()); + private SidebarScreenViewModel? _selectedScreen; public SidebarViewModel(IRouter router, IProfileService profileService, IWindowService windowService, ISidebarVmFactory sidebarVmFactory) { _router = router; _windowService = windowService; - SidebarScreens = new ObservableCollection + SidebarScreen = new SidebarScreenViewModel(MaterialIconKind.Abacus, ROOT_SCREEN, "", null, new ObservableCollection() { - new(MaterialIconKind.Home, "Home", "home"), -#if DEBUG - new(MaterialIconKind.TestTube, "Workshop", "workshop"), -#endif + new(MaterialIconKind.HomeOutline, "Home", "home"), + new(MaterialIconKind.TestTube, "Workshop", "workshop", null, new ObservableCollection + { + new(MaterialIconKind.FolderVideo, "Profiles", "workshop/profiles/1", "workshop/profiles"), + new(MaterialIconKind.KeyboardVariant, "Layouts", "workshop/layouts/1", "workshop/layouts"), + }), new(MaterialIconKind.Devices, "Surface Editor", "surface-editor"), - new(MaterialIconKind.Cog, "Settings", "settings") - }; + new(MaterialIconKind.SettingsOutline, "Settings", "settings") + }); AddCategory = ReactiveCommand.CreateFromTask(ExecuteAddCategory); + this.WhenAnyValue(vm => vm.SelectedScreen).WhereNotNull().Subscribe(NavigateToScreen); + this.WhenAnyValue(vm => vm.SelectedScreen).WhereNotNull().Subscribe(s => SidebarScreen.ExpandIfRequired(s)); SourceList profileCategories = new(); - - this.WhenAnyValue(vm => vm.SelectedSidebarScreen).WhereNotNull().Subscribe(NavigateToScreen); this.WhenActivated(d => { - _router.CurrentPath.WhereNotNull().Subscribe(r => SelectedSidebarScreen = SidebarScreens.FirstOrDefault(s => s.Matches(r))).DisposeWith(d); + _router.CurrentPath.WhereNotNull().Subscribe(r => SelectedScreen = SidebarScreen.GetMatch(r)).DisposeWith(d); Observable.FromEventPattern(x => profileService.ProfileCategoryAdded += x, x => profileService.ProfileCategoryAdded -= x) .Subscribe(e => profileCategories.Add(e.EventArgs.ProfileCategory)) @@ -75,11 +80,17 @@ public class SidebarViewModel : ActivatableViewModelBase .DisposeWith(d); SidebarCategories = categoryViewModels; - SelectedSidebarScreen = SidebarScreens.First(); }); + SelectedScreen = SidebarScreen.Screens.First(); } - public ObservableCollection SidebarScreens { get; } + public SidebarScreenViewModel SidebarScreen { get; } + + public SidebarScreenViewModel? SelectedScreen + { + get => _selectedScreen; + set => RaiseAndSetIfChanged(ref _selectedScreen, value); + } public ReadOnlyObservableCollection SidebarCategories { @@ -87,12 +98,6 @@ public class SidebarViewModel : ActivatableViewModelBase set => RaiseAndSetIfChanged(ref _sidebarCategories, value); } - public SidebarScreenViewModel? SelectedSidebarScreen - { - get => _selectedSidebarScreen; - set => RaiseAndSetIfChanged(ref _selectedSidebarScreen, value); - } - public ReactiveCommand AddCategory { get; } private async Task ExecuteAddCategory() @@ -112,7 +117,7 @@ public class SidebarViewModel : ActivatableViewModelBase { try { - await _router.Navigate(sidebarScreenViewModel.Path, new RouterNavigationOptions {IgnoreOnPartialMatch = true}); + await _router.Navigate(sidebarScreenViewModel.Path); } catch (Exception e) { diff --git a/src/Artemis.UI/Screens/Workshop/Layout/LayoutDetailsView.axaml b/src/Artemis.UI/Screens/Workshop/Layout/LayoutDetailsView.axaml new file mode 100644 index 000000000..90e0f2b0f --- /dev/null +++ b/src/Artemis.UI/Screens/Workshop/Layout/LayoutDetailsView.axaml @@ -0,0 +1,21 @@ + + + + + Side panel + + + + Main panel + + + + + \ No newline at end of file diff --git a/src/Artemis.UI/Screens/Workshop/Layout/LayoutDetailsView.axaml.cs b/src/Artemis.UI/Screens/Workshop/Layout/LayoutDetailsView.axaml.cs new file mode 100644 index 000000000..3a529743e --- /dev/null +++ b/src/Artemis.UI/Screens/Workshop/Layout/LayoutDetailsView.axaml.cs @@ -0,0 +1,17 @@ +using Avalonia.Markup.Xaml; +using Avalonia.ReactiveUI; + +namespace Artemis.UI.Screens.Workshop.Layout; + +public partial class LayoutDetailsView : ReactiveUserControl +{ + public LayoutDetailsView() + { + InitializeComponent(); + } + + private void InitializeComponent() + { + AvaloniaXamlLoader.Load(this); + } +} \ No newline at end of file diff --git a/src/Artemis.UI/Screens/Workshop/Layout/LayoutDetailsViewModel.cs b/src/Artemis.UI/Screens/Workshop/Layout/LayoutDetailsViewModel.cs new file mode 100644 index 000000000..00e9d9d1d --- /dev/null +++ b/src/Artemis.UI/Screens/Workshop/Layout/LayoutDetailsViewModel.cs @@ -0,0 +1,8 @@ +using Artemis.UI.Shared; + +namespace Artemis.UI.Screens.Workshop.Layout; + +public class LayoutDetailsViewModel : ActivatableViewModelBase +{ + +} \ No newline at end of file diff --git a/src/Artemis.UI/Screens/Workshop/Layout/LayoutListView.axaml b/src/Artemis.UI/Screens/Workshop/Layout/LayoutListView.axaml new file mode 100644 index 000000000..ebbdfd31c --- /dev/null +++ b/src/Artemis.UI/Screens/Workshop/Layout/LayoutListView.axaml @@ -0,0 +1,22 @@ + + + + + Side panel + + + + + + + + + + \ No newline at end of file diff --git a/src/Artemis.UI/Screens/Workshop/Layout/LayoutListView.axaml.cs b/src/Artemis.UI/Screens/Workshop/Layout/LayoutListView.axaml.cs new file mode 100644 index 000000000..9d604f4f6 --- /dev/null +++ b/src/Artemis.UI/Screens/Workshop/Layout/LayoutListView.axaml.cs @@ -0,0 +1,17 @@ +using Avalonia.Markup.Xaml; +using Avalonia.ReactiveUI; + +namespace Artemis.UI.Screens.Workshop.Layout; + +public partial class LayoutListView : ReactiveUserControl +{ + public LayoutListView() + { + InitializeComponent(); + } + + private void InitializeComponent() + { + AvaloniaXamlLoader.Load(this); + } +} \ No newline at end of file diff --git a/src/Artemis.UI/Screens/Workshop/Layout/LayoutListViewModel.cs b/src/Artemis.UI/Screens/Workshop/Layout/LayoutListViewModel.cs new file mode 100644 index 000000000..54134176f --- /dev/null +++ b/src/Artemis.UI/Screens/Workshop/Layout/LayoutListViewModel.cs @@ -0,0 +1,26 @@ +using System; +using System.Threading; +using System.Threading.Tasks; +using Artemis.UI.Shared; +using Artemis.UI.Shared.Routing; + +namespace Artemis.UI.Screens.Workshop.Layout; + +public class LayoutListViewModel : RoutableScreen, IMainScreenViewModel +{ + private int _page; + + public int Page + { + get => _page; + set => RaiseAndSetIfChanged(ref _page, value); + } + + public override Task OnNavigating(WorkshopListParameters parameters, NavigationArguments args, CancellationToken cancellationToken) + { + Page = Math.Max(1, parameters.Page); + return Task.CompletedTask; + } + + public ViewModelBase? TitleBarViewModel => null; +} \ No newline at end of file diff --git a/src/Artemis.UI/Screens/Workshop/Profile/ProfileDetailsView.axaml b/src/Artemis.UI/Screens/Workshop/Profile/ProfileDetailsView.axaml new file mode 100644 index 000000000..6b9f1f2df --- /dev/null +++ b/src/Artemis.UI/Screens/Workshop/Profile/ProfileDetailsView.axaml @@ -0,0 +1,8 @@ + + Welcome to Avalonia! + diff --git a/src/Artemis.UI/Screens/Workshop/Profile/ProfileDetailsView.axaml.cs b/src/Artemis.UI/Screens/Workshop/Profile/ProfileDetailsView.axaml.cs new file mode 100644 index 000000000..25ca88e9f --- /dev/null +++ b/src/Artemis.UI/Screens/Workshop/Profile/ProfileDetailsView.axaml.cs @@ -0,0 +1,17 @@ +using Avalonia.Markup.Xaml; +using Avalonia.ReactiveUI; + +namespace Artemis.UI.Screens.Workshop.Profile; + +public partial class ProfileDetailsView : ReactiveUserControl +{ + public ProfileDetailsView() + { + InitializeComponent(); + } + + private void InitializeComponent() + { + AvaloniaXamlLoader.Load(this); + } +} \ No newline at end of file diff --git a/src/Artemis.UI/Screens/Workshop/Profile/ProfileDetailsViewModel.cs b/src/Artemis.UI/Screens/Workshop/Profile/ProfileDetailsViewModel.cs new file mode 100644 index 000000000..e32bb2dab --- /dev/null +++ b/src/Artemis.UI/Screens/Workshop/Profile/ProfileDetailsViewModel.cs @@ -0,0 +1,8 @@ +using Artemis.UI.Shared; + +namespace Artemis.UI.Screens.Workshop.Profile; + +public class ProfileDetailsViewModel : ActivatableViewModelBase +{ + +} \ No newline at end of file diff --git a/src/Artemis.UI/Screens/Workshop/Profile/ProfileListView.axaml b/src/Artemis.UI/Screens/Workshop/Profile/ProfileListView.axaml new file mode 100644 index 000000000..d103a3288 --- /dev/null +++ b/src/Artemis.UI/Screens/Workshop/Profile/ProfileListView.axaml @@ -0,0 +1,22 @@ + + + + + Side panel + + + + + + + + + + \ No newline at end of file diff --git a/src/Artemis.UI/Screens/Workshop/Profile/ProfileListView.axaml.cs b/src/Artemis.UI/Screens/Workshop/Profile/ProfileListView.axaml.cs new file mode 100644 index 000000000..fb6c372c7 --- /dev/null +++ b/src/Artemis.UI/Screens/Workshop/Profile/ProfileListView.axaml.cs @@ -0,0 +1,17 @@ +using Avalonia.Markup.Xaml; +using Avalonia.ReactiveUI; + +namespace Artemis.UI.Screens.Workshop.Profile; + +public partial class ProfileListView : ReactiveUserControl +{ + public ProfileListView() + { + InitializeComponent(); + } + + private void InitializeComponent() + { + AvaloniaXamlLoader.Load(this); + } +} \ No newline at end of file diff --git a/src/Artemis.UI/Screens/Workshop/Profile/ProfileListViewModel.cs b/src/Artemis.UI/Screens/Workshop/Profile/ProfileListViewModel.cs new file mode 100644 index 000000000..8ece60ec1 --- /dev/null +++ b/src/Artemis.UI/Screens/Workshop/Profile/ProfileListViewModel.cs @@ -0,0 +1,26 @@ +using System; +using System.Threading; +using System.Threading.Tasks; +using Artemis.UI.Shared; +using Artemis.UI.Shared.Routing; + +namespace Artemis.UI.Screens.Workshop.Profile; + +public class ProfileListViewModel : RoutableScreen, IMainScreenViewModel +{ + private int _page; + + public int Page + { + get => _page; + set => RaiseAndSetIfChanged(ref _page, value); + } + + public override Task OnNavigating(WorkshopListParameters parameters, NavigationArguments args, CancellationToken cancellationToken) + { + Page = Math.Max(1, parameters.Page); + return Task.CompletedTask; + } + + public ViewModelBase? TitleBarViewModel => null; +} \ No newline at end of file diff --git a/src/Artemis.UI/Screens/Workshop/WorkshopListParameters.cs b/src/Artemis.UI/Screens/Workshop/WorkshopListParameters.cs new file mode 100644 index 000000000..1e223659b --- /dev/null +++ b/src/Artemis.UI/Screens/Workshop/WorkshopListParameters.cs @@ -0,0 +1,6 @@ +namespace Artemis.UI.Screens.Workshop; + +public class WorkshopListParameters +{ + public int Page { get; set; } +} \ No newline at end of file diff --git a/src/Artemis.UI/Screens/Workshop/WorkshopView.axaml b/src/Artemis.UI/Screens/Workshop/WorkshopView.axaml index e303305de..cb672cb99 100644 --- a/src/Artemis.UI/Screens/Workshop/WorkshopView.axaml +++ b/src/Artemis.UI/Screens/Workshop/WorkshopView.axaml @@ -2,35 +2,13 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" - xmlns:builders="clr-namespace:Artemis.UI.Shared.Services.Builders;assembly=Artemis.UI.Shared" - xmlns:controls1="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia" - xmlns:attachedProperties="clr-namespace:Artemis.UI.Shared.AttachedProperties;assembly=Artemis.UI.Shared" xmlns:workshop="clr-namespace:Artemis.UI.Screens.Workshop" - xmlns:shared="clr-namespace:Artemis.UI.Shared;assembly=Artemis.UI.Shared" - xmlns:controls="clr-namespace:Artemis.UI.Shared.Controls;assembly=Artemis.UI.Shared" - xmlns:gradientPicker="clr-namespace:Artemis.UI.Shared.Controls.GradientPicker;assembly=Artemis.UI.Shared" - xmlns:materialIconPicker="clr-namespace:Artemis.UI.Shared.MaterialIconPicker;assembly=Artemis.UI.Shared" - xmlns:workshop1="clr-namespace:Artemis.WebClient.Workshop;assembly=Artemis.WebClient.Workshop" + xmlns:controls="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia" + xmlns:ui="clr-namespace:Artemis.UI" mc:Ignorable="d" d:DesignWidth="800" x:Class="Artemis.UI.Screens.Workshop.WorkshopView" x:DataType="workshop:WorkshopViewModel"> - - - - - - - - - - - - - - - - - + Workshop overview \ No newline at end of file diff --git a/src/Artemis.UI/Screens/Workshop/WorkshopView.axaml.cs b/src/Artemis.UI/Screens/Workshop/WorkshopView.axaml.cs index c875bd294..76fcc9e13 100644 --- a/src/Artemis.UI/Screens/Workshop/WorkshopView.axaml.cs +++ b/src/Artemis.UI/Screens/Workshop/WorkshopView.axaml.cs @@ -1,4 +1,3 @@ -using Avalonia.Markup.Xaml; using Avalonia.ReactiveUI; namespace Artemis.UI.Screens.Workshop; @@ -9,5 +8,4 @@ public partial class WorkshopView : ReactiveUserControl { InitializeComponent(); } - } \ No newline at end of file diff --git a/src/Artemis.UI/Screens/Workshop/WorkshopViewModel.cs b/src/Artemis.UI/Screens/Workshop/WorkshopViewModel.cs index 951b7c8e0..86d0c6bdc 100644 --- a/src/Artemis.UI/Screens/Workshop/WorkshopViewModel.cs +++ b/src/Artemis.UI/Screens/Workshop/WorkshopViewModel.cs @@ -1,55 +1,13 @@ -using System; -using System.Collections.ObjectModel; -using System.Reactive; -using System.Reactive.Linq; -using System.Threading.Tasks; -using Artemis.Core; -using Artemis.UI.Screens.Workshop.CurrentUser; -using Artemis.UI.Shared.Services; -using Artemis.UI.Shared.Services.Builders; -using Artemis.WebClient.Workshop; -using Avalonia.Input; -using ReactiveUI; -using SkiaSharp; -using StrawberryShake; +using Artemis.UI.Shared; +using Artemis.UI.Shared.Routing; namespace Artemis.UI.Screens.Workshop; -public class WorkshopViewModel : ActivatableViewModelBase, IMainScreenViewModel +public class WorkshopViewModel : RoutableScreen, IMainScreenViewModel { - private readonly IWorkshopClient _workshopClient; - - public WorkshopViewModel(IScreen hostScreen, IWorkshopClient workshopClient, CurrentUserViewModel currentUserViewModel) : base(hostScreen, "workshop") + public WorkshopViewModel() { - CurrentUserViewModel = currentUserViewModel; - _workshopClient = workshopClient; - DisplayName = "Workshop"; - - Task.Run(() => GetEntries()); } - public ObservableCollection Test { get; set; } = new(); - public CurrentUserViewModel CurrentUserViewModel { get; set; } - - private async Task GetEntries() - { - - try - { - IOperationResult entries = await _workshopClient.GetEntries.ExecuteAsync(); - if (entries.Data?.Entries?.Nodes == null) - return; - - foreach (IGetEntries_Entries_Nodes getEntriesEntriesNodes in entries.Data.Entries.Nodes) - { - Console.WriteLine(getEntriesEntriesNodes); - Test.Add(getEntriesEntriesNodes); - } - } - catch (Exception e) - { - Console.WriteLine(e); - throw; - } - } + public ViewModelBase? TitleBarViewModel => null; } \ No newline at end of file diff --git a/src/Artemis.UI/Styles/Artemis.axaml b/src/Artemis.UI/Styles/Artemis.axaml index 242bef032..a121ec71b 100644 --- a/src/Artemis.UI/Styles/Artemis.axaml +++ b/src/Artemis.UI/Styles/Artemis.axaml @@ -8,4 +8,12 @@ + + + + + + + + \ No newline at end of file diff --git a/src/Artemis.UI/Styles/TreeView.axaml b/src/Artemis.UI/Styles/TreeView.axaml new file mode 100644 index 000000000..754755713 --- /dev/null +++ b/src/Artemis.UI/Styles/TreeView.axaml @@ -0,0 +1,122 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 31 + 12 + 12, 0, 12, 0 + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file