CoinJoin summary works
MODIFY
WalletWasabi.Fluent/Controls/ClipboardCopyButton.axaml.cs
WalletWasabi.Fluent/Controls/ClipboardCopyButton.axaml.cs
@@ -47,17 +47,15 @@ public class ClipboardCopyButton : TemplatedControl
public ClipboardCopyButton()
{
- CopyCommand = ReactiveCommand.CreateFromTask(CopyToClipboard,
- this.WhenAnyValue(c => c.Text, selector: s => s is not null));
- var obs = CopyCommand.Select(unit => true)
- .Merge(CopyCommand.Delay(TimeSpan.FromSeconds(2)).Select(_ => false));
+ var canCopy = this.WhenAnyValue(c => c.Text, selector: s => s is not null);
+ CopyCommand = ReactiveCommand.CreateFromTask(CopyToClipboard, canCopy);
- var o = CopyCommand
+ var isPopupOpen = CopyCommand
.Select(unit =>
Observable.Return(true).Concat(Observable.Timer(HidePopupTime).Select(l => false)))
.Switch();
- this.Bind(IsPopupOpenProperty, o);
+ this.Bind(IsPopupOpenProperty, isPopupOpen);
}
public TimeSpan HidePopupTime { get; set; } = TimeSpan.FromSeconds(2);

MODIFY
WalletWasabi.Fluent/Controls/PreviewItem.axaml
WalletWasabi.Fluent/Controls/PreviewItem.axaml
xmlns:c="using:WalletWasabi.Fluent.Controls">
<Design.PreviewWith>
- <c:PreviewItem Label="Text to preview"></c:PreviewItem>
+ <Border Height="100" Width="400">
+ <c:PreviewItem Label="Transaction ID"
+ TextValue="Text to copy">
+ </c:PreviewItem>
+ </Border>
</Design.PreviewWith>
<Style Selector="c|PreviewItem">
<DockPanel DockPanel.Dock="Right" Margin="30 0 0 0">
<TextBlock Name="PART_Text" Text="{TemplateBinding Label}" DockPanel.Dock="Top" Margin="0 0 0 5" Opacity="0.6" />
<DockPanel HorizontalAlignment="Left" DockPanel.Dock="Bottom">
- <c:ClipboardCopyButton ToolTip.Tip="Copy" ToolTip.Placement="Bottom" DockPanel.Dock="Right" Width="30" Text="{TemplateBinding Value}" IsVisible="{TemplateBinding CopyButtonVisibility}" />
+ <c:ClipboardCopyButton ToolTip.Tip="Copy" ToolTip.Placement="Bottom" DockPanel.Dock="Right" Width="30" Text="{TemplateBinding TextValue}" IsVisible="{TemplateBinding IsCopyButtonVisible}" />
<Panel>
<ContentPresenter Name="PART_ContentPresenter" Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}"

MODIFY
WalletWasabi.Fluent/Controls/PreviewItem.axaml.cs
WalletWasabi.Fluent/Controls/PreviewItem.axaml.cs
@@ -20,21 +20,23 @@ public class PreviewItem : ContentControl
public static readonly StyledProperty<bool> IsIconVisibleProperty =
AvaloniaProperty.Register<PreviewItem, bool>(nameof(IsIconVisible));
- public static readonly StyledProperty<string> ValueProperty =
- AvaloniaProperty.Register<PreviewItem, string>(nameof(Value));
+ public static readonly StyledProperty<string> TextValueProperty =
+ AvaloniaProperty.Register<PreviewItem, string>(nameof(TextValue));
public static readonly StyledProperty<ICommand> CopyCommandProperty =
AvaloniaProperty.Register<PreviewItem, ICommand>(nameof(CopyCommand));
- public static readonly StyledProperty<bool> CopyButtonVisibilityProperty =
- AvaloniaProperty.Register<PreviewItem, bool>(nameof(CopyButtonVisibility));
+ public static readonly StyledProperty<bool> IsCopyButtonVisibleProperty =
+ AvaloniaProperty.Register<PreviewItem, bool>(nameof(IsCopyButtonVisible));
public static readonly StyledProperty<bool> PrivacyModeEnabledProperty =
AvaloniaProperty.Register<PreviewItem, bool>(nameof(PrivacyModeEnabled));
public PreviewItem()
{
- this.Bind(CopyButtonVisibilityProperty, this.WhenAnyValue(item => item.IsPointerOver));
+ var isCopyButtonVisible = this.WhenAnyValue(item => item.IsPointerOver, item => item.TextValue,
+ (a, b) => a && !string.IsNullOrWhiteSpace(b));
+ this.Bind(IsCopyButtonVisibleProperty, isCopyButtonVisible);
}
public string Label
@@ -61,10 +63,10 @@ public class PreviewItem : ContentControl
set => SetValue(IsIconVisibleProperty, value);
}
- public string Value
+ public string TextValue
{
- get => GetValue(ValueProperty);
- set => SetValue(ValueProperty, value);
+ get => GetValue(TextValueProperty);
+ set => SetValue(TextValueProperty, value);
}
public ICommand CopyCommand
@@ -73,10 +75,10 @@ public class PreviewItem : ContentControl
set => SetValue(CopyCommandProperty, value);
}
- public bool CopyButtonVisibility
+ public bool IsCopyButtonVisible
{
- get => GetValue(CopyButtonVisibilityProperty);
- set => SetValue(CopyButtonVisibilityProperty, value);
+ get => GetValue(IsCopyButtonVisibleProperty);
+ set => SetValue(IsCopyButtonVisibleProperty, value);
}
public bool PrivacyModeEnabled

MODIFY
WalletWasabi.Fluent/Views/Wallets/Advanced/WalletInfoView.axaml
WalletWasabi.Fluent/Views/Wallets/Advanced/WalletInfoView.axaml
<c:PreviewItem Icon="{StaticResource private_key_regular}"
Label="Extended Master Private Key"
- Value="{Binding ExtendedMasterPrivateKey}"
+ TextValue="{Binding ExtendedMasterPrivateKey}"
IsVisible="{Binding !!ExtendedMasterPrivateKey}"
PrivacyModeEnabled="{Binding !ShowSensitiveData}" >
<TextBlock Classes="monoSpaced" Text="{Binding ExtendedMasterPrivateKey}" />
<c:PreviewItem Icon="{StaticResource private_key_regular}"
Label="Extended Master zprv"
- Value="{Binding ExtendedMasterZprv}"
+ TextValue="{Binding ExtendedMasterZprv}"
IsVisible="{Binding !!ExtendedMasterZprv}"
PrivacyModeEnabled="{Binding !ShowSensitiveData}" >
<TextBlock Classes="monoSpaced" Text="{Binding ExtendedMasterZprv}" />
<c:PreviewItem Icon="{StaticResource fingerprint_regular}"
Label="Extended Master Fingerprint"
- Value="{Binding MasterKeyFingerprint}" >
+ TextValue="{Binding MasterKeyFingerprint}" >
<TextBlock Classes="monoSpaced" Text="{Binding MasterKeyFingerprint}" />
</c:PreviewItem>
<Separator />
<c:PreviewItem Icon="{StaticResource organization_regular}"
Label="Account Key Path"
- Value="{Binding AccountKeyPath}" >
+ TextValue="{Binding AccountKeyPath}" >
<TextBlock Classes="monoSpaced" Text="{Binding AccountKeyPath}" />
</c:PreviewItem>
<Separator />
<c:PreviewItem Icon="{StaticResource private_key_regular}"
Label="Extended Account Private Key xpriv"
- Value="{Binding ExtendedAccountPrivateKey}"
+ TextValue="{Binding ExtendedAccountPrivateKey}"
IsVisible="{Binding !!ExtendedAccountPrivateKey}"
PrivacyModeEnabled="{Binding !ShowSensitiveData}" >
<TextBlock Classes="monoSpaced" Text="{Binding ExtendedAccountPrivateKey}" />
<c:PreviewItem Icon="{StaticResource private_key_regular}"
Label="Extended Account Private Key zprv"
- Value="{Binding ExtendedAccountZprv}"
+ TextValue="{Binding ExtendedAccountZprv}"
IsVisible="{Binding !!ExtendedAccountZprv}"
PrivacyModeEnabled="{Binding !ShowSensitiveData}" >
<TextBlock Classes="monoSpaced" Text="{Binding ExtendedAccountZprv}" />
<c:PreviewItem Icon="{StaticResource key_regular}"
Label="Public External Output descriptor"
- Value="{Binding WpkhOutputDescriptors.PublicExternal}">
+ TextValue="{Binding WpkhOutputDescriptors.PublicExternal}">
<c:PrivacyContentControl Classes="monoSpaced" Content="{Binding WpkhOutputDescriptors.PublicExternal}" ForceShow="{Binding ShowSensitiveData}" NumberOfPrivacyChars="38" />
</c:PreviewItem>
<c:PreviewItem Icon="{StaticResource key_regular}"
Label="Public Internal Output descriptor"
- Value="{Binding WpkhOutputDescriptors.PublicInternal}">
+ TextValue="{Binding WpkhOutputDescriptors.PublicInternal}">
<c:PrivacyContentControl Classes="monoSpaced" Content="{Binding WpkhOutputDescriptors.PublicInternal}" ForceShow="{Binding ShowSensitiveData}" NumberOfPrivacyChars="38" />
</c:PreviewItem>
Label="Private External Output descriptor"
IsVisible="{Binding !!WpkhOutputDescriptors.PrivateExternal}"
PrivacyModeEnabled="{Binding !ShowSensitiveData}"
- Value="{Binding WpkhOutputDescriptors.PrivateExternal}">
+ TextValue="{Binding WpkhOutputDescriptors.PrivateExternal}">
<c:PrivacyContentControl Classes="monoSpaced" Content="{Binding WpkhOutputDescriptors.PrivateExternal}" ForceShow="{Binding ShowSensitiveData}" NumberOfPrivacyChars="38" />
</c:PreviewItem>
<c:PreviewItem Icon="{StaticResource key_regular}"
Label="Private Internal Output descriptor"
IsVisible="{Binding !!WpkhOutputDescriptors.PrivateInternal}"
PrivacyModeEnabled="{Binding !ShowSensitiveData}"
- Value="{Binding WpkhOutputDescriptors.PrivateInternal}">
+ TextValue="{Binding WpkhOutputDescriptors.PrivateInternal}">
<c:PrivacyContentControl Classes="monoSpaced" Content="{Binding WpkhOutputDescriptors.PrivateInternal}" ForceShow="{Binding ShowSensitiveData}" NumberOfPrivacyChars="38" />
</c:PreviewItem>
<c:PreviewItem Icon="{StaticResource key_regular}"
Label="Extended Account Public Key"
- Value="{Binding ExtendedAccountPublicKey}">
+ TextValue="{Binding ExtendedAccountPublicKey}">
<c:PrivacyContentControl Classes="monoSpaced" Content="{Binding ExtendedAccountPublicKey}" ForceShow="{Binding ShowSensitiveData}" NumberOfPrivacyChars="38" />
</c:PreviewItem>
<c:PreviewItem Icon="{StaticResource key_regular}"
Label="Extended Account zpub"
- Value="{Binding ExtendedAccountZpub}">
+ TextValue="{Binding ExtendedAccountZpub}">
<c:PrivacyContentControl Classes="monoSpaced" Content="{Binding ExtendedAccountZpub}" ForceShow="{Binding ShowSensitiveData}" NumberOfPrivacyChars="38" />
</c:PreviewItem>
</StackPanel>

MODIFY
WalletWasabi.Fluent/Views/Wallets/Advanced/WalletStatsView.axaml
WalletWasabi.Fluent/Views/Wallets/Advanced/WalletStatsView.axaml
EnableNext="True" NextContent="Done">
<StackPanel Spacing="10" Margin="0 20 20 0">
<c:PreviewItem Label="Number of coins (UTXOs)"
- Value="{Binding CoinCount}">
+ TextValue="{Binding CoinCount}">
<c:PrivacyContentControl Classes="monoSpaced"
NumberOfPrivacyChars="8"
Content="{Binding CoinCount}" />
</c:PreviewItem>
<Separator />
<c:PreviewItem Label="Unconfirmed balance"
- Value="{Binding UnconfirmedBalance}">
+ TextValue="{Binding UnconfirmedBalance}">
<c:PrivacyContentControl NumberOfPrivacyChars="11" Content="{Binding UnconfirmedBalance, StringFormat={}{0} BTC, Mode=OneWay}" Classes="monoSpaced" />
</c:PreviewItem>
<Separator />
<c:PreviewItem Label="Confirmed balance"
- Value="{Binding ConfirmedBalance}">
+ TextValue="{Binding ConfirmedBalance}">
<c:PrivacyContentControl NumberOfPrivacyChars="11" Content="{Binding ConfirmedBalance, StringFormat={}{0} BTC, Mode=OneWay}" Classes="monoSpaced" />
</c:PreviewItem>
<Separator />
<c:PreviewItem Label="Total balance"
- Value="{Binding Balance}">
+ TextValue="{Binding Balance}">
<c:PrivacyContentControl NumberOfPrivacyChars="11" Content="{Binding Balance, StringFormat={}{0} BTC, Mode=OneWay}" Classes="monoSpaced" />
</c:PreviewItem>
</StackPanel>

MODIFY
WalletWasabi.Fluent/Views/Wallets/Home/History/CoinJoinDetailsView.axaml
WalletWasabi.Fluent/Views/Wallets/Home/History/CoinJoinDetailsView.axaml
<!-- Date -->
<c:PreviewItem Icon="{StaticResource timer_regular}"
Label="Date"
- Value="{Binding Date}">
+ TextValue="{Binding Date}">
<TextBlock Text="{Binding Date}" />
</c:PreviewItem>
<ItemsRepeater Items="{Binding TransactionIds}">
<ItemsRepeater.ItemTemplate>
<DataTemplate>
- <c:AdorningContentControl ClipToBounds="False" HorizontalAlignment="Left">
- <c:AdorningContentControl.Adornment>
- <c:AnimatedButton ToolTip.Tip="Copy"
- x:CompileBindings="False"
- Command="{Binding #CoinJoinDetails.DataContext.CopyCommand}"
- CommandParameter="{Binding .}"
- NormalIcon="{StaticResource copy_regular}"
- ClickIcon="{StaticResource copy_confirmed}"
- InitialOpacity="0.6"
- HorizontalAlignment="Right"
- Margin="0 0 -30 0" />
- </c:AdorningContentControl.Adornment>
-
+ <c:PreviewItem Icon="{StaticResource transaction_id}" TextValue="{Binding }">
<c:PrivacyContentControl NumberOfPrivacyChars="48">
- <TextBlock Classes="monoSpaced" Text="{Binding .}" />
+ <TextBlock Text="{Binding }" Classes="monoSpaced"/>
</c:PrivacyContentControl>
-
- </c:AdorningContentControl>
+ </c:PreviewItem>
</DataTemplate>
</ItemsRepeater.ItemTemplate>
<ItemsRepeater.Layout>
<!-- CJ fee -->
<c:PreviewItem Icon="{StaticResource btc_logo}"
Label="Coinjoin fee:"
- Value="{Binding CoinJoinFee}">
+ TextValue="{Binding CoinJoinFee}">
<TextBlock Text="{Binding CoinJoinFeeString, Mode=OneWay}" />
</c:PreviewItem>

MODIFY
WalletWasabi.Fluent/Views/Wallets/Home/History/TransactionDetailsView.axaml
WalletWasabi.Fluent/Views/Wallets/Home/History/TransactionDetailsView.axaml
<!-- Date -->
<c:PreviewItem Icon="{StaticResource timer_regular}"
Label="Date / Time"
- Value="{Binding Date, StringFormat='{}{0:MM/dd/yyyy HH:mm}', Mode=OneWay}">
+ TextValue="{Binding Date, StringFormat='{}{0:MM/dd/yyyy HH:mm}', Mode=OneWay}">
<TextBlock Text="{Binding Date, StringFormat='{}{0:MM/dd/yyyy HH:mm}', Mode=OneWay}" Classes="monoSpaced"/>
</c:PreviewItem>
<Separator />
<!-- Transaction ID -->
<c:PreviewItem Icon="{StaticResource transaction_id}"
Label="Transaction ID"
- Value="{Binding TransactionId}">
+ TextValue="{Binding TransactionId}">
<c:PrivacyContentControl NumberOfPrivacyChars="48">
<TextBlock Text="{Binding TransactionId}" Classes="monoSpaced"/>
</c:PrivacyContentControl>
<!-- Incoming amount -->
<c:PreviewItem Icon="{StaticResource btc_logo}"
Label="Amount"
- Value="{Binding Amount}">
+ TextValue="{Binding Amount}">
<TextBlock Text="{Binding Amount, StringFormat={}{0} BTC, Mode=OneWay}" Classes="monoSpaced" />
</c:PreviewItem>
<!-- Block height -->
<c:PreviewItem Icon="{StaticResource block_height}"
Label="Block height"
- Value="{Binding BlockHeight}"
+ TextValue="{Binding BlockHeight}"
IsVisible="{Binding IsConfirmed}">
<TextBlock Text="{Binding BlockHeight}" />
</c:PreviewItem>
<!-- Confirmations -->
<c:PreviewItem Icon="{StaticResource copy_confirmed}"
Label="Confirmations"
- Value="{Binding Confirmations}">
+ TextValue="{Binding Confirmations}">
<TextBlock Text="{Binding Confirmations}" />
</c:PreviewItem>
<!-- Labels -->
<c:PreviewItem Icon="{StaticResource entities_regular}"
Label="Labels"
- Value="{Binding Labels}">
+ TextValue="{Binding Labels}">
<c:PrivacyContentControl NumberOfPrivacyChars="20">
<c:TagsBox Padding="0" IsReadOnly="True" Items="{Binding Labels}" />
</c:PrivacyContentControl>

CoinJoin summary works