From b06406e20f3f79b71a9190f7a12285e55a454ffe Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Sun, 16 Nov 2025 23:09:47 +0000 Subject: [PATCH] Add users management page. --- Directory.Packages.props | 15 +- Marechai.App/App.xaml | 1 + Marechai.App/App.xaml.cs | 7 +- Marechai.App/Marechai.App.csproj | 25 +- .../Presentation/Components/Sidebar.xaml | 13 + .../Presentation/ViewModels/MainViewModel.cs | 36 +- .../Presentation/ViewModels/UsersViewModel.cs | 440 ++++++++++++++++++ .../Presentation/Views/UsersPage.xaml | 184 ++++++++ .../Presentation/Views/UsersPage.xaml.cs | 394 ++++++++++++++++ .../Services/Authentication/JwtService.cs | 112 +++++ 10 files changed, 1208 insertions(+), 19 deletions(-) create mode 100644 Marechai.App/Presentation/ViewModels/UsersViewModel.cs create mode 100644 Marechai.App/Presentation/Views/UsersPage.xaml create mode 100644 Marechai.App/Presentation/Views/UsersPage.xaml.cs create mode 100644 Marechai.App/Services/Authentication/JwtService.cs diff --git a/Directory.Packages.props b/Directory.Packages.props index e7548dd6..e7c754d2 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -33,15 +33,16 @@ + - - - - - - - + + + + + + + \ No newline at end of file diff --git a/Marechai.App/App.xaml b/Marechai.App/App.xaml index f7b0ef4a..1e4ba6b5 100644 --- a/Marechai.App/App.xaml +++ b/Marechai.App/App.xaml @@ -21,6 +21,7 @@ + diff --git a/Marechai.App/App.xaml.cs b/Marechai.App/App.xaml.cs index d026f431..8d52d6b5 100644 --- a/Marechai.App/App.xaml.cs +++ b/Marechai.App/App.xaml.cs @@ -129,6 +129,7 @@ public partial class App : Application AuthService>(); services.AddSingleton(); + services.AddSingleton(); services.AddSingleton(); services.AddSingleton(); services.AddSingleton(); @@ -200,6 +201,7 @@ public partial class App : Application new ViewMap(), new ViewMap(), new ViewMap(), + new ViewMap(), new DataViewMap()); routes.Register(new RouteMap("", @@ -247,7 +249,8 @@ public partial class App : Application ]), new RouteMap("gpus", views.FindByViewModel(), - Nested: + Nested + : [ new RouteMap("gpu-details", views.FindByViewModel< @@ -275,6 +278,8 @@ public partial class App : Application ]), new RouteMap("settings", views.FindByViewModel()), + new RouteMap("users", + views.FindByViewModel()), new RouteMap("Second", views.FindByViewModel()) ]) diff --git a/Marechai.App/Marechai.App.csproj b/Marechai.App/Marechai.App.csproj index 5788ea25..3e292529 100644 --- a/Marechai.App/Marechai.App.csproj +++ b/Marechai.App/Marechai.App.csproj @@ -41,10 +41,11 @@ - + - + + @@ -79,16 +80,20 @@ Sidebar.xaml true + + UsersPage.xaml + true + - - - - - - - - + + + + + + + + diff --git a/Marechai.App/Presentation/Components/Sidebar.xaml b/Marechai.App/Presentation/Components/Sidebar.xaml index b5da531a..9aece7d3 100644 --- a/Marechai.App/Presentation/Components/Sidebar.xaml +++ b/Marechai.App/Presentation/Components/Sidebar.xaml @@ -231,6 +231,19 @@ Visibility="{Binding IsSidebarOpen}"> + +