Add exception notice for unofficial builds

This commit is contained in:
pizzaboxer 2024-08-10 13:45:14 +01:00
parent 8a73e0feed
commit 81b3ce156b
No known key found for this signature in database
GPG Key ID: 59D4A1DBAD0F2BA8
4 changed files with 27 additions and 2 deletions

View File

@ -767,6 +767,17 @@ namespace Bloxstrap.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Check the [Bloxstrap Wiki]({0}) first to see if this problem has already been addressed with a fix.
///
///If not, then please report this exception to the maintainers of this fork. Do NOT report this to Bloxstrap&apos;s GitHub issues, as this is an unoffical build..
/// </summary>
public static string Dialog_Exception_Info_2_Alt {
get {
return ResourceManager.GetString("Dialog.Exception.Info.2.Alt", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Bloxstrap Exception.
/// </summary>

View File

@ -1097,4 +1097,9 @@ Bloxstrap was installed at "{1}".</value>
<data name="Dialog.CannotCreateShortcuts" xml:space="preserve">
<value>Bloxstrap was unable to create shortcuts for the Desktop and Start menu. Try creating them later through Bloxstrap Settings.</value>
</data>
<data name="Dialog.Exception.Info.2.Alt" xml:space="preserve">
<value>Check the [Bloxstrap Wiki]({0}) first to see if this problem has already been addressed with a fix.
If not, then please report this exception to the maintainers of this fork. Do NOT report this to Bloxstrap's GitHub issues, as this is an unoffical build.</value>
</data>
</root>

View File

@ -35,7 +35,7 @@
<StackPanel Grid.Column="1">
<TextBlock Text="{x:Static resources:Strings.Dialog_Exception_Info_1}" FontSize="18" Foreground="{DynamicResource TextFillColorPrimaryBrush}" />
<RichTextBox x:Name="ErrorRichTextBox" Padding="8" Margin="0,16,0,0" Block.LineHeight="2" FontFamily="Courier New" IsReadOnly="True" />
<controls:MarkdownTextBlock MarkdownText="{Binding Source={x:Static resources:Strings.Dialog_Exception_Info_2}, Converter={StaticResource StringFormatConverter}, ConverterParameter='https://github.com/pizzaboxer/bloxstrap/wiki|https://github.com/pizzaboxer/bloxstrap/issues/new?template=bug_report.yaml'}" Margin="0,16,0,0" TextWrapping="Wrap" Foreground="{DynamicResource TextFillColorPrimaryBrush}" />
<controls:MarkdownTextBlock x:Name="HelpMessageMDTextBlock" Margin="0,16,0,0" TextWrapping="Wrap" Foreground="{DynamicResource TextFillColorPrimaryBrush}" />
</StackPanel>
</Grid>

View File

@ -6,6 +6,8 @@ using System.Windows.Interop;
using Windows.Win32;
using Windows.Win32.Foundation;
using Bloxstrap.Resources;
namespace Bloxstrap.UI.Elements.Dialogs
{
// hmm... do i use MVVM for this?
@ -22,7 +24,14 @@ namespace Bloxstrap.UI.Elements.Dialogs
AddException(exception);
if (!App.Logger.Initialized)
LocateLogFileButton.Content = Bloxstrap.Resources.Strings.Dialog_Exception_CopyLogContents;
LocateLogFileButton.Content = Strings.Dialog_Exception_CopyLogContents;
string helpMessage = String.Format(Strings.Dialog_Exception_Info_2, "https://github.com/pizzaboxer/bloxstrap/wiki", "https://github.com/pizzaboxer/bloxstrap/issues/new?template=bug_report.yaml");
if (String.IsNullOrEmpty(App.BuildMetadata.CommitHash))
helpMessage = String.Format(Strings.Dialog_Exception_Info_2_Alt, "https://github.com/pizzaboxer/bloxstrap/wiki");
HelpMessageMDTextBlock.MarkdownText = helpMessage;
LocateLogFileButton.Click += delegate
{