From 16f76be8073ca8632f9db5a182fe3adaa0c26de9 Mon Sep 17 00:00:00 2001
From: "waffle.lord" <waffle.lord@hotmail.com>
Date: Sun, 24 Mar 2024 21:44:14 -0400
Subject: [PATCH] re-add update card

---
 .idea/.idea.SPTInstaller/.idea/avalonia.xml |  1 +
 SPTInstaller/SPTInstaller.csproj            |  4 +-
 SPTInstaller/Views/PreChecksView.axaml      | 83 +++------------------
 3 files changed, 15 insertions(+), 73 deletions(-)

diff --git a/.idea/.idea.SPTInstaller/.idea/avalonia.xml b/.idea/.idea.SPTInstaller/.idea/avalonia.xml
index 743d6f8..29981b3 100644
--- a/.idea/.idea.SPTInstaller/.idea/avalonia.xml
+++ b/.idea/.idea.SPTInstaller/.idea/avalonia.xml
@@ -12,6 +12,7 @@
         <entry key="SPTInstaller/CustomControls/PreCheckItem.axaml" value="SPTInstaller/SPTInstaller.csproj" />
         <entry key="SPTInstaller/CustomControls/ProgressableTaskItem.axaml" value="SPTInstaller/SPTInstaller.csproj" />
         <entry key="SPTInstaller/CustomControls/SPTInstallButton.axaml" value="SPTInstaller/SPTInstaller.csproj" />
+        <entry key="SPTInstaller/CustomControls/UpdateInfoCard.axaml" value="SPTInstaller/SPTInstaller.csproj" />
         <entry key="SPTInstaller/Views/DetailedPreChecksView.axaml" value="SPTInstaller/SPTInstaller.csproj" />
         <entry key="SPTInstaller/Views/MainWindow.axaml" value="SPTInstaller/SPTInstaller.csproj" />
         <entry key="SPTInstaller/Views/PreChecksView.axaml" value="SPTInstaller/SPTInstaller.csproj" />
diff --git a/SPTInstaller/SPTInstaller.csproj b/SPTInstaller/SPTInstaller.csproj
index f565adc..4af8b5c 100644
--- a/SPTInstaller/SPTInstaller.csproj
+++ b/SPTInstaller/SPTInstaller.csproj
@@ -9,8 +9,8 @@
     <PackageIcon>icon.ico</PackageIcon>
     <ApplicationIcon>Assets\icon.ico</ApplicationIcon>
     <Configurations>Debug;Release;TEST</Configurations>
-    <AssemblyVersion>2.51</AssemblyVersion>
-    <FileVersion>2.51</FileVersion>
+    <AssemblyVersion>2.52</AssemblyVersion>
+    <FileVersion>2.52</FileVersion>
     <Company>SPT-AKI</Company>
   </PropertyGroup>
 
diff --git a/SPTInstaller/Views/PreChecksView.axaml b/SPTInstaller/Views/PreChecksView.axaml
index 9b73b86..ed6af3f 100644
--- a/SPTInstaller/Views/PreChecksView.axaml
+++ b/SPTInstaller/Views/PreChecksView.axaml
@@ -90,76 +90,17 @@
                 <cc:StatusSpinner State="{Binding InstallButtonCheckState}" Margin="2" IsVisible="{Binding !AllowInstall}"/>
             </StackPanel>
         </Button>
+        
+        <cc:UpdateInfoCard Grid.Row="1" Grid.RowSpan="5" Grid.ColumnSpan="5" Padding="10"
+                           VerticalAlignment="Center" HorizontalAlignment="Center"
+                           InfoText="{Binding UpdateInfo.UpdateInfoText}"
+                           ShowUpdateCard="{Binding UpdateInfo.ShowCard}"
+                           NotNowCommand="{Binding DismissUpdateCommand}"
+                           UpdateInstallerCommand="{Binding UpdateInstallerCommand}"
+                           Updating="{Binding UpdateInfo.Updating}"
+                           DownloadProgress="{Binding UpdateInfo.DownloadProgress}"
+                           IndeterminateProgress="{Binding UpdateInfo.CheckingForUpdates}"
+                           UpdateAvailable="{Binding UpdateInfo.UpdateAvailable}"
+        />
     </Grid>
-    
-    <!-- <Grid ColumnDefinitions="10,*,AUTO,*,10" -->
-	<!-- 	  RowDefinitions="10,*,AUTO,AUTO,AUTO,AUTO,*,10"> -->
-	<!-- 	<StackPanel Grid.Column="1" Grid.ColumnSpan="3" Grid.Row="2" HorizontalAlignment="Center"> -->
-	<!-- 		<Label Content="SPT will be installed into this folder:" -->
-	<!-- 			   HorizontalAlignment="Center" -->
-	<!-- 			   /> -->
- <!--            <TextBlock Text="{Binding InstallPath}" TextWrapping="Wrap" -->
- <!--                       Foreground="DodgerBlue" HorizontalAlignment="Center" -->
- <!--                       /> -->
- <!--             -->
-	<!-- 		<Label Content="Move the installer into the folder you want it to install into if this is wrong" -->
-	<!-- 			   HorizontalAlignment="Center" -->
-	<!-- 			   /> -->
-	<!-- 	</StackPanel> -->
-	<!-- 	<Button Grid.Column="2" Grid.Row="3" Padding="20 10" -->
-	<!-- 			Margin="10" -->
-	<!-- 			FontSize="15" FontWeight="SemiBold" -->
-	<!-- 			Classes="yellow" -->
-	<!-- 			IsEnabled="{Binding AllowInstall}" -->
-	<!-- 			Command="{Binding StartInstallCommand}" -->
-	<!-- 			> -->
- <!--            <StackPanel Orientation="Horizontal"> -->
- <!--                <TextBlock Text="{Binding InstallButtonText}" VerticalAlignment="Center" Foreground="Black"/> -->
- <!--                <cc:StatusSpinner State="{Binding InstallButtonCheckState}" Margin="2" IsVisible="{Binding !AllowInstall}"/> -->
- <!--            </StackPanel> -->
- <!--        </Button> -->
- <!--         -->
-	<!-- 	<ItemsControl ItemsSource="{Binding PreChecks}" Grid.Column="1" Grid.ColumnSpan="3" Grid.Row="4" HorizontalAlignment="Center"> -->
-	<!-- 		<ItemsControl.ItemsPanel> -->
-	<!-- 			<ItemsPanelTemplate> -->
-	<!-- 				<WrapPanel/> -->
-	<!-- 			</ItemsPanelTemplate> -->
-	<!-- 		</ItemsControl.ItemsPanel> -->
-	<!-- 		<ItemsControl.ItemTemplate> -->
-	<!-- 			<DataTemplate> -->
-	<!-- 				<cc:PreCheckItem PreCheckName="{Binding Name}" -->
-	<!-- 								 IsRequired="{Binding IsRequired}" -->
- <!--                                     State="{Binding State}" -->
-	<!-- 								 /> -->
-	<!-- 			</DataTemplate> -->
-	<!-- 		</ItemsControl.ItemTemplate> -->
-	<!-- 	</ItemsControl> -->
- <!-- -->
- <!--        <cc:UpdateInfoCard Grid.Row="1" Grid.RowSpan="4" Padding="10" -->
- <!--                           VerticalAlignment="Top" HorizontalAlignment="Left" -->
- <!--                           InfoText="{Binding UpdateInfo.UpdateInfoText}" -->
- <!--                           ShowUpdateCard="{Binding UpdateInfo.ShowCard}" -->
- <!--                           NotNowCommand="{Binding DismissUpdateCommand}" -->
- <!--                           UpdateInstallerCommand="{Binding UpdateInstallerCommand}" -->
- <!--                           Updating="{Binding UpdateInfo.Updating}" -->
- <!--                           DownloadProgress="{Binding UpdateInfo.DownloadProgress}" -->
- <!--                           IndeterminateProgress="{Binding UpdateInfo.CheckingForUpdates}" -->
- <!--                           UpdateAvailable="{Binding UpdateInfo.UpdateAvailable}" -->
- <!--                           /> -->
- <!--         -->
- <!--        <cc:CacheInfo Grid.Row="6" Grid.Column="1" Grid.ColumnSpan="3" Padding="10" -->
- <!--                      VerticalAlignment="Bottom" HorizontalAlignment="Left" -->
- <!--                      InfoText="{Binding CacheInfoText}" State="{Binding CacheCheckState}" -->
- <!--                      /> -->
- <!--         -->
- <!--        <Button Grid.Row="6" Grid.Column="1" Grid.ColumnSpan="3" Padding="10" x:Name="debugBtn" -->
- <!--                HorizontalAlignment="Right" VerticalAlignment="Bottom" -->
- <!--                Classes="icon" -->
- <!--                Command="{Binding LaunchWithDebug}" -->
- <!--                IsVisible="{Binding !Debugging}" -->
- <!--                > -->
- <!--            <Path Data="{StaticResource Bug}" Fill="{Binding ElementName=debugBtn, Path=Foreground}" -->
- <!--                  /> -->
- <!--        </Button> -->
-	<!-- </Grid> -->
 </UserControl>