diff --git a/src/Artemis.UI.Linux/App.axaml b/src/Artemis.UI.Linux/App.axaml index a63d617b9..d2109667a 100644 --- a/src/Artemis.UI.Linux/App.axaml +++ b/src/Artemis.UI.Linux/App.axaml @@ -18,7 +18,7 @@ - + diff --git a/src/Artemis.UI.MacOS/App.axaml b/src/Artemis.UI.MacOS/App.axaml index 6ef3efd97..5a000915e 100644 --- a/src/Artemis.UI.MacOS/App.axaml +++ b/src/Artemis.UI.MacOS/App.axaml @@ -18,7 +18,7 @@ - + diff --git a/src/Artemis.UI.Windows/App.axaml b/src/Artemis.UI.Windows/App.axaml index 836d6a11f..63ff0b8a1 100644 --- a/src/Artemis.UI.Windows/App.axaml +++ b/src/Artemis.UI.Windows/App.axaml @@ -18,7 +18,7 @@ - + diff --git a/src/Artemis.UI/Routing/Routes.cs b/src/Artemis.UI/Routing/Routes.cs index 7e04219ee..209c89dea 100644 --- a/src/Artemis.UI/Routing/Routes.cs +++ b/src/Artemis.UI/Routing/Routes.cs @@ -23,7 +23,6 @@ public static class Routes { new RouteRegistration("blank"), new RouteRegistration("home"), -#if DEBUG new RouteRegistration("workshop") { Children = new List @@ -35,8 +34,10 @@ public static class Routes { new RouteRegistration("profiles/{page:int}"), new RouteRegistration("profiles/details/{entryId:guid}"), +#if DEBUG new RouteRegistration("layouts/{page:int}"), new RouteRegistration("layouts/details/{entryId:guid}"), +#endif } }, new RouteRegistration("library") @@ -50,7 +51,6 @@ public static class Routes } } }, -#endif new RouteRegistration("surface-editor"), new RouteRegistration("settings") { diff --git a/src/Artemis.UI/Screens/Settings/SettingsView.axaml b/src/Artemis.UI/Screens/Settings/SettingsView.axaml index 0d50ad12b..47a6e7384 100644 --- a/src/Artemis.UI/Screens/Settings/SettingsView.axaml +++ b/src/Artemis.UI/Screens/Settings/SettingsView.axaml @@ -8,20 +8,25 @@ mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" x:Class="Artemis.UI.Screens.Settings.SettingsView" x:DataType="settings:SettingsViewModel"> - - - - - - - - - - - - - - - - + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Artemis.UI/Screens/Settings/SettingsView.axaml.cs b/src/Artemis.UI/Screens/Settings/SettingsView.axaml.cs index 75d3d5b12..6e04c8c28 100644 --- a/src/Artemis.UI/Screens/Settings/SettingsView.axaml.cs +++ b/src/Artemis.UI/Screens/Settings/SettingsView.axaml.cs @@ -3,8 +3,7 @@ using System.Reactive.Disposables; using Artemis.UI.Shared; using Avalonia.ReactiveUI; using Avalonia.Threading; -using FluentAvalonia.UI.Media.Animation; -using FluentAvalonia.UI.Navigation; +using FluentAvalonia.UI.Controls; using ReactiveUI; namespace Artemis.UI.Screens.Settings; @@ -19,6 +18,11 @@ public partial class SettingsView : ReactiveUserControl private void Navigate(ViewModelBase viewModel) { - Dispatcher.UIThread.Invoke(() => TabFrame.NavigateFromObject(viewModel, new FrameNavigationOptions {TransitionInfoOverride = new SlideNavigationTransitionInfo()})); + Dispatcher.UIThread.Invoke(() => TabFrame.NavigateFromObject(viewModel)); + } + + private void NavigationView_OnBackRequested(object? sender, NavigationViewBackRequestedEventArgs e) + { + ViewModel?.GoBack(); } } \ No newline at end of file diff --git a/src/Artemis.UI/Screens/Settings/SettingsViewModel.cs b/src/Artemis.UI/Screens/Settings/SettingsViewModel.cs index 26e8edcd2..3391aeab8 100644 --- a/src/Artemis.UI/Screens/Settings/SettingsViewModel.cs +++ b/src/Artemis.UI/Screens/Settings/SettingsViewModel.cs @@ -55,4 +55,9 @@ public class SettingsViewModel : RoutableHostScreen, IMainScreen if (SelectedTab == null) await _router.Navigate(SettingTabs.First().Path); } + + public void GoBack() + { + _router.Navigate("workshop"); + } } \ No newline at end of file diff --git a/src/Artemis.UI/Screens/Settings/Tabs/PluginsTabView.axaml b/src/Artemis.UI/Screens/Settings/Tabs/PluginsTabView.axaml index 5e1b9c246..b9f28f4a6 100644 --- a/src/Artemis.UI/Screens/Settings/Tabs/PluginsTabView.axaml +++ b/src/Artemis.UI/Screens/Settings/Tabs/PluginsTabView.axaml @@ -25,14 +25,19 @@ - - + + + + + + + - + - - - + + + \ 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 0210d557f..f49cc0ec3 100644 --- a/src/Artemis.UI/Screens/Sidebar/SidebarViewModel.cs +++ b/src/Artemis.UI/Screens/Sidebar/SidebarViewModel.cs @@ -38,14 +38,15 @@ public class SidebarViewModel : ActivatableViewModelBase SidebarScreen = new SidebarScreenViewModel(MaterialIconKind.Abacus, ROOT_SCREEN, "", null, new ObservableCollection() { new(MaterialIconKind.HomeOutline, "Home", "home"), - #if DEBUG new(MaterialIconKind.TestTube, "Workshop", "workshop", null, new ObservableCollection { new(MaterialIconKind.FolderVideo, "Profiles", "workshop/entries/profiles/1", "workshop/entries/profiles"), +#if DEBUG new(MaterialIconKind.KeyboardVariant, "Layouts", "workshop/entries/layouts/1", "workshop/entries/layouts"), +#endif new(MaterialIconKind.Bookshelf, "Library", "workshop/library"), }), - #endif + new(MaterialIconKind.Devices, "Surface Editor", "surface-editor"), new(MaterialIconKind.SettingsOutline, "Settings", "settings") }); @@ -120,7 +121,7 @@ public class SidebarViewModel : ActivatableViewModelBase { if (_updating) return; - + Dispatcher.UIThread.Invoke(async () => { try diff --git a/src/Artemis.UI/Screens/Workshop/Entries/EntriesViewModel.cs b/src/Artemis.UI/Screens/Workshop/Entries/EntriesViewModel.cs index 0d966ba89..4ebd77ecc 100644 --- a/src/Artemis.UI/Screens/Workshop/Entries/EntriesViewModel.cs +++ b/src/Artemis.UI/Screens/Workshop/Entries/EntriesViewModel.cs @@ -24,7 +24,9 @@ public class EntriesViewModel : RoutableHostScreen Tabs = new ObservableCollection { new("Profiles", "workshop/entries/profiles/1", "workshop/entries/profiles"), +#if DEBUG new("Layouts", "workshop/entries/layouts/1", "workshop/entries/layouts") +#endif }; this.WhenActivated(d => diff --git a/src/Artemis.UI/Screens/Workshop/Home/WorkshopHomeView.axaml b/src/Artemis.UI/Screens/Workshop/Home/WorkshopHomeView.axaml index 433f87c50..c97d51ee0 100644 --- a/src/Artemis.UI/Screens/Workshop/Home/WorkshopHomeView.axaml +++ b/src/Artemis.UI/Screens/Workshop/Home/WorkshopHomeView.axaml @@ -49,7 +49,7 @@ -