feat(ui): the new-chat dialog opens the person, and no longer starts the chat
Phase 3 of docs/npub-profile-preview.md, and the user-visible change: "Direct message via npub" now shows who this is before anything is created. The dialog's button reads "Find profile" and pushes ProfilePreviewRoute; the chat is started from there. The field keeps what it parsed rather than whether it parsed. Its check and its decode used to be two different functions, which is how "nostr:npub1…" passed the one and failed the other, closing the dialog with nothing to show for it; CredentialParser.npubOrNull is the sign-in decode exposed for an address field -- an nsec is null there, because a field asking whom to write to must never take a secret for an answer -- and the enabled button and the route it pushes read the same key. The nip05 branch still lands on the placeholder, and the test says so. "Start chat" goes with its only reader. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Pulled-From: curated/curated@923b59ec32
This commit is contained in:
@@ -234,7 +234,6 @@
|
||||
<string name="source_dialect">Source dialect</string>
|
||||
<string name="start">Start</string>
|
||||
<string name="start_a_group_chat">Start a group chat</string>
|
||||
<string name="start_chat">Start chat</string>
|
||||
<string name="start_chat_via_npub_or_nip05">Start chat via npub or nip05</string>
|
||||
<string name="start_key_ceremony">Start key ceremony</string>
|
||||
<string name="startup_error">Startup error</string>
|
||||
@@ -486,6 +485,7 @@
|
||||
<string name="switch_to_it">Switch to it</string>
|
||||
<string name="the_profile_you_are_in_stays_on_this_device">The profile you are in stays on this device.</string>
|
||||
<!-- The profile preview: the person behind a pasted npub, before a chat with them is started. -->
|
||||
<string name="find_profile">Find profile</string>
|
||||
<string name="looking_for_this_profile_on_the_relays">Looking for this profile on the relays.</string>
|
||||
<string name="start_new_chat">Start new chat</string>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user