From 7ca1aa672288e25954a897ddb5caac0933bafa40 Mon Sep 17 00:00:00 2001 From: John Fernandez Date: Mon, 24 Feb 2025 23:27:17 -0500 Subject: [PATCH 1/5] Fixup the Versions Tab --- Knossos.NET/Views/DeveloperModsView.axaml | 11 +++++---- .../Views/Templates/DevModEditorView.axaml | 6 ++--- .../Views/Templates/DevModVersionsView.axaml | 24 +++++++++---------- 3 files changed, 21 insertions(+), 20 deletions(-) diff --git a/Knossos.NET/Views/DeveloperModsView.axaml b/Knossos.NET/Views/DeveloperModsView.axaml index dc1246d8..a1c3ee4e 100644 --- a/Knossos.NET/Views/DeveloperModsView.axaml +++ b/Knossos.NET/Views/DeveloperModsView.axaml @@ -15,7 +15,7 @@ - + @@ -35,14 +35,15 @@ - - + + - - + + + diff --git a/Knossos.NET/Views/Templates/DevModEditorView.axaml b/Knossos.NET/Views/Templates/DevModEditorView.axaml index 75cb7613..2c91bb4a 100644 --- a/Knossos.NET/Views/Templates/DevModEditorView.axaml +++ b/Knossos.NET/Views/Templates/DevModEditorView.axaml @@ -13,10 +13,10 @@ - + - - + + diff --git a/Knossos.NET/Views/Templates/DevModVersionsView.axaml b/Knossos.NET/Views/Templates/DevModVersionsView.axaml index b52a072c..fc80ceab 100644 --- a/Knossos.NET/Views/Templates/DevModVersionsView.axaml +++ b/Knossos.NET/Views/Templates/DevModVersionsView.axaml @@ -15,7 +15,7 @@ - - - + - - + + + @@ -48,15 +48,15 @@ - + - - - + + - + + + From 2e9d06cc977e481822d1843d650c6d8d60c71b42 Mon Sep 17 00:00:00 2001 From: John Fernandez Date: Tue, 25 Feb 2025 00:06:55 -0500 Subject: [PATCH 2/5] Start Changes on the details tab --- .../Views/Templates/DevModDetailsView.axaml | 38 +++++++++++-------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/Knossos.NET/Views/Templates/DevModDetailsView.axaml b/Knossos.NET/Views/Templates/DevModDetailsView.axaml index d3834bbe..e9b54f52 100644 --- a/Knossos.NET/Views/Templates/DevModDetailsView.axaml +++ b/Knossos.NET/Views/Templates/DevModDetailsView.axaml @@ -20,7 +20,7 @@ - + @@ -41,31 +41,35 @@ - - + + - + - - - - + + + One link per line + + + - - + + + + This image should be 150×225 pixels large, 300KB max. + - @@ -74,13 +78,15 @@ - + + + This image should be 1070x300 pixels large. 10MB max, 1MB or less recommended. APNG is supported. + - + - - + @@ -91,7 +97,7 @@ - + From 71209edf3c55e06cd6eafb2b02dd9178ef822746 Mon Sep 17 00:00:00 2001 From: John Fernandez Date: Tue, 25 Feb 2025 14:56:25 -0500 Subject: [PATCH 3/5] Save Progress on Aligning the Details Tab --- Knossos.NET/Views/Templates/DevModDetailsView.axaml | 8 ++++---- Knossos.NET/Views/Templates/DevModVersionsView.axaml | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Knossos.NET/Views/Templates/DevModDetailsView.axaml b/Knossos.NET/Views/Templates/DevModDetailsView.axaml index e9b54f52..4665ec9b 100644 --- a/Knossos.NET/Views/Templates/DevModDetailsView.axaml +++ b/Knossos.NET/Views/Templates/DevModDetailsView.axaml @@ -54,7 +54,7 @@ - One link per line + One video link per line @@ -66,15 +66,15 @@ This image should be 150×225 pixels large, 300KB max. - + + + - - diff --git a/Knossos.NET/Views/Templates/DevModVersionsView.axaml b/Knossos.NET/Views/Templates/DevModVersionsView.axaml index fc80ceab..ca7269db 100644 --- a/Knossos.NET/Views/Templates/DevModVersionsView.axaml +++ b/Knossos.NET/Views/Templates/DevModVersionsView.axaml @@ -32,7 +32,7 @@ - + @@ -49,10 +49,10 @@ - - + + - From 24566e5771b81d071e8da53869ea8cb81e88b08c Mon Sep 17 00:00:00 2001 From: JohnAFernandez Date: Thu, 27 Feb 2025 23:01:40 -0500 Subject: [PATCH 4/5] Final Edits to Details Tab Everything should now be pleasantly arranged and centered --- .../Views/Templates/DevModDetailsView.axaml | 53 ++++++++----------- 1 file changed, 23 insertions(+), 30 deletions(-) diff --git a/Knossos.NET/Views/Templates/DevModDetailsView.axaml b/Knossos.NET/Views/Templates/DevModDetailsView.axaml index 4665ec9b..46126640 100644 --- a/Knossos.NET/Views/Templates/DevModDetailsView.axaml +++ b/Knossos.NET/Views/Templates/DevModDetailsView.axaml @@ -15,12 +15,12 @@ - + - + @@ -41,41 +41,37 @@ - - + + - + - + - + - One video link per line + One video link per line - + - - - This image should be 150×225 pixels large, 300KB max. - - - - - - - + + + This image should be 150×225 pixels large, 300KB max. + + + - - + + @@ -86,18 +82,16 @@ - - - - + + - + - + @@ -108,14 +102,13 @@ - + - + - From d38f2f982665965b9d9d170a7c0f3e7c91e84398 Mon Sep 17 00:00:00 2001 From: JohnAFernandez Date: Thu, 27 Feb 2025 23:45:40 -0500 Subject: [PATCH 5/5] Stop Unnecessary Warning message Allow mod management screen to check login status before warning the user that something is wrong --- Knossos.NET/Models/Nebula.cs | 8 ++++- .../Templates/DevModMembersMgrViewModel.cs | 33 ++++++++++++------- .../Templates/DevModMembersMgrView.cs.axaml | 3 ++ 3 files changed, 31 insertions(+), 13 deletions(-) diff --git a/Knossos.NET/Models/Nebula.cs b/Knossos.NET/Models/Nebula.cs index 9f9c66e1..48bb1c20 100644 --- a/Knossos.NET/Models/Nebula.cs +++ b/Knossos.NET/Models/Nebula.cs @@ -14,6 +14,7 @@ using Knossos.NET.Classes; using System.Threading; using System.Security.Cryptography; +using Knossos.NET.Views; namespace Knossos.NET.Models { @@ -1315,6 +1316,11 @@ public static async Task IsModEditable(string id) { new StringContent(modid), "mid" } }; + if (!userIsLoggedIn){ + + return null; + } + var reply = await ApiCall("mod/team/fetch", data, true); if (reply.HasValue) { @@ -1338,7 +1344,7 @@ public static async Task IsModEditable(string id) } else { - Log.Add(Log.LogSeverity.Error, "Nebula.GetTeamMembers", "Unable to check if mod team members."); + Log.Add(Log.LogSeverity.Error, "Nebula.GetTeamMembers", "Unable to check if this mod has team members."); } } catch (Exception ex) diff --git a/Knossos.NET/ViewModels/Templates/DevModMembersMgrViewModel.cs b/Knossos.NET/ViewModels/Templates/DevModMembersMgrViewModel.cs index c527af34..0584dc33 100644 --- a/Knossos.NET/ViewModels/Templates/DevModMembersMgrViewModel.cs +++ b/Knossos.NET/ViewModels/Templates/DevModMembersMgrViewModel.cs @@ -87,6 +87,8 @@ internal void Delete() internal bool buttonsEnabled = true; [ObservableProperty] internal bool loading = true; + [ObservableProperty] + internal bool showLoginError = false; public DevModMembersMgrViewModel() { @@ -101,21 +103,28 @@ public async void UpdateUI() { if (editor != null && !MemberItems.Any()) { - var members = await Nebula.GetTeamMembers(editor.ActiveVersion.id).ConfigureAwait(false); - Dispatcher.UIThread.Invoke(() => - { - if (members != null) + if (Nebula.userIsLoggedIn) { + ButtonsEnabled = true; + ShowLoginError = false; + var members = await Nebula.GetTeamMembers(editor.ActiveVersion.id).ConfigureAwait(false); + Dispatcher.UIThread.Invoke(() => { - foreach (var member in members) + if (members != null) { - MemberItems.Add(new MemberItem(member, this)); + foreach (var member in members) + { + MemberItems.Add(new MemberItem(member, this)); + } } - } - else - { - _ = MessageBox.Show(MainWindow.instance!, "An error has ocurred while retrieving the mod member list. The log may provide more information.", "Error", MessageBox.MessageBoxButtons.OK); - } - }); + else + { + _ = MessageBox.Show(MainWindow.instance!, "An error has ocurred while retrieving the mod member list. The log may provide more information.", "Error", MessageBox.MessageBoxButtons.OK); + } + }); + } else { + ButtonsEnabled = false; + ShowLoginError = true; + } } Dispatcher.UIThread.Invoke(() => { diff --git a/Knossos.NET/Views/Templates/DevModMembersMgrView.cs.axaml b/Knossos.NET/Views/Templates/DevModMembersMgrView.cs.axaml index 6d13875d..bcb48eea 100644 --- a/Knossos.NET/Views/Templates/DevModMembersMgrView.cs.axaml +++ b/Knossos.NET/Views/Templates/DevModMembersMgrView.cs.axaml @@ -31,6 +31,9 @@ + + You must be logged in to Nebula to manage your mod development team. +