Bladeren bron

Updated debug stuff and version

flabbet 8 maanden geleden
bovenliggende
commit
5cf28e8a90

+ 1 - 0
src/PixiEditor/Data/Localization/Languages/en.json

@@ -65,6 +65,7 @@
   "UPDATE_CHECK_FAILED": "Update check failed",
   "COULD_NOT_CHECK_FOR_UPDATES": "Could not check if there is an update available.",
   "VERSION": "Version {0}",
+  "BUILD_ID": "Build ID: {0}",
   "OPEN_TEMP_DIR": "Open temp directory",
   "OPEN_LOCAL_APPDATA_DIR": "Open Local AppData directory",
   "OPEN_ROAMING_APPDATA_DIR": "Open Roaming AppData directory",

+ 6 - 5
src/PixiEditor/Models/AnalyticsAPI/AnalyticsClient.cs

@@ -1,6 +1,7 @@
 using System.Globalization;
 using System.Net;
 using System.Net.Http.Json;
+using System.Reflection;
 using System.Text.Json;
 using System.Text.Json.Serialization;
 using PixiEditor.Helpers;
@@ -44,10 +45,10 @@ public class AnalyticsClient
         {
             return await response.Content.ReadFromJsonAsync<Guid?>(_options, cancellationToken);
         }
-
+        
         if (response.StatusCode is not HttpStatusCode.ServiceUnavailable)
         {
-            await ReportInvalidStatusCodeAsync(response.StatusCode);
+            await ReportInvalidStatusCodeAsync(response.StatusCode, await response.Content.ReadAsStringAsync(cancellationToken));
         }
             
         return null;
@@ -66,7 +67,7 @@ public class AnalyticsClient
 
         if (response.StatusCode is not (HttpStatusCode.NotFound or HttpStatusCode.ServiceUnavailable))
         {
-            await ReportInvalidStatusCodeAsync(response.StatusCode);
+            await ReportInvalidStatusCodeAsync(response.StatusCode, await response.Content.ReadAsStringAsync(cancellationToken));
         }
             
         return false;
@@ -84,9 +85,9 @@ public class AnalyticsClient
         await _client.DeleteAsync($"sessions/{sessionId}", cancellationToken);
     }
 
-    private static async Task ReportInvalidStatusCodeAsync(HttpStatusCode statusCode)
+    private static async Task ReportInvalidStatusCodeAsync(HttpStatusCode statusCode, string message)
     {
-        await CrashHelper.SendExceptionInfoToWebhookAsync(new InvalidOperationException($"Invalid status code from analytics API '{statusCode}'"));
+        await CrashHelper.SendExceptionInfoToWebhookAsync(new InvalidOperationException($"Invalid status code from analytics API '{statusCode}', message: {message}"));
     }
 
     class KeyCombinationConverter : JsonConverter<KeyCombination>

+ 4 - 4
src/PixiEditor/Properties/AssemblyInfo.cs

@@ -6,11 +6,11 @@ using System.Windows;
 // set of attributes. Change these attribute values to modify the information
 // associated with an assembly.
 [assembly: AssemblyTitle("PixiEditor")]
-[assembly: AssemblyDescription("A fast, nice looking universal graphics editor.")]
+[assembly: AssemblyDescription("Fast, universal graphics editor.")]
 [assembly: AssemblyConfiguration("")]
 [assembly: AssemblyCompany("PixiEditor")]
 [assembly: AssemblyProduct("PixiEditor")]
-[assembly: AssemblyCopyright("Copyright PixiEditor © 2017 - 2024")]
+[assembly: AssemblyCopyright("Copyright PixiEditor © 2017 - 2025")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]
 
@@ -42,5 +42,5 @@ using System.Windows;
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("2.0.0.19")]
-[assembly: AssemblyFileVersion("2.0.0.19")]
+[assembly: AssemblyVersion("2.0.0.20")]
+[assembly: AssemblyFileVersion("2.0.0.20")]

+ 3 - 2
src/PixiEditor/Views/Dialogs/AboutPopup.axaml

@@ -11,8 +11,8 @@
         x:Class="PixiEditor.Views.Dialogs.AboutPopup"
         Name="aboutPopup"
         CanResize="True"
-        Width="440" Height="520"
-        MaxWidth="440" MaxHeight="520"
+        Width="440" Height="540"
+        MaxWidth="440" MaxHeight="540"
         Title="ABOUT">
     <StackPanel DataContext="{Binding ElementName=aboutPopup}" Orientation="Vertical" DockPanel.Dock="Bottom" Margin="10">
             <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Top">
@@ -20,6 +20,7 @@
                 <TextBlock FontSize="40" FontWeight="SemiBold" Foreground="{DynamicResource ThemeForegroundBrush}" VerticalAlignment="Center" Margin="10,0,0,0">PixiEditor</TextBlock>
             </StackPanel>
             <TextBlock Foreground="{DynamicResource ThemeForegroundBrush}" HorizontalAlignment="Center" FontSize="20" FontWeight="Medium" ui:Translator.LocalizedString="{Binding VersionText}"/>
+            <TextBlock Foreground="{DynamicResource ThemeForegroundBrush}" HorizontalAlignment="Left" FontSize="11" Margin="25 5 0 0" ui:Translator.LocalizedString="{Binding BuildIdText}"/>
             <Label ui:Translator.Key="PROJECT_MAINTAINERS" Classes="h2" Margin="10 20 0 5"/>
             <StackPanel Orientation="Horizontal" Margin="20 0">
                 <Ellipse Width="32" Height="32" FlowDirection="LeftToRight">

+ 3 - 0
src/PixiEditor/Views/Dialogs/AboutPopup.axaml.cs

@@ -7,6 +7,9 @@ public partial class AboutPopup : PixiEditorPopup
 {
     public static LocalizedString VersionText =>
         new LocalizedString("VERSION", VersionHelpers.GetCurrentAssemblyVersionString(true));
+    
+    public static LocalizedString BuildIdText =>
+        new LocalizedString("BUILD_ID", VersionHelpers.GetBuildId());
 
     public bool DisplayDonationButton
     {