diff --git a/Directory.Packages.props b/Directory.Packages.props
index b72d740..f5cd323 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -2,13 +2,16 @@
true
true
+
+ 11.0.9
-
-
-
-
-
+
+
+
+
+
+
diff --git a/app/InkForge.Common/App.axaml b/app/InkForge.Common/App.axaml
index 0104aff..84f7844 100644
--- a/app/InkForge.Common/App.axaml
+++ b/app/InkForge.Common/App.axaml
@@ -6,5 +6,6 @@
+
\ No newline at end of file
diff --git a/app/InkForge.Common/InkForge.Common.csproj b/app/InkForge.Common/InkForge.Common.csproj
index 9847d58..2d0d625 100644
--- a/app/InkForge.Common/InkForge.Common.csproj
+++ b/app/InkForge.Common/InkForge.Common.csproj
@@ -8,6 +8,7 @@
+
diff --git a/app/InkForge.Common/Microsoft/Extensions/DependencyInjection/InkForgeServiceCollection.cs b/app/InkForge.Common/Microsoft/Extensions/DependencyInjection/InkForgeServiceCollection.cs
index 625ddd5..a30e906 100644
--- a/app/InkForge.Common/Microsoft/Extensions/DependencyInjection/InkForgeServiceCollection.cs
+++ b/app/InkForge.Common/Microsoft/Extensions/DependencyInjection/InkForgeServiceCollection.cs
@@ -2,11 +2,12 @@ using InkForge.Common.Controllers;
using InkForge.Common.Data;
using InkForge.Common.ViewModels;
using InkForge.Common.ViewModels.Landing;
-using InkForge.Common.Views;
using InkForge.Data;
using ReactiveUI;
+using Splat;
+
namespace Microsoft.Extensions.DependencyInjection;
public static class InkForgeServiceCollections
@@ -21,7 +22,7 @@ public static class InkForgeServiceCollections
services.AddSingleton();
services.AddSingleton();
- services.AddTransient, LandingView>();
+ Locator.CurrentMutable.RegisterViewsForViewModels(typeof(InkForgeServiceCollections).Assembly);
return services;
}
diff --git a/app/InkForge.Common/ViewModels/Landing/CreateWorkspaceViewModel.cs b/app/InkForge.Common/ViewModels/Landing/CreateWorkspaceViewModel.cs
index e3165cd..edc9254 100644
--- a/app/InkForge.Common/ViewModels/Landing/CreateWorkspaceViewModel.cs
+++ b/app/InkForge.Common/ViewModels/Landing/CreateWorkspaceViewModel.cs
@@ -1,3 +1,4 @@
+using InkForge.Common.Controllers;
using InkForge.Common.ReactiveUI;
using ReactiveUI;
@@ -8,7 +9,15 @@ public class CreateWorkspaceViewModel : LandingViewModelBase
{
public override string? UrlPathSegment => null;
- public CreateWorkspaceViewModel(LandingViewModel landing) : base(landing)
+ private string workspaceName;
+
+ public string WorkspaceName
+ {
+ get => workspaceName;
+ set => this.RaiseAndSetIfChanged(ref workspaceName, value);
+ }
+
+ public CreateWorkspaceViewModel(LandingViewModel landing, WorkspaceController workspace) : base(landing)
{
}
}
diff --git a/app/InkForge.Common/ViewModels/Landing/OpenRecentViewModel.cs b/app/InkForge.Common/ViewModels/Landing/OpenRecentViewModel.cs
index 39cc0bd..3d1464f 100644
--- a/app/InkForge.Common/ViewModels/Landing/OpenRecentViewModel.cs
+++ b/app/InkForge.Common/ViewModels/Landing/OpenRecentViewModel.cs
@@ -1,3 +1,5 @@
+using System.Collections.ObjectModel;
+
using InkForge.Common.ReactiveUI;
namespace InkForge.Common.ViewModels.Landing;
@@ -5,6 +7,9 @@ namespace InkForge.Common.ViewModels.Landing;
public class OpenRecentViewModel : LandingViewModelBase
{
public override string? UrlPathSegment => null;
+ private readonly ReadOnlyObservableCollection recentItems;
+
+ public ReadOnlyObservableCollection RecentItems => recentItems;
public OpenRecentViewModel(LandingViewModel landing) : base(landing)
{
diff --git a/app/InkForge.Common/ViewModels/Landing/RecentItemViewModel.cs b/app/InkForge.Common/ViewModels/Landing/RecentItemViewModel.cs
new file mode 100644
index 0000000..a15c938
--- /dev/null
+++ b/app/InkForge.Common/ViewModels/Landing/RecentItemViewModel.cs
@@ -0,0 +1,9 @@
+using ReactiveUI;
+
+namespace InkForge.Common.ViewModels.Landing;
+
+public record class RecentItemViewModel(
+ DateTimeOffset Created,
+ string Name,
+ DateTimeOffset LastUsed
+) : ReactiveRecord;
diff --git a/app/InkForge.Common/ViewModels/LandingViewModel.cs b/app/InkForge.Common/ViewModels/LandingViewModel.cs
index ca40237..7a1154c 100644
--- a/app/InkForge.Common/ViewModels/LandingViewModel.cs
+++ b/app/InkForge.Common/ViewModels/LandingViewModel.cs
@@ -17,8 +17,9 @@ public class LandingViewModel : ReactiveObject, IScreen
public LandingViewModel(LandingViewModelFactory factory)
{
_factory = factory;
-
+
Router.CurrentViewModel.Where(x => x is null)
+ .SelectMany(Observable.Return(factory.Create(this)))
.InvokeCommand(Router.NavigateAndReset);
}
diff --git a/app/InkForge.Common/Views/LandingView.axaml b/app/InkForge.Common/Views/LandingView.axaml
index cae67b1..1f0d60c 100644
--- a/app/InkForge.Common/Views/LandingView.axaml
+++ b/app/InkForge.Common/Views/LandingView.axaml
@@ -13,6 +13,7 @@
-
+
\ No newline at end of file
diff --git a/app/InkForge.Common/Views/LandingViews/OpenRecentView.axaml b/app/InkForge.Common/Views/LandingViews/OpenRecentView.axaml
index f4d7390..8a7cbf4 100644
--- a/app/InkForge.Common/Views/LandingViews/OpenRecentView.axaml
+++ b/app/InkForge.Common/Views/LandingViews/OpenRecentView.axaml
@@ -2,9 +2,28 @@
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:vm="using:InkForge.Common.ViewModels.Landing"
mc:Ignorable="d"
d:DesignWidth="800"
d:DesignHeight="450"
- x:Class="InkForge.Common.Views.LandingViews.OpenRecentView">
- Welcome to Avalonia!
+ x:Class="InkForge.Common.Views.LandingViews.OpenRecentView"
+ x:DataType="vm:OpenRecentViewModel">
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file