Add separator support
MODIFY
WalletWasabi.Fluent/ViewModels/HelpAndSupport/AboutViewModel.cs
WalletWasabi.Fluent/ViewModels/HelpAndSupport/AboutViewModel.cs
@@ -28,63 +28,62 @@ namespace WalletWasabi.Fluent.ViewModels.HelpAndSupport
{
public AboutViewModel()
{
- Links = new List<LinkViewModel>()
+ Links = new List<ViewModelBase>()
{
- new ()
+ new LinkViewModel()
{
Link = DocsLink,
Description = "Documentation",
- IsClickable = true,
- IsLast = false
+ IsClickable = true
},
- new ()
+ new SeparatorViewModel(),
+ new LinkViewModel()
{
Link = SourceCodeLink,
Description = "Source Code (Github)",
- IsClickable = true,
- IsLast = false
+ IsClickable = true
},
- new ()
+ new SeparatorViewModel(),
+ new LinkViewModel()
{
Link = ClearnetLink,
Description = "Website (Clearnet)",
- IsClickable = true,
- IsLast = false
+ IsClickable = true
},
- new ()
+ new SeparatorViewModel(),
+ new LinkViewModel()
{
Link = TorLink,
Description = "Website (Tor)",
- IsClickable = false,
- IsLast = false
+ IsClickable = false
},
- new ()
+ new SeparatorViewModel(),
+ new LinkViewModel()
{
Link = StatusPageLink,
Description = "Coordinator Status Page",
- IsClickable = true,
- IsLast = false
+ IsClickable = true
},
- new ()
+ new SeparatorViewModel(),
+ new LinkViewModel()
{
Link = UserSupportLink,
Description = "User Support",
- IsClickable = true,
- IsLast = false
+ IsClickable = true
},
- new ()
+ new SeparatorViewModel(),
+ new LinkViewModel()
{
Link = BugReportLink,
Description = "Bug Reporting",
- IsClickable = true,
- IsLast = false
+ IsClickable = true
},
- new ()
+ new SeparatorViewModel(),
+ new LinkViewModel()
{
Link = FAQLink,
Description = "FAQs",
- IsClickable = true,
- IsLast = true
+ IsClickable = true
},
};
@@ -92,8 +91,7 @@ namespace WalletWasabi.Fluent.ViewModels.HelpAndSupport
{
Link = LicenseLink,
Description = "MIT License",
- IsClickable = true,
- IsLast = true
+ IsClickable = true
};
OpenBrowserCommand = ReactiveCommand.CreateFromTask<string>(IoHelpers.OpenBrowserAsync);
@@ -114,7 +112,7 @@ namespace WalletWasabi.Fluent.ViewModels.HelpAndSupport
SetupCancel(enableCancel: false, enableCancelOnEscape: true, enableCancelOnPressed: true);
}
- public List<LinkViewModel> Links { get; }
+ public List<ViewModelBase> Links { get; }
public LinkViewModel License { get; }

MODIFY
WalletWasabi.Fluent/ViewModels/HelpAndSupport/LinkViewModel.cs
WalletWasabi.Fluent/ViewModels/HelpAndSupport/LinkViewModel.cs
@@ -24,8 +24,6 @@ namespace WalletWasabi.Fluent.ViewModels.HelpAndSupport
public bool IsClickable { get; set; }
- public bool IsLast { get; set; }
-
public ICommand OpenBrowserCommand { get; }
public ICommand CopyLinkCommand { get; }

ADD
WalletWasabi.Fluent/ViewModels/HelpAndSupport/SeparatorViewModel.cs
+namespace WalletWasabi.Fluent.ViewModels.HelpAndSupport
+{
+ public partial class SeparatorViewModel : ViewModelBase
+ {
+ }
+}
\ No newline at end of file

MODIFY
WalletWasabi.Fluent/Views/HelpAndSupport/AboutView.axaml
WalletWasabi.Fluent/Views/HelpAndSupport/AboutView.axaml
<Setter Property="Foreground" Value="{DynamicResource SystemAccentColor}" />
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
+ <Style Selector="TextBlock.LinkSeparatorPadding">
+ <Setter Property="Margin" Value="5 -0.5" />
+ <Setter Property="VerticalAlignment" Value="Center" />
+ </Style>
</UserControl.Styles>
<Panel>
<controls:ContentArea EnableNext="True" NextContent="Close">
<Setter Property="Orientation" Value="Vertical"/>
</Style>
</ItemsControl.Styles>
+ <ItemsControl.DataTemplates>
+ <DataTemplate DataType="vm:SeparatorViewModel">
+ <TextBlock Classes="LinkSeparatorPadding"
+ Text="-"
+ IsVisible="True" />
+ </DataTemplate>
+ </ItemsControl.DataTemplates>
</ItemsControl>
<!-- Advanced -->
<Button HorizontalAlignment="Center" Classes="plain obscured"

MODIFY
WalletWasabi.Fluent/Views/HelpAndSupport/LinkView.axaml
WalletWasabi.Fluent/Views/HelpAndSupport/LinkView.axaml
x:CompileBindings="True"
x:Class="WalletWasabi.Fluent.Views.HelpAndSupport.LinkView">
<UserControl.Styles>
- <Style Selector="TextBlock.LinkSeparatorPadding">
- <Setter Property="Margin" Value="5 -0.5" />
- <Setter Property="VerticalAlignment" Value="Center" />
- </Style>
<Style Selector="TextBlock.Hyperlink">
<Setter Property="TextDecorations" Value="Underline" />
<Setter Property="Foreground" Value="{DynamicResource SystemAccentColor}" />
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
</UserControl.Styles>
- <StackPanel Orientation="Horizontal">
<StackPanel Orientation="Horizontal" Spacing="5" Margin="2">
<Button Classes="plain"
Command="{Binding OpenBrowserCommand}"
NormalIcon="{StaticResource copy_regular}"
ClickIcon="{StaticResource copy_confirmed}" />
</StackPanel>
- <TextBlock Classes="LinkSeparatorPadding"
- IsVisible="{Binding !IsLast}"
- Text="-" />
- </StackPanel>
</UserControl>
\ No newline at end of file

Add separator support