Added a report bug button to the About Me window

This commit is contained in:
Toastie 2025-01-07 16:31:16 +13:00
parent 87e197aebf
commit d997fa5952
Signed by: toastie_t0ast
GPG key ID: 0861BE54AD481DC7
4 changed files with 32 additions and 49 deletions

View file

@ -86,31 +86,6 @@
</Style>
</Style>
<!--Button styled like a hyperlink text-->
<Style Selector="Button.link-11">
<Setter Property="Foreground" Value="{DynamicResource HyperlinkColor}" />
<Setter Property="Padding" Value="0" />
<Setter Property="Cursor" Value="Hand" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="Template">
<ControlTemplate>
<ContentPresenter Content="{TemplateBinding Content}">
<ContentPresenter.Styles>
<Style Selector="TextBlock">
<Setter Property="Foreground" Value="{TemplateBinding Foreground}"/>
<!--This should be binding to the template's FontSize, but since I'm overriding-->
<!--the main TextBlock class, this doesn't seem to work properly, so I have to set-->
<!--the value manually-->
<Setter Property="FontSize" Value="11"/>
<Setter Property="TextDecorations" Value="Underline"/>
</Style>
</ContentPresenter.Styles>
</ContentPresenter>
</ControlTemplate>
</Setter>
</Style>
<!--Circular Border-->
<Style Selector="Border.circular">
<Setter Property="ClipToBounds" Value="True" />

View file

@ -54,34 +54,41 @@
<Separator Margin="20"
HorizontalAlignment="Stretch" />
<TextBlock Text="This tool was made by Toastie. If it has been useful to you, consider showing your support on Ko-fi."
<TextBlock Text="This tool was made by Toastie. If it has been useful to you, consider showing your support."
TextAlignment="Center"
Margin="0 0 0 10" />
<Button HorizontalAlignment="Center"
CommandParameter="https://ko-fi.com/toastie_t0ast"
Command="{Binding OpenUrl}">
<StackPanel Orientation="Horizontal">
<TextBlock Text="Buy me a Ko-fi " />
<Image Classes="icon-url"
Source="{DynamicResource UrlIcon}" />
</StackPanel>
</Button>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<Button Margin="0 0 5 0"
HorizontalAlignment="Center"
CommandParameter="https://ko-fi.com/toastie_t0ast"
Command="{Binding OpenUrl}">
<StackPanel Orientation="Horizontal">
<TextBlock Text="Buy me a Ko-fi " />
<Image Classes="icon-url"
Source="{DynamicResource UrlIcon}" />
</StackPanel>
</Button>
<Button Margin="5 0 0 0"
HorizontalAlignment="Center"
CommandParameter="https://toastielab.dev/EllieBotDevs/EllieHub/issues/new"
Command="{Binding OpenUrl}">
<StackPanel Orientation="Horizontal">
<TextBlock Text="Report a bug " />
<Image Classes="icon-url"
Source="{DynamicResource UrlIcon}" />
</StackPanel>
</Button>
</StackPanel>
<TextBlock Text="© 2024 Toastie"
<TextBlock Text="© 2025 Toastie"
FontSize="11"
HorizontalAlignment="Center"
Margin="0 30 0 0"/>
<StackPanel Orientation="Horizontal"
HorizontalAlignment="Center">
<TextBlock Text="License: "
FontSize="11" />
<Button Classes="link-11"
FontSize="11"
Content="Apache License Version 2"
CommandParameter="https://toastielab.dev/ToastieSharp/EllieHub/src/branch/main/LICENSE"
Command="{Binding OpenUrl}" />
</StackPanel>
<HyperlinkButton FontSize="11"
HorizontalAlignment="Center"
Content="GNU General Public License Version 3"
CommandParameter="https://toastielab.dev/EllieBotDevs/EllieHub/src/branch/main/LICENSE"
Command="{Binding OpenUrl}" />
</StackPanel>
</Window>

View file

@ -328,7 +328,7 @@ public class BotConfigViewModel : ViewModelBase<BotConfigView>, IDisposable
ButtonDefinitions = ButtonEnum.OkCancel,
ContentTitle = "Are you sure?",
ContentMessage = $"Are you sure you want to delete {ActualBotName}?{Environment.NewLine}This action cannot be reversed.",
MaxWidth = WindowConstants.DefaultWindowWidth / 2.0,
MaxWidth = int.Parse(WindowConstants.DefaultWindowWidth) / 2.0,
SizeToContent = SizeToContent.WidthAndHeight,
ShowInCenter = true,
WindowIcon = _mainWindow.GetResource<WindowIcon>(AppResources.EllieHubIcon),

View file

@ -147,7 +147,8 @@ public sealed class AppResolver : IAppResolver
// Move the new file to the application's directory.
// ...
// This is a workaround for really weird bug with Unix applications published as single-file:
// This is a workaround for a really weird bug with Unix applications published as single-file.
// The moving operation works, but invoking any process from the shell results in:
// FileNotFoundException: Could not load file or assembly 'System.IO.Pipes, Version=9.0.0.0 [...]
if (Environment.OSVersion.Platform is not PlatformID.Unix)
File.Move(newFileUri, destinationUri, true);