Finalize installer/analytics handling

This commit is contained in:
pizzaboxer 2024-10-03 00:15:49 +01:00
parent 6cb1ca6170
commit 75f8be2f0f
No known key found for this signature in database
GPG Key ID: 59D4A1DBAD0F2BA8
7 changed files with 26 additions and 13 deletions

View File

@ -138,7 +138,7 @@ namespace Bloxstrap
try
{
await HttpClient.GetAsync($"https://bloxstrapabs.com/metrics/post?key={key}&value={value}");
await HttpClient.GetAsync($"https://bloxstraplabs.com/metrics/post?key={key}&value={value}");
}
catch (Exception ex)
{

View File

@ -17,6 +17,8 @@ namespace Bloxstrap
public bool CreateStartMenuShortcuts = true;
public bool EnableAnalytics = true;
public bool IsImplicitInstall = false;
public string InstallLocationError { get; set; } = "";
@ -88,9 +90,13 @@ namespace Bloxstrap
App.State.Load(false);
App.FastFlags.Load(false);
App.Settings.Prop.EnableAnalytics = EnableAnalytics;
if (!String.IsNullOrEmpty(App.State.Prop.Studio.VersionGuid))
WindowsRegistry.RegisterStudio();
App.Settings.Save();
App.Logger.WriteLine(LOG_IDENT, "Installation finished");
if (!IsImplicitInstall)

View File

@ -2128,7 +2128,7 @@ namespace Bloxstrap.Resources {
}
/// <summary>
/// Looks up a localized string similar to All data sent is completely anonymous. To understand what data we use and how, see our [privacy policy]({0})..
/// Looks up a localized string similar to It&apos;s anonymous and nothing evil, promise. For insight on what we collect and why, see our [privacy policy]({0})..
/// </summary>
public static string Menu_Bloxstrap_Analytics_Description {
get {

View File

@ -1226,7 +1226,7 @@ Please manually delete Bloxstrap.exe from the install location or try restarting
<value>Enable sending of analytics</value>
</data>
<data name="Menu.Bloxstrap.Analytics.Description" xml:space="preserve">
<value>All data sent is completely anonymous. To understand what data we use and how, see our [privacy policy]({0}).</value>
<value>It's anonymous and nothing evil, promise. For insight on what we collect and why, see our [privacy policy]({0}).</value>
</data>
<data name="Common.Analytics" xml:space="preserve">
<value>Analytics</value>

View File

@ -10,7 +10,7 @@
xmlns:local="clr-namespace:Bloxstrap.UI.Elements.Installer"
mc:Ignorable="d"
Title="{x:Static resources:Strings.Installer_Title}"
Height="540" Width="840"
Height="540" Width="840" MinWidth="840"
Background="{ui:ThemeResource ApplicationBackgroundBrush}"
ExtendsContentIntoTitleBar="True"
WindowBackdropType="Mica"

View File

@ -50,15 +50,22 @@
<TextBlock FontSize="20" FontWeight="SemiBold" Text="{x:Static resources:Strings.Common_Shortcuts}" TextWrapping="Wrap" Margin="0,16,0,0" />
<TextBlock FontSize="14" Text="{x:Static resources:Strings.Installer_Install_Shortcuts_Description}" TextWrapping="Wrap" />
<controls:OptionControl
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<controls:OptionControl Grid.Column="0" Margin="0,0,4,0"
Header="{x:Static resources:Strings.Common_Shortcuts_Desktop}">
<ui:ToggleSwitch IsChecked="{Binding CreateDesktopShortcuts, Mode=TwoWay}" />
</controls:OptionControl>
<controls:OptionControl
<controls:OptionControl Grid.Column="1" Margin="4,0,0,0"
Header="{x:Static resources:Strings.Common_Shortcuts_StartMenu}">
<ui:ToggleSwitch IsChecked="{Binding CreateStartMenuShortcuts, Mode=TwoWay}" />
</controls:OptionControl>
</Grid>
<TextBlock FontSize="20" FontWeight="SemiBold" Text="{x:Static resources:Strings.Common_Analytics}" TextWrapping="Wrap" Margin="0,16,0,0" />
<controls:MarkdownTextBlock FontSize="14" MarkdownText="{Binding Source={x:Static resources:Strings.Menu_Bloxstrap_Analytics_Description}, Converter={StaticResource StringFormatConverter}, ConverterParameter='https://github.com/pizzaboxer/bloxstrap/wiki/Privacy-Policy#analytical-functionality'}" TextWrapping="Wrap" />

View File

@ -48,8 +48,8 @@ namespace Bloxstrap.UI.ViewModels.Installer
public bool AnalyticsEnabled
{
get => App.Settings.Prop.EnableAnalytics;
set => App.Settings.Prop.EnableAnalytics = value;
get => installer.EnableAnalytics;
set => installer.EnableAnalytics = value;
}
public ICommand BrowseInstallLocationCommand => new RelayCommand(BrowseInstallLocation);