-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2287 from Nexus-Mods/loadorder-v2
Rename and reorganize Load Order views for UI work
- Loading branch information
Showing
21 changed files
with
151 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
src/NexusMods.App.UI/Pages/Sorting/ILoadOrdersWIPPageViewModel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
using NexusMods.App.UI.WorkspaceSystem; | ||
|
||
namespace NexusMods.App.UI.Pages.Sorting; | ||
|
||
/// <summary> | ||
/// Temporary page for hosting the WIP Load Order views | ||
/// </summary> | ||
public interface ILoadOrdersWIPPageViewModel : IPageViewModelInterface | ||
{ | ||
public ISortingSelectionViewModel SortingSelectionViewModel { get; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../Sorting/Prototype/ILoadOrderViewModel.cs → .../Sorting/LoadOrder/ILoadOrderViewModel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 0 additions & 15 deletions
15
src/NexusMods.App.UI/Pages/Sorting/LoadOrdersPageDesignViewModel.cs
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
src/NexusMods.App.UI/Pages/Sorting/LoadOrdersPageView.axaml.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
src/NexusMods.App.UI/Pages/Sorting/LoadOrdersWIPPageView.axaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<reactiveUi:ReactiveUserControl x:TypeArguments="loadOrder:ILoadOrdersWIPPageViewModel" xmlns="https://github.com/avaloniaui" | ||
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:reactiveUi="http://reactiveui.net" | ||
xmlns:loadOrder="clr-namespace:NexusMods.App.UI.Pages.Sorting" | ||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" | ||
x:Class="NexusMods.App.UI.Pages.Sorting.LoadOrdersWIPPageView"> | ||
|
||
<loadOrder:SortingSelectionView x:Name="SortingSelectionView"/> | ||
</reactiveUi:ReactiveUserControl> |
23 changes: 23 additions & 0 deletions
23
src/NexusMods.App.UI/Pages/Sorting/LoadOrdersWIPPageView.axaml.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using System.Reactive.Disposables; | ||
using Avalonia.ReactiveUI; | ||
using ReactiveUI; | ||
|
||
namespace NexusMods.App.UI.Pages.Sorting; | ||
|
||
public partial class LoadOrdersWIPPageView : ReactiveUserControl<ILoadOrdersWIPPageViewModel> | ||
{ | ||
public LoadOrdersWIPPageView() | ||
{ | ||
InitializeComponent(); | ||
|
||
this.WhenActivated(d => | ||
{ | ||
this.OneWayBind(ViewModel, | ||
vm => vm.SortingSelectionViewModel, | ||
v => v.SortingSelectionView.ViewModel | ||
) | ||
.DisposeWith(d); | ||
} | ||
); | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
src/NexusMods.App.UI/Pages/Sorting/LoadOrdersWipPageViewModel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using NexusMods.Abstractions.Loadouts; | ||
using NexusMods.App.UI.Windows; | ||
using NexusMods.App.UI.WorkspaceSystem; | ||
|
||
namespace NexusMods.App.UI.Pages.Sorting; | ||
|
||
public class LoadOrdersWipPageViewModel : APageViewModel<ILoadOrdersWIPPageViewModel>, ILoadOrdersWIPPageViewModel | ||
{ | ||
private readonly LoadoutId _loadoutId; | ||
|
||
public ISortingSelectionViewModel SortingSelectionViewModel { get; } | ||
|
||
|
||
public LoadOrdersWipPageViewModel(IWindowManager windowManager, IServiceProvider serviceProvider, LoadoutId loadutId) : base(windowManager) | ||
{ | ||
_loadoutId = loadutId; | ||
|
||
SortingSelectionViewModel = new SortingSelectionViewModel(serviceProvider, _loadoutId); | ||
|
||
TabTitle = "Load Orders (WIP)"; | ||
} | ||
|
||
} |
5 changes: 2 additions & 3 deletions
5
...Pages/Sorting/ILoadOrdersPageViewModel.cs → ...ngSelection/ISortingSelectionViewModel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
using System.Collections.ObjectModel; | ||
using NexusMods.App.UI.Pages.Sorting.Prototype; | ||
using NexusMods.App.UI.WorkspaceSystem; | ||
using NexusMods.Abstractions.UI; | ||
|
||
namespace NexusMods.App.UI.Pages.Sorting; | ||
|
||
public interface ILoadOrdersPageViewModel : IPageViewModelInterface | ||
public interface ISortingSelectionViewModel : IViewModelInterface | ||
{ | ||
public ReadOnlyObservableCollection<ILoadOrderViewModel> LoadOrderViewModels { get; } | ||
} |
15 changes: 7 additions & 8 deletions
15
...UI/Pages/Sorting/LoadOrdersPageView.axaml → ...rtingSelection/SortingSelectionView.axaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,24 @@ | ||
<reactiveUi:ReactiveUserControl x:TypeArguments="loadOrder:ILoadOrdersPageViewModel" xmlns="https://github.com/avaloniaui" | ||
<reactiveUi:ReactiveUserControl x:TypeArguments="sorting:ISortingSelectionViewModel" xmlns="https://github.com/avaloniaui" | ||
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:reactiveUi="http://reactiveui.net" | ||
xmlns:loadOrder="clr-namespace:NexusMods.App.UI.Pages.Sorting" | ||
xmlns:prototype="clr-namespace:NexusMods.App.UI.Pages.Sorting.Prototype" | ||
xmlns:sorting="clr-namespace:NexusMods.App.UI.Pages.Sorting" | ||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" | ||
x:Class="NexusMods.App.UI.Pages.Sorting.LoadOrdersPageView"> | ||
|
||
x:Class="NexusMods.App.UI.Pages.Sorting.SortingSelectionView"> | ||
<TabControl x:Name="SortOrdersTabControl"> | ||
<TabControl.ItemTemplate> | ||
<DataTemplate DataType="prototype:ILoadOrderViewModel"> | ||
<DataTemplate DataType="sorting:ILoadOrderViewModel"> | ||
<TextBlock Text="{CompiledBinding SortOrderName}" /> | ||
</DataTemplate> | ||
</TabControl.ItemTemplate> | ||
|
||
<TabControl.ContentTemplate> | ||
<DataTemplate DataType="prototype:ILoadOrderViewModel"> | ||
<prototype:LoadOrderView ViewModel="{CompiledBinding}" /> | ||
<DataTemplate DataType="sorting:ILoadOrderViewModel"> | ||
<sorting:LoadOrderView ViewModel="{CompiledBinding}" /> | ||
</DataTemplate> | ||
</TabControl.ContentTemplate> | ||
|
||
</TabControl> | ||
</reactiveUi:ReactiveUserControl> | ||
|
26 changes: 26 additions & 0 deletions
26
src/NexusMods.App.UI/Pages/Sorting/SortingSelection/SortingSelectionView.axaml.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using System.Reactive.Disposables; | ||
using Avalonia.ReactiveUI; | ||
using ReactiveUI; | ||
|
||
namespace NexusMods.App.UI.Pages.Sorting; | ||
|
||
public partial class SortingSelectionView : ReactiveUserControl<ISortingSelectionViewModel> | ||
{ | ||
public SortingSelectionView() | ||
{ | ||
InitializeComponent(); | ||
|
||
this.WhenActivated(disposables => | ||
{ | ||
this.OneWayBind(ViewModel, | ||
vm => vm.LoadOrderViewModels, | ||
v => v.SortOrdersTabControl.ItemsSource | ||
) | ||
.DisposeWith(disposables); | ||
} | ||
); | ||
|
||
|
||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.