diff --git a/LANCommander/Components/ActionEditor.razor b/LANCommander/Components/ActionEditor.razor
new file mode 100644
index 0000000..f7b292a
--- /dev/null
+++ b/LANCommander/Components/ActionEditor.razor
@@ -0,0 +1,77 @@
+@using LANCommander.Data.Models
+
+@{
+ int i = 0;
+}
+
+
+@code {
+ [Parameter] public ICollection Actions { get; set; }
+
+ private void AddAction()
+ {
+ if (Actions == null)
+ Actions = new List();
+
+ Actions.Add(new Data.Models.Action()
+ {
+ PrimaryAction = Actions.Count == 0
+ });
+ }
+
+ private void RemoveAction(int index)
+ {
+ Actions.Remove(Actions.ElementAt(index));
+ }
+}
diff --git a/LANCommander/Components/MultiplayerModeEditor.razor b/LANCommander/Components/MultiplayerModeEditor.razor
new file mode 100644
index 0000000..c7f11a4
--- /dev/null
+++ b/LANCommander/Components/MultiplayerModeEditor.razor
@@ -0,0 +1,78 @@
+@using LANCommander.Data.Enums
+@using LANCommander.Data.Models
+
+@{
+ int i = 0;
+}
+
+
+@code {
+ [Parameter] public ICollection MultiplayerModes { get; set; }
+
+ private void AddMode()
+ {
+ if (MultiplayerModes == null)
+ MultiplayerModes = new List();
+
+ MultiplayerModes.Add(new MultiplayerMode());
+ }
+
+ private void RemoveMode(int index)
+ {
+ MultiplayerModes.Remove(MultiplayerModes.ElementAt(index));
+ }
+}
diff --git a/LANCommander/Components/_Imports.razor b/LANCommander/Components/_Imports.razor
new file mode 100644
index 0000000..bdfbec1
--- /dev/null
+++ b/LANCommander/Components/_Imports.razor
@@ -0,0 +1,7 @@
+@using System.Net.Http
+@using Microsoft.AspNetCore.Authorization
+@using Microsoft.AspNetCore.Components.Authorization
+@using Microsoft.AspNetCore.Components.Forms
+@using Microsoft.AspNetCore.Components.Routing
+@using Microsoft.AspNetCore.Components.Web
+@using Microsoft.JSInterop
\ No newline at end of file
diff --git a/LANCommander/Program.cs b/LANCommander/Program.cs
index a3f3d96..450b7dc 100644
--- a/LANCommander/Program.cs
+++ b/LANCommander/Program.cs
@@ -56,7 +56,9 @@ builder.Services.AddAuthentication(options =>
builder.Services.AddControllersWithViews().AddJsonOptions(x =>
{
x.JsonSerializerOptions.ReferenceHandler = System.Text.Json.Serialization.ReferenceHandler.IgnoreCycles;
+ x.JsonSerializerOptions.MaxDepth = 3;
});
+builder.Services.AddServerSideBlazor();
builder.Services.AddScoped();
builder.Services.AddScoped();
@@ -92,9 +94,14 @@ app.UseAuthorization();
app.MapControllers();
-app.MapControllerRoute(
- name: "default",
- pattern: "{controller=Home}/{action=Index}/{id?}");
+app.UseEndpoints(endpoints =>
+{
+ endpoints.MapControllerRoute(
+ name: "default",
+ pattern: "{controller=Home}/{action=Index}/{id?}");
+ endpoints.MapBlazorHub();
+});
+
app.MapRazorPages();
if (!Directory.Exists("Upload"))
diff --git a/LANCommander/Views/Games/Edit.cshtml b/LANCommander/Views/Games/Edit.cshtml
index 22c5653..31e71fc 100644
--- a/LANCommander/Views/Games/Edit.cshtml
+++ b/LANCommander/Views/Games/Edit.cshtml
@@ -1,4 +1,5 @@
-@using LANCommander.Data.Models
+@using LANCommander.Components
+@using LANCommander.Data.Models
@model LANCommander.Models.GameViewModel
@{
@@ -79,6 +80,18 @@
+
+
+
+
+
+
+
+