feat(aboutpage): add check for update button

This commit is contained in:
404Kurama 2023-04-23 22:52:18 +07:00
parent d1c78bc7db
commit 6930e008f2
2 changed files with 10 additions and 2 deletions

View File

@ -1,11 +1,18 @@
using System.Windows.Input;
using CommunityToolkit.Mvvm.Input;
using Bloxstrap.Helpers;
using CommunityToolkit.Mvvm.Input;
namespace Bloxstrap.ViewModels
{
public class AboutViewModel
{
public string Version => $"Version {App.Version}";
public ICommand CFUWindowCommand => new RelayCommand(CheckForUpdate);
private void CheckForUpdate()
{
Updater.CheckForUpdate();
}
}
}

View File

@ -38,7 +38,8 @@
<StackPanel Orientation="Horizontal">
<ui:Anchor Margin="0,16,4,0" Content="GitHub repository" Icon="Code24" NavigateUri="https://github.com/pizzaboxer/bloxstrap" />
<ui:Anchor Margin="4,16,4,0" Content="Report an issue" Icon="Chat48" NavigateUri="https://github.com/pizzaboxer/bloxstrap/issues" />
<ui:Anchor Margin="4,16,0,0" Content="Help topics" Icon="BookQuestionMark24" NavigateUri="https://github.com/pizzaboxer/bloxstrap/wiki" />
<ui:Anchor Margin="4,16,4,0" Content="Help topics" Icon="BookQuestionMark24" NavigateUri="https://github.com/pizzaboxer/bloxstrap/wiki" />
<ui:Button Margin="4,16,0,0" Content="Checking for update" Icon="ArrowCounterclockwise24" Command="{Binding CFUWindowCommand, Mode=OneWay}" />
</StackPanel>
<TextBlock Text="Contributors" FontWeight="Medium" FontSize="20" Margin="0,16,0,0" />