mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
Finalize installer/analytics handling
This commit is contained in:
parent
6cb1ca6170
commit
75f8be2f0f
@ -138,7 +138,7 @@ namespace Bloxstrap
|
|||||||
|
|
||||||
try
|
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)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
@ -17,6 +17,8 @@ namespace Bloxstrap
|
|||||||
|
|
||||||
public bool CreateStartMenuShortcuts = true;
|
public bool CreateStartMenuShortcuts = true;
|
||||||
|
|
||||||
|
public bool EnableAnalytics = true;
|
||||||
|
|
||||||
public bool IsImplicitInstall = false;
|
public bool IsImplicitInstall = false;
|
||||||
|
|
||||||
public string InstallLocationError { get; set; } = "";
|
public string InstallLocationError { get; set; } = "";
|
||||||
@ -88,9 +90,13 @@ namespace Bloxstrap
|
|||||||
App.State.Load(false);
|
App.State.Load(false);
|
||||||
App.FastFlags.Load(false);
|
App.FastFlags.Load(false);
|
||||||
|
|
||||||
|
App.Settings.Prop.EnableAnalytics = EnableAnalytics;
|
||||||
|
|
||||||
if (!String.IsNullOrEmpty(App.State.Prop.Studio.VersionGuid))
|
if (!String.IsNullOrEmpty(App.State.Prop.Studio.VersionGuid))
|
||||||
WindowsRegistry.RegisterStudio();
|
WindowsRegistry.RegisterStudio();
|
||||||
|
|
||||||
|
App.Settings.Save();
|
||||||
|
|
||||||
App.Logger.WriteLine(LOG_IDENT, "Installation finished");
|
App.Logger.WriteLine(LOG_IDENT, "Installation finished");
|
||||||
|
|
||||||
if (!IsImplicitInstall)
|
if (!IsImplicitInstall)
|
||||||
|
2
Bloxstrap/Resources/Strings.Designer.cs
generated
2
Bloxstrap/Resources/Strings.Designer.cs
generated
@ -2128,7 +2128,7 @@ namespace Bloxstrap.Resources {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <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's anonymous and nothing evil, promise. For insight on what we collect and why, see our [privacy policy]({0})..
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string Menu_Bloxstrap_Analytics_Description {
|
public static string Menu_Bloxstrap_Analytics_Description {
|
||||||
get {
|
get {
|
||||||
|
@ -1226,7 +1226,7 @@ Please manually delete Bloxstrap.exe from the install location or try restarting
|
|||||||
<value>Enable sending of analytics</value>
|
<value>Enable sending of analytics</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Menu.Bloxstrap.Analytics.Description" xml:space="preserve">
|
<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>
|
||||||
<data name="Common.Analytics" xml:space="preserve">
|
<data name="Common.Analytics" xml:space="preserve">
|
||||||
<value>Analytics</value>
|
<value>Analytics</value>
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
xmlns:local="clr-namespace:Bloxstrap.UI.Elements.Installer"
|
xmlns:local="clr-namespace:Bloxstrap.UI.Elements.Installer"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="{x:Static resources:Strings.Installer_Title}"
|
Title="{x:Static resources:Strings.Installer_Title}"
|
||||||
Height="540" Width="840"
|
Height="540" Width="840" MinWidth="840"
|
||||||
Background="{ui:ThemeResource ApplicationBackgroundBrush}"
|
Background="{ui:ThemeResource ApplicationBackgroundBrush}"
|
||||||
ExtendsContentIntoTitleBar="True"
|
ExtendsContentIntoTitleBar="True"
|
||||||
WindowBackdropType="Mica"
|
WindowBackdropType="Mica"
|
||||||
|
@ -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="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" />
|
<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}">
|
Header="{x:Static resources:Strings.Common_Shortcuts_Desktop}">
|
||||||
<ui:ToggleSwitch IsChecked="{Binding CreateDesktopShortcuts, Mode=TwoWay}" />
|
<ui:ToggleSwitch IsChecked="{Binding CreateDesktopShortcuts, Mode=TwoWay}" />
|
||||||
</controls:OptionControl>
|
</controls:OptionControl>
|
||||||
|
|
||||||
<controls:OptionControl
|
<controls:OptionControl Grid.Column="1" Margin="4,0,0,0"
|
||||||
Header="{x:Static resources:Strings.Common_Shortcuts_StartMenu}">
|
Header="{x:Static resources:Strings.Common_Shortcuts_StartMenu}">
|
||||||
<ui:ToggleSwitch IsChecked="{Binding CreateStartMenuShortcuts, Mode=TwoWay}" />
|
<ui:ToggleSwitch IsChecked="{Binding CreateStartMenuShortcuts, Mode=TwoWay}" />
|
||||||
</controls:OptionControl>
|
</controls:OptionControl>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
<TextBlock FontSize="20" FontWeight="SemiBold" Text="{x:Static resources:Strings.Common_Analytics}" TextWrapping="Wrap" Margin="0,16,0,0" />
|
<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" />
|
<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" />
|
||||||
|
@ -48,8 +48,8 @@ namespace Bloxstrap.UI.ViewModels.Installer
|
|||||||
|
|
||||||
public bool AnalyticsEnabled
|
public bool AnalyticsEnabled
|
||||||
{
|
{
|
||||||
get => App.Settings.Prop.EnableAnalytics;
|
get => installer.EnableAnalytics;
|
||||||
set => App.Settings.Prop.EnableAnalytics = value;
|
set => installer.EnableAnalytics = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ICommand BrowseInstallLocationCommand => new RelayCommand(BrowseInstallLocation);
|
public ICommand BrowseInstallLocationCommand => new RelayCommand(BrowseInstallLocation);
|
||||||
|
Loading…
Reference in New Issue
Block a user