feat(ui): show full tx inputs/outputs in detail overlay without truncation
Input rows switch to a two-line layout (full prev-txid:index on the first line, address + amount on the second) so nothing is cut by a fixed 160px column. Output address column gets TextWrapping instead of TextTrimming. Overlay grows to MaxWidth=660/MaxHeight=800 for better desktop use; the same XAML wraps naturally on narrow mobile screens. Removes the Shorten() helper that was masking input references. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -63,7 +63,7 @@ public sealed class TransactionDetailsViewModel
|
||||
LockTimeText = d.LockTime.ToString();
|
||||
RbfText = loc[d.RbfSignaled ? "tx.yes" : "tx.no"];
|
||||
Inputs = new ObservableCollection<TxIoRow>(d.Inputs.Select((i, n) => new TxIoRow(
|
||||
i.IsCoinbase ? loc["tx.coinbase"] : $"{Shorten(i.PrevTxid)}:{i.PrevIndex}",
|
||||
i.IsCoinbase ? loc["tx.coinbase"] : $"{i.PrevTxid}:{i.PrevIndex}",
|
||||
i.IsCoinbase ? loc["tx.coinbase.newcoins"] : i.Address ?? "—",
|
||||
i.AmountSats is { } a ? CoinAmount.FormatIn(a, unit) : "—",
|
||||
i.IsMine)));
|
||||
@@ -108,7 +108,4 @@ public sealed class TransactionDetailsViewModel
|
||||
}
|
||||
|
||||
private string Abs(long sats) => CoinAmount.FormatIn(Math.Abs(sats), _unit);
|
||||
|
||||
private static string Shorten(string txid) =>
|
||||
txid.Length > 16 ? $"{txid[..8]}…{txid[^4..]}" : txid;
|
||||
}
|
||||
|
||||
@@ -1014,7 +1014,7 @@
|
||||
IsVisible="{Binding IsTxDetailsOpen}">
|
||||
<Border Background="{DynamicResource OverlayCardBrush}"
|
||||
BorderBrush="{DynamicResource BorderSubtleBrush}" BorderThickness="1" CornerRadius="8"
|
||||
MaxWidth="540" MaxHeight="600" Margin="16" Padding="0"
|
||||
MaxWidth="660" MaxHeight="800" Margin="16" Padding="0"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<Panel Margin="24">
|
||||
|
||||
@@ -1135,38 +1135,48 @@
|
||||
</Border>
|
||||
|
||||
<TextBlock Classes="section" Text="{Binding Loc[tx.inputs]}"/>
|
||||
<Border Classes="card" Padding="14,6">
|
||||
<Border Classes="card" Padding="14,4">
|
||||
<ItemsControl ItemsSource="{Binding Inputs}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate x:DataType="vm:TxIoRow">
|
||||
<Grid ColumnDefinitions="160,*,Auto" Margin="0,4">
|
||||
<TextBlock Grid.Column="0" Text="{Binding Position}"
|
||||
FontFamily="monospace" FontSize="11" Foreground="{DynamicResource TextMutedBrush}"
|
||||
TextTrimming="CharacterEllipsis" Margin="0,0,8,0"/>
|
||||
<TextBlock Grid.Column="1" Text="{Binding Address}"
|
||||
FontFamily="monospace" FontSize="11" TextTrimming="CharacterEllipsis"
|
||||
<!-- Two-line layout: txid ref on first line, address+amount on second -->
|
||||
<StackPanel Margin="0,6,0,4">
|
||||
<SelectableTextBlock Text="{Binding Position}"
|
||||
FontFamily="monospace" FontSize="10"
|
||||
Foreground="{DynamicResource TextMutedBrush}"
|
||||
TextWrapping="Wrap"/>
|
||||
<Grid ColumnDefinitions="*,Auto" Margin="0,2,0,0">
|
||||
<SelectableTextBlock Grid.Column="0" Text="{Binding Address}"
|
||||
FontFamily="monospace" FontSize="11"
|
||||
TextWrapping="Wrap" VerticalAlignment="Top"
|
||||
Foreground="{Binding IsMine, Converter={x:Static vm:MineColorConverter.Instance}}"/>
|
||||
<TextBlock Grid.Column="2" Text="{Binding Amount}"
|
||||
FontFamily="monospace" FontFeatures="+tnum" FontSize="11" Margin="8,0,0,0"/>
|
||||
<SelectableTextBlock Grid.Column="1" Text="{Binding Amount}"
|
||||
FontFamily="monospace" FontFeatures="+tnum" FontSize="11"
|
||||
VerticalAlignment="Top" Margin="12,0,0,0"/>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
|
||||
<TextBlock Classes="section" Text="{Binding Loc[tx.outputs]}"/>
|
||||
<Border Classes="card" Padding="14,6">
|
||||
<Border Classes="card" Padding="14,4">
|
||||
<ItemsControl ItemsSource="{Binding Outputs}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate x:DataType="vm:TxIoRow">
|
||||
<Grid ColumnDefinitions="44,*,Auto" Margin="0,4">
|
||||
<Grid ColumnDefinitions="44,*,Auto" Margin="0,6">
|
||||
<TextBlock Grid.Column="0" Text="{Binding Position}"
|
||||
FontFamily="monospace" FontSize="11" Foreground="{DynamicResource TextMutedBrush}"/>
|
||||
<TextBlock Grid.Column="1" Text="{Binding Address}"
|
||||
FontFamily="monospace" FontSize="11" TextTrimming="CharacterEllipsis"
|
||||
FontFamily="monospace" FontSize="11"
|
||||
Foreground="{DynamicResource TextMutedBrush}"
|
||||
VerticalAlignment="Top"/>
|
||||
<SelectableTextBlock Grid.Column="1" Text="{Binding Address}"
|
||||
FontFamily="monospace" FontSize="11"
|
||||
TextWrapping="Wrap" VerticalAlignment="Top"
|
||||
Foreground="{Binding IsMine, Converter={x:Static vm:MineColorConverter.Instance}}"/>
|
||||
<TextBlock Grid.Column="2" Text="{Binding Amount}"
|
||||
FontFamily="monospace" FontFeatures="+tnum" FontSize="11" Margin="8,0,0,0"/>
|
||||
<SelectableTextBlock Grid.Column="2" Text="{Binding Amount}"
|
||||
FontFamily="monospace" FontFeatures="+tnum" FontSize="11"
|
||||
VerticalAlignment="Top" Margin="12,0,0,0"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
@@ -1545,6 +1555,9 @@
|
||||
Foreground="{DynamicResource TextSecondaryBrush}"/>
|
||||
</StackPanel>
|
||||
<TextBlock Text="{Binding Loc[help.info]}" TextWrapping="Wrap"/>
|
||||
<Button Content="{Binding Loc[help.bug.report]}"
|
||||
Click="OnOpenBugReportClick"
|
||||
HorizontalAlignment="Left"/>
|
||||
<Border BorderBrush="{DynamicResource BorderSubtleBrush}"
|
||||
BorderThickness="0,1,0,0" Margin="0,4,0,0"/>
|
||||
<StackPanel Spacing="4">
|
||||
|
||||
Reference in New Issue
Block a user