Public Access
Let the recovery code be copied, and give the phone a clipboard to copy to
Both screens had made the code selectable and both said why: a person who cannot get it out of the box photographs the screen, and a screenshot is a worse home for it than a clipboard. This finishes that argument. Selecting 64 characters of letter-spaced monospace with a thumb is the version of "possible" people give up on halfway — and on the phone the screen blocks screenshots, so the honest remaining options were retyping it or losing it. It is the one secret this application deliberately offers to a clipboard, and the contrast with the keychain's copy is the whole argument rather than an inconsistency. There, copying the private half is refused outright, because installing a key means pasting the public one and the private one has no business leaving the vault. Here there is no better route: the code exists for one screen, is stored nowhere, and has to reach a password manager. The clipboard is the intended destination rather than a way round the design. The sentence afterwards matters as much as the copy, and is asserted: a clipboard is a staging post, this screen is the only place the code exists, and the next thing copied replaces it. Somebody who copies and does nothing has not saved it. The phone had no clipboard delegate at all — the desktop passed one and this head passed null — so COPY PUBLIC KEY on the keychain answered "this machine has no clipboard" on a device that plainly has one. Nothing about that was platform shaped: Android has a clipboard and Avalonia surfaces it through the same TopLevel. Wiring it fixes that copy too. The test fixture built its shell without a clipboard, which modelled the bug rather than the product, so it has one now and the public-key test asserts what lands there instead of the refusal. The refusal keeps its own test, on a shell built without one, because the view model reads the delegate's absence rather than an empty result — and because a button that silently does nothing on this screen is worse than one that refuses.
This commit is contained in:
@@ -44,6 +44,26 @@
|
||||
LetterSpacing="1.5" LineHeight="26" TextWrapping="Wrap" />
|
||||
</Border>
|
||||
|
||||
<!--
|
||||
◆ COPY, and on this head it is the difference between selectable and reachable. The comment above
|
||||
says a user who cannot get the code out of the box photographs the screen; selecting a monospaced,
|
||||
letter-spaced string with a thumb is the version of "can" that people give up on halfway, and this
|
||||
screen blocks screenshots — so without a button the honest options were retyping it or losing it.
|
||||
|
||||
Full width and above the tick rather than beside the code, because it is a step in the sequence
|
||||
this screen walks somebody through: read it, take it, confirm you have it. A small icon in the
|
||||
corner of the box would be the same control drawn as an afterthought.
|
||||
|
||||
What it puts on the clipboard is the one secret this application deliberately offers there — see
|
||||
MainWindowViewModel.CopyRecoveryCode, which sets out why that is right here and wrong for a private
|
||||
key, and what the status line has to say afterwards.
|
||||
-->
|
||||
<Button Classes="secondary" Content="COPY CODE" Margin="0,10,0,0" Height="44"
|
||||
Command="{Binding CopyRecoveryCodeCommand}" />
|
||||
|
||||
<TextBlock Classes="detail" Margin="0,8,0,0" TextWrapping="Wrap"
|
||||
Text="{Binding StatusMessage}" />
|
||||
|
||||
<CheckBox IsChecked="{Binding RecoveryCodeWrittenDown}" Margin="0,20,0,0" MinHeight="44">
|
||||
<TextBlock Classes="body" Foreground="{StaticResource Text}"
|
||||
Text="I have written this code down. I understand it will never be shown again." />
|
||||
|
||||
Reference in New Issue
Block a user