Browse Source

Add Url link open and made text clickable

pull/5/head
Ionite 1 year ago
parent
commit
171452ebb1
No known key found for this signature in database
  1. 18
      StabilityMatrix/FirstLaunchSetupWindow.xaml
  2. 7
      StabilityMatrix/ViewModels/FirstLaunchSetupViewModel.cs

18
StabilityMatrix/FirstLaunchSetupWindow.xaml

@ -83,17 +83,19 @@
<!-- Checkbox --> <!-- Checkbox -->
<Grid Grid.Row="1" HorizontalAlignment="Center"> <Grid Grid.Row="1" HorizontalAlignment="Center">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="0.15*" />
<ColumnDefinition Width="*" /> <ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<CheckBox IsChecked="{Binding EulaAccepted, Mode=TwoWay}" Margin="16,0,0,0" /> <CheckBox
<TextBlock
FontSize="13"
Grid.Column="1" Grid.Column="1"
VerticalAlignment="Center"> HorizontalAlignment="Left"
<Run>I have read and agree to the</Run> IsChecked="{Binding EulaAccepted, Mode=TwoWay}"
<Hyperlink NavigateUri="https://lykos.ai/matrix/license">License Agreement.</Hyperlink> Margin="16,0,0,0">
</TextBlock> <TextBlock FontSize="13" VerticalAlignment="Center">
<Run>I have read and agree to the</Run>
<Hyperlink Command="{Binding OpenLicenseLinkCommand}" NavigateUri="https://lykos.ai/matrix/license">License Agreement.</Hyperlink>
</TextBlock>
</CheckBox>
</Grid> </Grid>
</Grid> </Grid>
<!-- Buttons --> <!-- Buttons -->

7
StabilityMatrix/ViewModels/FirstLaunchSetupViewModel.cs

@ -2,6 +2,7 @@
using System.Threading.Tasks; using System.Threading.Tasks;
using AsyncAwaitBestPractices; using AsyncAwaitBestPractices;
using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using StabilityMatrix.Controls; using StabilityMatrix.Controls;
using StabilityMatrix.Helper; using StabilityMatrix.Helper;
using StabilityMatrix.Models; using StabilityMatrix.Models;
@ -58,5 +59,11 @@ public partial class FirstLaunchSetupViewModel : ObservableObject
CheckHardwareBadge.RefreshCommand.ExecuteAsync(null).SafeFireAndForget(); CheckHardwareBadge.RefreshCommand.ExecuteAsync(null).SafeFireAndForget();
} }
[RelayCommand]
private void OpenLicenseLink()
{
ProcessRunner.OpenUrl("https://lykos.ai/matrix/license");
}
} }

Loading…
Cancel
Save