diff --git a/.idea/.idea.SPTInstaller/.idea/avalonia.xml b/.idea/.idea.SPTInstaller/.idea/avalonia.xml
index 29981b3..1ff4164 100644
--- a/.idea/.idea.SPTInstaller/.idea/avalonia.xml
+++ b/.idea/.idea.SPTInstaller/.idea/avalonia.xml
@@ -8,10 +8,12 @@
+
+
diff --git a/SPTInstaller/App.axaml b/SPTInstaller/App.axaml
index 1f4245f..1c0a3d8 100644
--- a/SPTInstaller/App.axaml
+++ b/SPTInstaller/App.axaml
@@ -21,6 +21,7 @@
#FFFFFF
#282828
#323947
+ #444259
@@ -28,6 +29,7 @@
+
diff --git a/SPTInstaller/Assets/Styles.axaml b/SPTInstaller/Assets/Styles.axaml
index 35af7af..ce89e48 100644
--- a/SPTInstaller/Assets/Styles.axaml
+++ b/SPTInstaller/Assets/Styles.axaml
@@ -123,16 +123,13 @@
-
-
@@ -159,6 +156,7 @@
diff --git a/SPTInstaller/CustomControls/PreCheckItem.axaml b/SPTInstaller/CustomControls/PreCheckItem.axaml
index 95f6c6d..3808760 100644
--- a/SPTInstaller/CustomControls/PreCheckItem.axaml
+++ b/SPTInstaller/CustomControls/PreCheckItem.axaml
@@ -38,8 +38,7 @@
diff --git a/SPTInstaller/CustomControls/UpdateButton.axaml b/SPTInstaller/CustomControls/UpdateButton.axaml
new file mode 100644
index 0000000..4b2f766
--- /dev/null
+++ b/SPTInstaller/CustomControls/UpdateButton.axaml
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SPTInstaller/CustomControls/UpdateButton.axaml.cs b/SPTInstaller/CustomControls/UpdateButton.axaml.cs
new file mode 100644
index 0000000..5dc37f4
--- /dev/null
+++ b/SPTInstaller/CustomControls/UpdateButton.axaml.cs
@@ -0,0 +1,85 @@
+using System.Windows.Input;
+using Avalonia;
+using Avalonia.Controls;
+
+namespace SPTInstaller.CustomControls;
+
+public partial class UpdateButton : UserControl
+{
+ public UpdateButton()
+ {
+ InitializeComponent();
+ }
+
+ public static readonly StyledProperty InfoTextProperty = AvaloniaProperty.Register(
+ "InfoText");
+
+ public string InfoText
+ {
+ get => GetValue(InfoTextProperty);
+ set => SetValue(InfoTextProperty, value);
+ }
+
+ public static readonly StyledProperty CheckingForUpdateProperty = AvaloniaProperty.Register(
+ "CheckingForUpdate");
+
+ public bool CheckingForUpdate
+ {
+ get => GetValue(CheckingForUpdateProperty);
+ set => SetValue(CheckingForUpdateProperty, value);
+ }
+
+ public static readonly StyledProperty DismissCommandProperty = AvaloniaProperty.Register(
+ "DismissCommand");
+
+ public ICommand DismissCommand
+ {
+ get => GetValue(DismissCommandProperty);
+ set => SetValue(DismissCommandProperty, value);
+ }
+
+ public static readonly StyledProperty UpdateCommandProperty = AvaloniaProperty.Register(
+ "UpdateCommand");
+
+ public ICommand UpdateCommand
+ {
+ get => GetValue(UpdateCommandProperty);
+ set => SetValue(UpdateCommandProperty, value);
+ }
+
+ public static readonly StyledProperty UpdatingProperty = AvaloniaProperty.Register(
+ "Updating");
+
+ public bool Updating
+ {
+ get => GetValue(UpdatingProperty);
+ set => SetValue(UpdatingProperty, value);
+ }
+
+ public static readonly StyledProperty DownloadProgressProperty = AvaloniaProperty.Register(
+ "DownloadProgress");
+
+ public int DownloadProgress
+ {
+ get => GetValue(DownloadProgressProperty);
+ set => SetValue(DownloadProgressProperty, value);
+ }
+
+ public static readonly StyledProperty IsIndeterminateProperty = AvaloniaProperty.Register(
+ "IsIndeterminate");
+
+ public bool IsIndeterminate
+ {
+ get => GetValue(IsIndeterminateProperty);
+ set => SetValue(IsIndeterminateProperty, value);
+ }
+
+ public static readonly StyledProperty UpdateAvailableProperty = AvaloniaProperty.Register(
+ "UpdateAvailable");
+
+ public bool UpdateAvailable
+ {
+ get => GetValue(UpdateAvailableProperty);
+ set => SetValue(UpdateAvailableProperty, value);
+ }
+}
\ No newline at end of file
diff --git a/SPTInstaller/Models/InstallerUpdateInfo.cs b/SPTInstaller/Models/InstallerUpdateInfo.cs
index eeab3b9..4116686 100644
--- a/SPTInstaller/Models/InstallerUpdateInfo.cs
+++ b/SPTInstaller/Models/InstallerUpdateInfo.cs
@@ -20,11 +20,11 @@ public class InstallerUpdateInfo : ReactiveObject
set => this.RaiseAndSetIfChanged(ref _updateInfoText, value);
}
- private bool _showCard = false;
- public bool ShowCard
+ private bool _show = false;
+ public bool Show
{
- get => _showCard;
- set => this.RaiseAndSetIfChanged(ref _showCard, value);
+ get => _show;
+ set => this.RaiseAndSetIfChanged(ref _show, value);
}
private bool _updating = false;
@@ -89,7 +89,7 @@ public class InstallerUpdateInfo : ReactiveObject
private async Task DownloadNewInstaller()
{
- UpdateInfoText = $"Downloading new installer v{_newVersion}";
+ UpdateInfoText = $"Downloading installer v{_newVersion}";
var progress = new Progress(x => DownloadProgress = (int)x);
@@ -112,21 +112,7 @@ public class InstallerUpdateInfo : ReactiveObject
}
UpdateInfoText = infoText;
-
- if (!updateAvailable)
- {
- Task.Run(async () =>
- {
- // delay card dismiss
- await Task.Delay(TimeSpan.FromSeconds(2));
- ShowCard = updateAvailable;
- });
- }
- else
- {
- ShowCard = updateAvailable;
- }
-
+ Show = updateAvailable;
CheckingForUpdates = false;
UpdateAvailable = updateAvailable;
}
@@ -137,7 +123,7 @@ public class InstallerUpdateInfo : ReactiveObject
return;
UpdateInfoText = "Checking for installer updates";
- ShowCard = true;
+ Show = true;
CheckingForUpdates = true;
try
@@ -172,7 +158,7 @@ public class InstallerUpdateInfo : ReactiveObject
NewInstallerUrl = latest.Assets[0].BrowserDownloadUrl;
- EndCheck($"Update available, version {latestVersion}", true);
+ EndCheck($"Update available: v{latestVersion}", true);
return;
}
diff --git a/SPTInstaller/SPTInstaller.csproj b/SPTInstaller/SPTInstaller.csproj
index 1d8c78e..28e58a5 100644
--- a/SPTInstaller/SPTInstaller.csproj
+++ b/SPTInstaller/SPTInstaller.csproj
@@ -9,8 +9,8 @@
icon.ico
Assets\icon.ico
Debug;Release;TEST
- 2.53
- 2.53
+ 2.54
+ 2.54
SPT-AKI
diff --git a/SPTInstaller/ViewModels/PreChecksViewModel.cs b/SPTInstaller/ViewModels/PreChecksViewModel.cs
index a60b2e9..a4a255d 100644
--- a/SPTInstaller/ViewModels/PreChecksViewModel.cs
+++ b/SPTInstaller/ViewModels/PreChecksViewModel.cs
@@ -220,7 +220,7 @@ public class PreChecksViewModel : ViewModelBase
StartInstallCommand = ReactiveCommand.Create(async () =>
{
- UpdateInfo.ShowCard = false;
+ UpdateInfo.Show = false;
NavigateTo(new InstallViewModel(HostScreen));
});
@@ -233,7 +233,7 @@ public class PreChecksViewModel : ViewModelBase
DismissUpdateCommand = ReactiveCommand.Create(() =>
{
- UpdateInfo.ShowCard = false;
+ UpdateInfo.Show = false;
});
diff --git a/SPTInstaller/Views/PreChecksView.axaml b/SPTInstaller/Views/PreChecksView.axaml
index fda83d3..27558cc 100644
--- a/SPTInstaller/Views/PreChecksView.axaml
+++ b/SPTInstaller/Views/PreChecksView.axaml
@@ -75,9 +75,10 @@
-
+
+