瀏覽代碼

Adjustments

Krzysztof Krysiński 2 周之前
父節點
當前提交
bb493f8155

+ 22 - 20
src/PixiEditor.Extensions.CommonApi/PixiEditor.Extensions.CommonApi.csproj

@@ -1,23 +1,25 @@
 <Project Sdk="Microsoft.NET.Sdk">
 
-    <PropertyGroup>
-        <TargetFramework>net8.0</TargetFramework>
-        <ImplicitUsings>enable</ImplicitUsings>
-        <Nullable>disable</Nullable>
-    </PropertyGroup>
+  <PropertyGroup>
+    <TargetFramework>net8.0</TargetFramework>
+    <ImplicitUsings>enable</ImplicitUsings>
+    <Nullable>disable</Nullable>
+    <PackageId>PixiEditor.Extensions.CommonApi</PackageId>
+    <PackageVersion>0.0.1-dev</PackageVersion>
+  </PropertyGroup>
 
-    <ItemGroup>
-      <Folder Include="Preferences\" />
-    </ItemGroup>
+  <ItemGroup>
+    <Folder Include="Preferences\"/>
+  </ItemGroup>
+
+  <ItemGroup>
+    <PackageReference Include="protobuf-net" Version="3.2.52"/>
+  </ItemGroup>
 
-    <ItemGroup>
-      <PackageReference Include="protobuf-net" Version="3.2.52" />
-    </ItemGroup>
-  
   <PropertyGroup>
     <ProtogenVersion>3.2.52</ProtogenVersion>
   </PropertyGroup>
-  
+
   <Target Name="ProtogenCheck" BeforeTargets="GenerateProtoContracts">
     <PropertyGroup>
       <ProtogenExists>false</ProtogenExists>
@@ -29,7 +31,7 @@
       <ProtogenExists Condition="'$(ProtogenExitCode)' == '0'">true</ProtogenExists>
     </PropertyGroup>
   </Target>
-  
+
   <Target Name="InstallProtogen" BeforeTargets="GenerateProtoContracts"
           Condition="'$(ProtogenExists)' != 'true'">
     <Message Text="Downloading protogen v$(ProtogenVersion)..." Importance="high"/>
@@ -37,11 +39,11 @@
     <PropertyGroup>
       <ProtogenExists>true</ProtogenExists>
     </PropertyGroup>
-    
+
     <Message Text="protogen installed successfully." Importance="high"/>
   </Target>
-    
-  
+
+
   <Target Name="GenerateProtoContracts" BeforeTargets="BeforeCompile"
           Inputs="$(MSBuildProjectDirectory)\DataContracts\*.proto"
           Outputs="$(MSBuildProjectDirectory)\ProtoAutogen\*.cs">
@@ -53,7 +55,7 @@
 
   </Target>
 
-    <ItemGroup>
-      <ProjectReference Include="..\PixiEditor.Extensions.CommonApi.Diagnostics\PixiEditor.Extensions.CommonApi.Diagnostics.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
-    </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\PixiEditor.Extensions.CommonApi.Diagnostics\PixiEditor.Extensions.CommonApi.Diagnostics.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false"/>
+  </ItemGroup>
 </Project>

+ 2 - 0
src/PixiEditor.Extensions.Sdk/PixiEditor.Extensions.Sdk.csproj

@@ -16,6 +16,8 @@
     <UseSystemResourceKeys>true</UseSystemResourceKeys>
     <NativeDebugSymbols>false</NativeDebugSymbols>
     <ValidateExecutableReferencesMatchSelfContained>false</ValidateExecutableReferencesMatchSelfContained>
+    <PackageId>PixiEditor.Extensions.Sdk</PackageId>
+    <PackageVersion>0.0.1-dev</PackageVersion>
   </PropertyGroup>
 
   <ItemGroup>

+ 3 - 0
src/PixiEditor.Platform.Steam/SteamIdentityProvider.cs

@@ -32,6 +32,9 @@ public class SteamIdentityProvider : IIdentityProvider
         IsLoggedIn = true;
     }
 
+    public event Action<IUser>? OnLoggedIn;
+    public event Action? LoggedOut;
+
     private static string GetAvatar(CSteamID id)
     {
         int avatar = SteamFriends.GetLargeFriendAvatar(id);

+ 15 - 2
src/PixiEditor/ViewModels/SubViewModels/FileViewModel.cs

@@ -26,6 +26,7 @@ using PixiEditor.Models.ExceptionHandling;
 using PixiEditor.Models.IO.CustomDocumentFormats;
 using PixiEditor.OperatingSystem;
 using PixiEditor.Parser;
+using PixiEditor.Platform;
 using PixiEditor.UI.Common.Fonts;
 using PixiEditor.UI.Common.Localization;
 using PixiEditor.ViewModels.Document;
@@ -154,13 +155,25 @@ internal class FileViewModel : SubViewModel<ViewModelMain>
             if (preferences.GetLocalPreference("OnboardingV2Shown", false) == false)
             {
                 preferences.UpdateLocalPreference("OnboardingV2Shown", true);
-                Owner.WindowSubViewModel.OpenAccountWindow(true).Closed += (sender, eventArgs) =>
+
+                if (IPlatform.Current?.IdentityProvider != null &&
+                    IPlatform.Current.IdentityProvider.ProviderName == "PixiAuth")
+                {
+                    Owner.WindowSubViewModel.OpenAccountWindow(true).Closed += (sender, eventArgs) =>
+                    {
+                        Owner.WindowSubViewModel.OpenOnboardingWindow().Closed += (_, _) =>
+                        {
+                            Owner.InvokeUserReadyEvent();
+                        };
+                    };
+                }
+                else
                 {
                     Owner.WindowSubViewModel.OpenOnboardingWindow().Closed += (_, _) =>
                     {
                         Owner.InvokeUserReadyEvent();
                     };
-                };
+                }
             }
             else if (preferences!.GetPreference("ShowStartupWindow", true))
             {