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/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/DevModDetailsView.axaml b/Knossos.NET/Views/Templates/DevModDetailsView.axaml index d3834bbe..46126640 100644 --- a/Knossos.NET/Views/Templates/DevModDetailsView.axaml +++ b/Knossos.NET/Views/Templates/DevModDetailsView.axaml @@ -15,12 +15,12 @@ - + - + @@ -41,57 +41,57 @@ - - + + - + - + - - - - - + + + + One video link per line + + + - - - - - - - + + + + This image should be 150×225 pixels large, 300KB max. + + + - - - - + + - + + + This image should be 1070x300 pixels large. 10MB max, 1MB or less recommended. APNG is supported. + - + - - - - - + + - + - + @@ -102,14 +102,13 @@ - + - + - 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/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. + diff --git a/Knossos.NET/Views/Templates/DevModVersionsView.axaml b/Knossos.NET/Views/Templates/DevModVersionsView.axaml index b52a072c..ca7269db 100644 --- a/Knossos.NET/Views/Templates/DevModVersionsView.axaml +++ b/Knossos.NET/Views/Templates/DevModVersionsView.axaml @@ -15,7 +15,7 @@ - - - + - - + + + @@ -48,15 +48,15 @@ - - - - - + + - + + +